PDA

View Full Version : OpenGL versions



Kozersky
1st October 2015, 21:51
Hi,

I just started learning OpenGL (in Qt environment, interested in desktop currently), and I want to cleanup this frustrating mess in my head regarding OpenGL versions.

The only thing I understand is that OpenGL ES is a subset of "normal" OpenGL (4.5), and is used for mobile platforms. So for example, here is what confuses me:

according to some sources, glBegin/glBegin and other functions are deprecated -- some say that these are deprecated only in ES, others claim that these functions are banned due to performance reasons and should not be used in new code;
I bought an OpenGL Superbible 7, but I work in Qt, so there are different APIs as I see? Where I am supposed to find Qt-related API information? In document breadcrumbs?;
where do I find information how to correctly use functions? For example -- https://en.wikibooks.org/wiki/OpenGL_Programming/Migrating_from_1.x_to_2.x, tells nicely (but not enough) what should not be used;
how am I supposed to replace glMatrixMode(GL_MODELVIEW); if that does not (does not?) work? And questions alike.
the internet is full of sources, answers and questions, obviously mostly outdated. What should I focus on? What should I avoid?
how do I distinguish OpenGL ES from "normal" OpenGL? What is absent in ES version, how do I know it?


Ideally, I would like to see sort of a list (and according explanation) of OpenGL versions.

Thank you in advance.

Radek
2nd October 2015, 07:06
(1) Google "trent reed qt5 opengl". You get a tutorial (six or so parts) which will push you forward.
(2) there is the "old OpenGL" where you paint the scene yourself using OpenGL API, and the "new OpenGL" where you paint using shaders. glBegin() and glEnd() are specific for the old OpenGL: glBegin() - paint first triangle - paint next triangle - ... - glEnd() - glFlush(). The new OpenGL does not draw this way and it does not use glBegin() and glEnd().
(3) OpenGL Superbible and similar books deal with OpenGL and not with Qt. You see the "real", platform independent, OpenGL interface.

john_god
6th October 2015, 20:23
Here ftp://ftp.informatik.hu-berlin.de/pub/Linux/Qt/QT/developerguides/qtopengltutorial/OpenGLTutorial.pdf you have a great tutorial on how to do OpenGL the Qt way. Note that by now QGLWidget class is a bit outdated, QOpenGLWidget should be used instead