-
Confused in Graphics
Now considering a graphics application targeting only Windows for now...I think I have the options of either Direct3D or OpenGL. Based on the application requirements, it's possible to have multiple views each rendering different graphics with different settings, and these views can be embedded in dialogs or as separate views. The tricky part is resource sharing mainly textures and shaders. I want any view to be able to access the same resources...
I've checked the OpenGL widget, but I'm not sure if it's possible to either share resources of different contexts or associating all widgets with single context.
The other alternative is to create my own Direct3D rendering widget but I would love to be able to use Qt's widget drawing and selection capabilities instead of re-inventing the wheel and never match the Qt's quality and stability.
The first option if it's not possible then I'm going to implement my own OpenGL rendering stuff to support sharing resources, then I would choose D3D since it's "more stable," and I'm supporting only Windows.
What's the expert advice here?
Thanks.
-
Re: Confused in Graphics
You can associate multiple widgets with one context.
-
Re: Confused in Graphics
Did I understand your question right:
what are pluses and minuses of using OpenGl vs D3D ?
what is more compatible ?
what is more Microsoft compatible ?
can I render with D3D technology on QGLWidget ?
P.S. what did you mean of share resources ?
-
Re: Confused in Graphics
I'm aware of the pros and cons of both APIs in general. However my concern is more about usability of both within Qt. D3D is considered as an alternative to QGL in case it does not support shared resources :), and I mean that multiple GL rendering widgets can have access to the same textures and shaders created for a single GL context, instead of duplicating same resources and eating up memory.
-
Re: Confused in Graphics
Have a look at QGLWidget constructor that takes a "shareWidget" parameter and the docs for it.