Game Development Community

Opengl Q & A / Faq

by Alex Scarborough · in General Discussion · 07/26/2006 (2:02 am) · 21 replies

It seems that there are some misconceptions about OpenGL and what it can do that are floating around the internet. There always will be, of course, but I'd like to do what I can to keep the GarageGames community properly informed. Discussion of OpenGL is especially pertinent to anyone who has wanted to, or does currently want to, improve the TGE rendering system, and that seems to be a popular thing to do lately. Also, after so many threads that are people asking questions, won't it be nice to have a thread dedicated to giving answers?

Simply post any questions you may have about OpenGL, and I will do my best to answer them. If someone else has an answer, that's awesome! Post it! I'll try and keep this file updated with a full set of all questions and answers, and will hopefully turn it into a TDN article if it becomes worthwhile as one.

I will not answer some questions that can be easily googled. For example "How do I draw a triangle?". I will answer questions such as "What is the best way to render: glDrawArrays or glDrawElements?", "What do vertex buffer objects really do?" or "The 183 page specification for GL_EXT_framebuffer_object is terrifying. I just want to set up a simple render to texture in OpenGL. Can you give an example of how to do this, explaining the various limitations of the extension in a way that mere mortals can comprehend?" Questions along the lines of "Can OpenGL do ?" are also acceptable. If you have a question specific to how Torque uses OpenGL, feel free to email me. If there are a lot of questions specific to how Torque uses OpenGL, I may start a similar thread in the private forums.

On a final note, please do not get this thread off track. Do not turn it into a flame war over D3D vs. OpenGL. In fact, I will not answer "Which is better, OpenGL or D3D?". That's a decision you have to make yourself based on your target audience, what your game requires, what you know, and what you are willing to learn.

Here's a start.

Q1: What is OpenGL?
A1: OpenGL is an open source crossplatform API for hardware accelerated rendering of 2D and 3D images.

Q2: Who controls OpenGL?
A2: OpenGL is currently controlled by the Architecture Review Board (ARB) which is composed of representatives from numerous corporations including IBM, 3Dlabs, SGI, Apple, ATI, NVIDIA, Microsoft, and Intel. However, by the end of this year, the ARB will merge with the Khronos group, creators of OpenGL ES and the Collada file format.

Q3: Why would I want to use OpenGL?
A3: There are numerous reasons you would want to use OpenGL in your game. OpenGL is the only crossplatform 3D graphics API, so if you need/want Mac or Linux support, OpenGL is the way to go.

Many people find OpenGL easier to use than Direct3D.

OpenGL has far better support for legacy code than Direct3D (in fact, code written for OpenGL 1.0 works fine with the OpenGL 2.0 headers).

In SOME cases, OpenGL may be faster than Direct3D for your game.
Page«First 1 2 Next»
#21
07/27/2006 (9:13 pm)
TDN article is here, and a TDN article for shaders is also available here.

So, ya, make any corrections or changes you think need to be made. Add questions and answers. Use the wiki! Feel free to post questions or answers or discuss said questions and answers in this thread though. Two way discussion is much better than reading an FAQ.
Page«First 1 2 Next»