PDA

View Full Version : opengl and multitasking



giugio
7th June 2014, 19:29
hello.
I would create a little game engine editor with qt and his interface.
I saw that there are a lot of classes that encapsulating gl functions , from the gl 2.0 to gl 4.
I would like to use the 3.2 gl version but there is something like multitasking(I'm a newbie of qt)with makecurrent, context ecc....
I have created for another interface system (mfc) a lot of classes for my gl purpose and now i would translate to qt 5.3.
Is realy a multitansking?
there is some documentation of these contexts and how use them?
I tried to do some debugging with gdebugger and i see these contexts ,
what are they? are used to increase performance?

i For example i have a shader class that does all the stuff related to the shader , but for me is impossible to call the gl functions in these classes because i get an error for each call to the gl function(i created an instance of the container of the gl functions and initialized).I suppose that this error is related to the multitasking
Is possible not use multitasking or if is not too difficult learn to use it?
links?
Thanks.

anda_skoa
8th June 2014, 08:48
Qt does support multithreaded OpenGL if the platform integration plugin does, which is true for most platforms.

As for using an QOpenGLContext with threads see http://qt-project.org/doc/qt-5/qopenglcontext.html#thread-affinity

Cheers,
_