PDA

View Full Version : OpenGL surfaces frozen (QGLWidget)



ddonate
4th April 2013, 09:55
Hi,

I have a problem with QGLWidgets, and it seems to be something related to one specific Pc, since my project works properly in other Pcs.

I use:
Qt 4.8.3
Windows 7
Graphic Card: Intel GMA 3000

I can create several OpenGL surfaces, BUT when I close the last one created (that seems to be the pattern), all previously created surfaces get frozen. If then I create a new one, all of them get unfrozen and all works properly again.

For example, this code in my application works:


bool MyClass::init()
{
...
{
QGLWidget* w1 = new QGLWidget();

[do something with w1]
}

[application works, w1 is NOT frozen]
...
}

But with this code my OpenGL surfaces get frozen, since w2 is deleted...


bool MyClass::init()
{
...
{
QGLWidget* w1 = new QGLWidget();

[do something with w1]
}

{
QGLWidget w2;
}

[w1 IS frozen]
...
}


I hope someone could help me...

Thanks in advance,

Diego

wysota
4th April 2013, 10:04
I would assume you have broken OpenGL drivers for your graphics chip.

d_stranz
4th April 2013, 21:05
{
QGLWidget w2;
}


You don't really mean you're creating a QGLWidget on the stack, do you?

wysota
4th April 2013, 21:09
I think he is. The point is that the widget is created and deleted.