PDA

View Full Version : opengl commands



sajis997
15th December 2014, 19:03
Hi forum,

I have two class objects that are both subclass of QOpenGLFunctions_4_3_Compatibility . I am doing it because i opengl functions are used in both of these classes. Is that a good design process. Is there any better option ?

I was thinking of creating a singleton instance of the QOpenGLFunctions_4_3_Compatibility class and call the initializeOpenGLFunctions() once. Then use this singleton instance across separate classes that need to call opengl draw commands, intead of calling the initialization separately for each class that are subclass of QOpenGLFunctions_4_3_Compatibility.

What do you folks think ?


Thanks