[Qt-interest] When OpenGL Initialization happens? (QGraphicsScene - OpenGL glBegin/glEnd)
fungos
fungos at gmail.com
Wed Apr 15 19:52:18 CEST 2009
Ok, but when we use _only_ QGraphicsView + QGraphicsScene, it does use
QGLWidget internally? How can I then call makeCurrent when holding
only QGraphicsView and/or QGraphicsScene?
On Wed, Apr 15, 2009 at 4:45 AM, Samuel Rødal <sroedal at trolltech.com> wrote:
> fungos wrote:
>>
>> I was doing some tests with opengl in both Qt and Win32 and then I
>> found my problem. The problem is that opengl context is not
>> initialized when I try to use it inside Qt (by initializing my
>> library).
>>
>> My question now is, when opengl initialization will happen in Qt? Just
>> when I try to use my opengk QGraphicsScene inside a QGraphicsView? Is
>> there a way to initialize opengl context with QApplication
>> initialization?
>>
>> Attached are two samples using opengl, TestGL is the Qt test (using
>> QtCreator) and TestGL2 is the Win32 test (using Code::Blocks).
>>
>> Thank you
>
> As soon as you create a QGLWidget you can call makeCurrent() on that widget
> and you will then have a valid OpenGL context for issuing OpenGL commands.
>
> --
> Samuel
>
--
Animal Frontline Liberation
More information about the Qt-interest-old
mailing list