Results 1 to 4 of 4

Thread: graphicsview & opengl version 1.4 problem

  1. #1
    Join Date
    Sep 2010
    Location
    Russia, Moscow
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default graphicsview & opengl version 1.4 problem

    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:
    Qt Code:
    1. scene = new QGraphicsScene(this);
    2.  
    3. view = new QGraphicsView(scene);
    4. view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
    5. view->setDragMode(QGraphicsView::ScrollHandDrag);
    6. view->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
    7. view->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
    8.  
    9. view->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
    10. view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
    11.  
    12. /* add map to scene... */
    13. scene->addPixmap(QPixmap(mapInfo->path));
    14.  
    15. /* sdd some items */
    16. scene->addWidget(new mapObject("test1", type, scene));
    17. scene->addWidget(new mapObject("test2", type, scene));
    To copy to clipboard, switch view to plain text mode 

    *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 *

    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 =(((
    Attached Images Attached Images
    Last edited by dkoryagin; 14th September 2010 at 19:42.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: graphicsview & opengl version 1.4 problem

    I would say the OpenGL implementation on your netbook is broken.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2010
    Location
    Russia, Moscow
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview & opengl version 1.4 problem

    Do u think so?
    I'll try to test on another netbook in an hour and post here results....
    anyway thanks

  4. #4
    Join Date
    Sep 2010
    Location
    Russia, Moscow
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: graphicsview & opengl version 1.4 problem

    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?

Similar Threads

  1. OpenGL version
    By uj in forum Qt Programming
    Replies: 5
    Last Post: 28th January 2010, 15:01
  2. draw transparent buttons on top of an opengl graphicsview
    By billconan in forum Qt Programming
    Replies: 0
    Last Post: 7th November 2009, 20:38
  3. No text antialiasing with OpenGL graphicsview
    By pherthyl in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2009, 22:47
  4. graphicsview Problem
    By tampstaffs in forum Qt Programming
    Replies: 6
    Last Post: 8th February 2009, 19:59
  5. QSound Problem with GraphicsView
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 14th January 2009, 12:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.