Using QOpenGLFunctions properly
I have in my little 3D engine a lot of objects that deal with OpenGL functions like glVertex3fv glBindTexture and etc...
Every object in it´s members use a different openGL function, for example, a mesh call functions to render a vetice, a texture call bindtexture to enable the texture and so on...
Looking at the documentation of Qt we have to help us a QOpenGLFunctions object, where we can "encapsulate" all openGL function helping us to "Map" the correct OpenGL functions that are avaliable on the current enviroment.
What is the best way to use this?
Deriving my 3D classes from this class and using the objects exactly as i use today?
My concern is about to be able know if the "target" machine will be able to run the opeGLFunctions i´m using.
Anyone here do something like that?
Just to give another example:
If i have 2 classes derived from QOpenGLFunctions class :
and one OpenGLWindow that create the OpenGLContext and i call initializeOpenGLFunctions() using this context.
when my objects starts call the openGLfunctions it´s a valid approach?