[Interest] share opengl resource

Matthew Woehlke mwoehlke.floss at gmail.com
Tue Mar 31 17:28:53 CEST 2015


On 2015-03-31 11:16, Alessio Mochi wrote:
> Actually I have two or three different rendering context (create multiple QGLWidget).
> Your solution for qt 4.7 is right for share resource (I would like share vbo between different rendering context)? 
> Can you link a qt example or documentation? 

http://doc.qt.io/qt-4.8/qglwidget.html#QGLWidget

My bad, depending on how you create your QGLWidget's, you can also tell
them to share with each other. (I wasn't using this technique, and so
wasn't recalling it offhand.)

OTOH, depending on how you create your widgets, this may not be
possible. (For example, if your widgets are defined in a .ui file,
you'll need to invoke some cleverness in your subclass ctor to either
use a global sharing context you have previously created, or else
arrange for the first one created to set itself as the share widget for
the others.)

-- 
Matthew



More information about the Interest mailing list