What version of OpenGL is supported?
Thank you.
What version of OpenGL is supported?
Thank you.
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...rmance-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?
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.
Qt Code:
void CGL3dRenderedItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter->beginNativePainting(); if (_RenderRequired) Render(scene()); glMultMatrixf(GetItemTransformation()); glCallList(displaylist); painter->endNativePainting(); }To copy to clipboard, switch view to plain text mode
HIH
Johannes
uj (28th January 2010)
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.
Last edited by uj; 28th January 2010 at 12:44.
Exactly
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
Bookmarks