View Full Version : graphicsview & opengl version 1.4 problem

14th September 2010, 17:56
Hello, friends.

Sorry for my English in this post ;)

I'm writing application, which uses qgraphicsview with opengl render to show map and objects on it. As it said in docs:
" To render using OpenGL, simply call setViewport(new QGLWidget). QGraphicsView takes ownership of the viewport widget."

It works fine as i thought :(

Part of code looks like this:

scene = new QGraphicsScene(this);

view = new QGraphicsView(scene);
view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
view->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded );

view->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
view->setViewportUpdateMode(QGraphicsView::FullViewportU pdate);

/* add map to scene... */

/* sdd some items */
scene->addWidget(new mapObject("test1", type, scene));
scene->addWidget(new mapObject("test2", type, scene));

*look at pic1 to see how it looks when it works *

Everything works fine on my machine. But then i've tested program on netbook with graphic card, which support only opengl version 1.4. And here begun problem...

I used to disable SampleBuffers because netbook's video card don't support it.

*look at pic2, which shows my problem, but i forgot it at work so i had to made it in paint :D *

This happen when i call windows task manager or hibernate or "sleep" netbook... But when i resize, maximaze or minimaze window graphicsview repaint itself and works fine until next taskmanager or hibernate :(

Also i had problem with starting my application... After adding item on scene, it turns to black, but this was fixed by calling updateGL() after creating graphicsview....maybe it's not right...

Can u give me any advice, please? maybe i'm doing something wrong?

ps. works fine on win7 with nvidia 260gt, works bad on intel 945 integrated video on my netbook =(((

14th September 2010, 17:59
I would say the OpenGL implementation on your netbook is broken.

14th September 2010, 18:03
Do u think so?
I'll try to test on another netbook in an hour and post here results....
anyway thanks:)

15th September 2010, 08:20
have just tested app on 2 netbooks with same Intel 945 chipset on win7...One works fine, other have problem with opengl :(
Maybe problems in drivers?