OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for ...

learn more… | top users | synonyms

66
votes
15answers
25k views

What are some good learning resources for OpenGL? [closed]

I have been using the OpenGL ES on the iPhone for a while now and basically I feel pretty lost outside to the small set of commands I've seen in examples and adopted as my own. I would love to use ...
55
votes
9answers
17k views

Why do we move the world instead of the camera?

I heard that in an OpenGL game what we do to let the player move is not to move the camera but to move the whole world around. For example here is an extract of this tutorial: OpenGL View matrix ...
52
votes
7answers
16k views

Good resources for learning modern OpenGL (3.0 or later)? [closed]

I stumble upon the search of a good resource to start with OpenGL (3.0 or later) . Well, I found a lot of books but none of them can be considered a good resource! Here two examples: OpenGL ...
46
votes
9answers
46k views

Good GUI for OpenGL [closed]

I am starting to learn OpenGL with FreeGLUT using the Superbible and the knowledge i have from my elementary graphics to brush up on my skills. To get more from this experience i want to integrate a ...
38
votes
10answers
10k views

Is learning OpenGL 2.1 useless today?

I'm new to 3D OpenGL/DirectX world and I found out that OpenGL 4.1 and GLSL specifications were just released today. A friend of mine gave me the Red Book for OGL v2.1 but, as far as I've read, 3.x ...
37
votes
1answer
4k views

How can I reduce aliasing in my outline glow effect?

I'm trying to replicate the glowing outline effect in the Left 4 Dead game. The effect causes an objects outline to glow, even when the object is occluded. Here is a screenshot of the effect: I'm ...
32
votes
10answers
4k views

What makes a game look “good”? [closed]

I am working on a 3D space game using OpenGL and C++ and I am planning to focus on giving the game modern, eye-catching graphics, but the more I think of it the more I realise I don't really know what ...
28
votes
9answers
3k views

Should I continue studying OpenGL or just switch to DirectX to give me a better chance of landing a job in the game industry? [closed]

I've been learning graphics programming for some time now using OpenGL and Linux. I'm pretty familiar with most of the concepts, but I would really like to further my knowledge and eventually pursue a ...
28
votes
5answers
10k views

How can I achieve a good fire effect with alpha blending and particles?

Using the following setting for the OpenGL particle effect: SRC: GL_SRC_ALPHA DST: GL_ONE Creates an additive blend, which looks spectacular on a black background but terrible on brighter colours, ...
26
votes
4answers
16k views

Vertex Array Object (OpenGL)

I've just started out with OpenGL I still haven't really understood what Vertex Array Objects are and how they can be employed. If Vertex Buffer Object are used to store vertex data (such as their ...
25
votes
6answers
2k views

Is OpenGL appropriate for 2D games?

I have been teaching myself the OpenGL library for a while now, and want to start making a game. However, for an easier introduction, I want to start with something 2D, such as a top down ...
25
votes
4answers
12k views

why would you use textures that are not a power of 2?

In the early days of OpenGL and DirectX, it was required that textures were powers of two. This meant that interpolation of float values could be done very quickly using shifting and such. Since ...
23
votes
6answers
7k views

Creating a retro-style palette swapping effect in OpenGL

I'm working on a Megaman-like game where I need to change the color of certain pixels at runtime. For reference: in Megaman when you change your selected weapon then main character's palette changes ...
23
votes
6answers
10k views

How can I improve rendering speeds of a Voxel/Minecraft type game?

I'm writing my own clone of Minecraft (also written in Java). It works great right now. With a viewing distance of 40 meters I can easily hit 60 FPS on my MacBook Pro 8,1. (Intel i5 + Intel HD ...
22
votes
4answers
6k views

Why is programmable pipeline( GLSL ) faster than fixed pipeline?

So I'm teaching myself GLSL and am trying to figure out why it's suppose to be faster than the fixed function pipeline. The reason I am having a problem is that from my understanding , the shaders ...
22
votes
2answers
3k views

After a succesful glLinkProgram, should I delete / detach my shaders?

After I have a linked program, and thinking about defensive programming, should I delete and detach the shaders used to link this program? If yes, is that going to free any resources? Or do these ...
21
votes
7answers
3k views

How to get PS3/Xbox 360 experience without having access to Dev kits?

I am a budding game programmer trying to get into the industry programming for PS3, Xbox 360. The main problem I see is the need to demonstrate my skills to a potential employer, but without access ...
21
votes
9answers
6k views

OpenGL optimization tips [closed]

What tips or tricks do you have when it comes to making the OpenGL more efficient?
21
votes
3answers
7k views

For voxel rendering, what is more efficient: pre-made VBO or a geometry shader?

Given a fairly static voxel array, what is more efficient: using the CPU to pre-generate a VBO to render the voxel faces (ignoring more advanced forms of rendering like marching cubes for now) or ...
21
votes
1answer
623 views

My game seems to be incompatible with recording software. What could be causing this?

I've just finished a little Game-Dev project for university and I need to record a video to accompany my submission (just in case they can't get my source to work). Basically my game doesn't work at ...
20
votes
5answers
6k views

Why is an engine like Unity3D emphasized over a native library like OpenGL for beginners?

I am just a beginner in 3D games, my preferred platform is Android. I posted a question in some other forum about "What to use: OpenGL or Unity3d?" They all emphasized Unity3D and using its built-in ...
20
votes
4answers
11k views

How to avoid texture bleeding in a texture atlas?

In my game there is a Minecraft-like terrain made out of cubes. I generate a vertex buffer from the voxel data and use a texture atlas for looks of different blocks: The problem is that the texture ...
20
votes
3answers
13k views

What is the difference between OpenGL ES and OpenGL?

Android uses OpenGL ES, what is the difference between it and OpenGL?
20
votes
2answers
14k views

A good way to build a game loop in OpenGL

I'm currently beginning to learn OpenGL at school, and I've started making a simple game the other day (on my own, not for school). I'm using freeglut, and am building it in C, so for my game loop I ...
20
votes
2answers
7k views

How many threads should an Android game use?

At minimum, an OpenGL Android game has a UI thread and a Renderer thread created by GLSurfaceView. Renderer.onDrawFrame() should be doing a minimum of work to get the higest FPS. The physics, AI, ...
19
votes
3answers
1k views

Do I need to learn C++ to use Open GL?

Do I need to learn C++ to use Open GL?
19
votes
1answer
5k views

File format for static and animated 3D models

I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to display static meshs and ...
18
votes
5answers
2k views

Why do we use 4x4 matrices to transform things in 3D?

To translate a vector by 10 unit in the X direction, why do we have to use a matrix? We can just add 10 to the mat[0][0], and we got the same result too.
18
votes
3answers
3k views

What's the difference between mesh and a model?

Which one is created first? For example if a team worked on a graphical asset of a car, what would be a model and what would be a mesh of the car?
18
votes
1answer
9k views

What is the benefit of triple buffering?

I read everything written in a previous question. From what I understand in double buffering the program must wait until the finished drawing is copied or swapped before starting the next drawing. In ...
17
votes
2answers
10k views

I can't figure out how to animate my loaded model with Assimp

I have loaded in a model to my C++ OpenGL game. It is a COLLADA file type that I have loaded, and I setup an animation under blender for the file. The problem is I don't know how to animate the model. ...
17
votes
6answers
2k views

Separating game data/logic from rendering

I'm writing a game using C++ and OpenGL 2.1. I was thinking how could I separate the data/logic from rendering. At the moment I use a base class 'Renderable' that gives a pure virtual method to ...
17
votes
5answers
4k views

Procedural Planets, Heightmaps and Textures

I am currently working on an OpenGL procedural planet generator. I hope to use it for a space RPG, that will not allow players to go down to the surface of a planet so I have ignored anything ROAM ...
17
votes
3answers
5k views

Upgrade OpenGL version on Windows?

How do I update the version of OpenGL on Windows so that I can use anything newer than the Version 1.1 header file that is included in the Platform SDK? Even version 7.0A of the SDK for Windows 7 ...
16
votes
12answers
2k views

3D theory before graphics APIs? [closed]

I'm a software engineer and I'm hoping to move my career towards game development. I'm reading a book right now on 2D using C++/DirectX. When I get into 3D I know I want to do it correctly. For ...
16
votes
1answer
2k views

Why does this geometry shader slow down my program so much?

I have an OpenGL program, and I'm rendering a terrain mesh. I displace the vertices in the vertex buffer and don't really color them in the fragment shader yet. I'm adding a geometry shader one part ...
16
votes
3answers
11k views

full screen anti-aliasing in opengl

I want to do a full screen anti aliasing in opengl and dont want to use the anti-aliasing that is provided by opengl itself since I am building a game and want good effects in it. So can any one ...
16
votes
6answers
5k views

OpenGL wireframe

No, I'm not looking for glPolygonMode. I'm searching for a method, possibly a GLSL shader that would produce that retro-style wireframe look for objects. Any suggestions? Something like Vector Tanks ...
16
votes
1answer
3k views

How would you implement chromatic aberration?

How would you implement the effect of chromatic aberration with shaders? Would rendering of the world with different focus distances for each color solve the problem (maybe with the usage of only one ...
15
votes
7answers
2k views

For 2D games, is there any reason NOT to use a 3D API like Direct3D or OpenGL?

I've been out of hobby Game Development for quite a while now. Back when I did it, most people used Direct Draw to create 2D games. By the time I stopped people were saying OpenGL or Direct3D with ...
15
votes
2answers
1k views

Camera vs Viewport

I'm don't have a clear understanding of what precisely is the difference between the camera coordinates and the viewport coordinates. Can anyone please clarify?
15
votes
2answers
600 views

OpenGL: Where shoud I place shaders?

I'm trying to learn OpenGL ES 2.0 and I'm wondering what is the most common practice to "manage" shaders. I'm asking this question because in the examples I've found (like the one included in the API ...
15
votes
1answer
14k views

Freeglut vs SDL vs GLFW

i need to port my game project from Android (written in C, OpenGL ES 2.0, thanks to NDK) to Windows and Linux platforms. Of course i will need to rewrite some platform depended code, but now i stuck ...
14
votes
2answers
1k views

What are the common rendering optimization techniques for the geometry pass in a deferred shading renderer? [closed]

I have been developing a game engine using OpenGL 3 and C++ (and glfw for window management). I have advanced so far, got most of the things done except sound entities and optimizations. The engine ...
14
votes
4answers
2k views

What does a matrix represent?

I began learning OpenGL recently and am having problems visualizing what matrices are and their role in computer graphics. Given the template of a 4x4 matrix like this: I would assume that each ...
14
votes
2answers
1k views

What advantages does bare OpenGL provide over frameworks/engines to small developers? [closed]

I've noticed a trend of indie developers steering away from frameworks and engines, and moving towards using bare OpenGL, or using it combined with SDL/SFML2. As an indie developer, I can't see what ...
14
votes
1answer
8k views

in/out keywords in GLSL

I don't really understand how to use the in / out keywords in GLSL, and google is being uncharacteristically unhelpful. What exactly do they do? How would I use them if, for example, I want to pass a ...
14
votes
3answers
8k views

Starting out with OpenGL when most tutorials are out of date

I'm sure there are already a bunch of questions like this asked, but the constant updating of the OpenGL library throws them all away, and in a month or two, the answers here will be worthless again. ...
14
votes
5answers
17k views

Drawing lots of tiles with OpenGL, the modern way

I'm working on a small tile/sprite-based PC game with a team of people, and we're running into performance issues. The last time I used OpenGL was around 2004, so I've been teaching myself how to use ...
14
votes
1answer
613 views

Suitability of ground fog using layered alpha quads?

A layered approach would use a series of massive alpha-textured quads arranged parallel to the ground, intersecting all intervening terrain geometry, to provide the illusion of ground fog quite ...