[Development] share opengl resource
mw_triad at users.sourceforge.net
Tue Mar 31 16:32:53 CEST 2015
On 2015-03-31 10:12, Alessio Mochi wrote:
> Hello,I am reading that share opengl resource is possible with
> wglShareList. My software run on windows and mac and I would like
> know if exist some qt support to share opengl resource. I use qt
Qt 4.7 is *really* old.
If you use Qt5 and QOpenGLWidget, resources should automatically be
shared between widgets with the same parent. See the documentation for
details, and how to set up additional sharing if needed.
In Qt4, in order to share resources, you must create contexts yourself
and set them up to share. It's possible to do this without a special
'sharing context' under the covers, but code-wise it's easier to just
create a context that you never actually use except to tell your 'real'
contexts to share with it. Again, see the documentation; it explains how
to do this.
p.s. This is not the appropriate list for such questions; please ask on
interest at qt-project.org instead.
More information about the Development