[Interest] Using OpenGL with Qt

Agocs Laszlo Laszlo.Agocs at digia.com
Mon Mar 17 10:01:09 CET 2014


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: interest-bounces+laszlo.agocs=digia.com at qt-project.org [interest-bounces+laszlo.agocs=digia.com at qt-project.org] on behalf of Yves Bailly [yves.bailly at sescoi.fr]
Sent: Monday, March 17, 2014 9:47 AM
To: interest at qt-project.org
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
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list