Yes, the internals are shared between shared contexts. For QOpenGLFunctions at 
least. The versioned variants are somewhat different, those are strictly 
per-context, it seems. But the rest still holds: initializeOpenGLFunctions() 
will use the same internals if there has already been a versionFunctions 
instance initialized for the same context.

Laszlo

________________________________________
From: [email protected] 
[[email protected]] on behalf of Yves 
Bailly [[email protected]]
Sent: Monday, March 17, 2014 9:47 AM
To: [email protected]
Subject: Re: [Interest] Using OpenGL with Qt

Le 17/03/2014 09:28, Agocs Laszlo a écrit :
> Some notes about QOpenGLFunctions:
>
> One QOpenGLFunctions belongs to one QOpenGLContext. Creating additional 
> instances of QOpenGLFunctions for the same context will automatically share 
> the internals behind the scenes so "it's way too much memory and time for 
> each to resolve is functions" should not be the case. Also, functions that 
> are never called are never resolved.

This is great :-) So I guess the internals are also shared between shared 
contexts?
And does this mean the QOpenGLFunctions_* default constructor will do "the right
thing", assuming there's a current context?

If that's the case, then subclassing is no longer an issue.

--
      /- Yves Bailly - Software developer   -\
      \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to