Learning OpenGL

Started by
6 comments, last by crazyben21 12 years, 5 months ago

[font="Arial"]Hi, I just signed up to the forum. My name is Benjamin and is nice to be here.
[/font][font="Arial"][/font]


[font="Arial"]I'm starting reading tutorials about OpenGL. Do I have to worry about OpenGL Extension when I start learning it?[/font]
[font="Arial"]Thank You[/font]
Advertisement
nope, extensions are just like advanced functions. You start with the basics and move to the advanced.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

I'd disagree. The kind of OpenGL that you learn without extensions is not the kind of OpenGL that you'd use in a real program. Furthermore, you'll run the risk of picking up some incredibly bad habits from it. And finally, you'll be extremely limited in how much use you'll be able to make out of any tutorial and learning material out there. Fortunately there are libraries available like GLEW that will "worry about extensions" for you, so that's my recommendation: download GLEW, link to it, and problem solved.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

You can learn GL 1.1 if you want. There is nothing wrong with knowing how things use to be. It is sort of a like lesson in history of the OpenGL API.

You should still be aware that a lot has changed since GL 1.1
Now, everthing is done with shaders (vertex shader and fragment shader at minimum. There are also geometry and tesselation shaders), IBO/VBO, VAO, texture buffer object, uniform buffer object, texture layers, FBO, etc.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
<br />You can learn GL 1.1 if you want. There is nothing wrong with knowing how things use to be. It is sort of a like lesson in history of the OpenGL API.<br /><br />You should still be aware that a lot has changed since GL 1.1<br />Now, everthing is done with shaders (vertex shader and fragment shader at minimum. There are also geometry and tesselation shaders), IBO/VBO, VAO, texture buffer object, uniform buffer object, texture layers, FBO, etc.<br />


Doesn't OpenGL 4.2 includes some extension?
An extension is a feature that is not part of the GL core.

There are many extensions that are not part of the core and never will be such as those that start with WGL or GLX. Those are platform (Windows or *nix) specific extensions.
Some features start as extensions and then get absorbed into the core but they never remove the extension from the extension string for backwards compatibility reasons.
Such as VBO which went into the core in GL 1.5

Some extensions are vendor/GPU specific. These might never make it to core either. It depends.

As for the GL core, it is published on opengl.org. You can go to the top and click on Documentation > Specification
It isn't a tutorial but it describes the features.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Well I'm assuming this guy doesnt really know what a pixel shader is or a VBO. Any tutorial that you learn from opengl will advance your knowledge of opengl. You can either search for opengl 4.0 if you want to learn the latest, but you can do all the same stuff in 2.0. If there is some added stuff in 4.0 that I'm skipping over, it wont matter much because there is much to learn. Any tutorial you find will be fine, and I'm not sure there are any 4.0 books/tutorials that are not strictly reference material or for people that already know 2.0 to upgrade.

To your question about extensions though, no you don't need to specifically worry about extensions, they area just added functions to opengl that do more advanced things. In 2.0 they extend 2.0 basic functions, in 4.0 they are just not called extensions anymore, they are now the basic functions in 4.0. Just start drawing triangles from whatever tutorials you get.


Another idea about extensions, if you look at DirectX, they come out with a new version like every year or two because they dont extend DX 9 or 10 or 11, they just make a new one. With opengl they just have 2.0 and then when a new feature is added, they make it an extension to 2.0. Its not all that different. 4.0 may already have extensions, and if not it will at some point yes.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal


Well I'm assuming this guy doesnt really know what a pixel shader is or a VBO. Any tutorial that you learn from opengl will advance your knowledge of opengl. You can either search for opengl 4.0 if you want to learn the latest, but you can do all the same stuff in 2.0. If there is some added stuff in 4.0 that I'm skipping over, it wont matter much because there is much to learn. Any tutorial you find will be fine, and I'm not sure there are any 4.0 books/tutorials that are not strictly reference material or for people that already know 2.0 to upgrade.

To your question about extensions though, no you don't need to specifically worry about extensions, they area just added functions to opengl that do more advanced things. In 2.0 they extend 2.0 basic functions, in 4.0 they are just not called extensions anymore, they are now the basic functions in 4.0. Just start drawing triangles from whatever tutorials you get.


Another idea about extensions, if you look at DirectX, they come out with a new version like every year or two because they dont extend DX 9 or 10 or 11, they just make a new one. With opengl they just have 2.0 and then when a new feature is added, they make it an extension to 2.0. Its not all that different. 4.0 may already have extensions, and if not it will at some point yes.


dpadam450 you assume correctly. Thank You guys for the information. Now my mind is clear and I could proceed.

This topic is closed to new replies.

Advertisement