PDA

View Full Version : OpenGL version



uj
27th January 2010, 11:35
What version of OpenGL is supported?

Thank you.

uj
28th January 2010, 10:26
I was wondering because it's nowhere explicitly stated. Still, if you read an article like this for example,

http://labs.trolltech.com/blogs/2010/01/06/qt-graphics-and-performance-opengl/

you get the impression not every version is supported.

Many GUIs offer a minimal binding to OpenGL and then you can make any OpenGL calls you like. In this ways the GUI itself imposes no version restriction. Is Qt like that or does it offer a thicker abstraction which is limited to a certain OpenGL version?

JohannesMunk
28th January 2010, 11:25
As far as I understand this, Qt imposes no restriction. You can use whatever gl extension there is using direct opengl calls. You can make them available to you using GLee for example.

When speaking of support it basically means, what Qt itself uses, for internal handling in QPainter etc..

Sine 4.6, QPainter::beginNativePainting and QPainter::endNativePainting makes the intermixing a lot more reliable.



void CGL3dRenderedItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
painter->beginNativePainting();
if (_RenderRequired) Render(scene());
glMultMatrixf(GetItemTransformation());
glCallList(displaylist);
painter->endNativePainting();
}


HIH

Johannes

uj
28th January 2010, 12:39
Okay so basically Qt offers a window with an OpenGL binding. And you're free to make any OpenGL call you like to control it (as long as it's supported by the OpenGL driver installed on your computer).

But Qt also uses OpenGL internally to implement different features. And if you want to intermix with these you must use Qt methods and they correspond to the functionality of a certain version of OpenGL.

JohannesMunk
28th January 2010, 12:56
Okay so basically Qt offers a window with an OpenGL binding. And you're free to make any OpenGL call you like to control it (as long as it's supported by the OpenGL driver installed on your computer).
Exactly


But Qt also uses OpenGL internally to implement different features. And if you want to intermix with these you must use Qt methods and they correspond to the functionality of a certain version of OpenGL.

Sorry, I don't quite get you! If you intermix (using both Qt calls and opengl native code) you can use whatever opengls you want.

When talking of Qt support, it just means, that there are some convenience classes to handle something. For instance the support for OpenGL 2.0 Shaders was introduced with Qt4.6. So now you can (optionally!) use the more convenient QGLShader and QGLShaderProgram classes instead of glAttachShader, glLinkProgram, etc.. But you still can use the old native calls!

HIH

Johannes

uj
28th January 2010, 15:01
When talking of Qt support, it just means, that there are some convenience classes to handle something. For instance the support for OpenGL 2.0 Shaders was introduced with Qt4.6. So now you can (optionally!) use the more convenient QGLShader and QGLShaderProgram classes instead of glAttachShader, glLinkProgram, etc.. But you still can use the old native calls!


Okay I see, so "Qt support" means there are convenience classes available for specific versions of OpenGL but you can still resort to making native calls of whatever version the OpenGL driver supports.