OpenGLComponent

It would be cool if there was the possibility to switch between OpenGL rendering and software rendering on the fly by just having some kind of method called “setUseOpenGLRender()”, so painting would not be done via regular paint() but by another function. At the moment one really is forced to write one’s component twice if one wants to have the same Component as OpenGL and as normal version. The problem goes even further if that component inherits from many other components with virtual=0 functions, …

Or is there an obvious way to make 1 single component out of OpenGLComponent and Component?

I’m not sure I follow you…? Surely writing a 3d component is so different from writing a normal one that I can’t see why you’d want it to be switchable?

Because in some applications, in the Preferences, you can turn off OpenGL or use it. One could add a global “use openGL” flag for all components. Anyway, just an idea.