Results 1 to 2 of 2

Thread: QGraphicsScene and QGLWidget issues (VBO)

  1. #1
    Join Date
    Feb 2014
    Posts
    1
    Qt products
    Qt4 Qt5

    Exclamation QGraphicsScene and QGLWidget issues (VBO)

    Hi guys,

    I have a graphicsscene with QGLWidget as viewport.
    Drawing GL scene in drawBackground.

    Yet I have several QDialogs on top, added to the scene, so I have transparency over GL scene.

    Now when I zoom in GL scene, I'd like to have it also drawn as a small preview in the corner.

    It's working fine. GL scene that is drawn in scene background uses VBO, and preview uses glBegin/glEnd.

    Yet I'd like to optimize drawing for preview. Tried to use the same gl helper class (create buffer and load it into GL memory as VBO), but I keep getting SIGSEGV after first mapping of empty buffer after glDrawArrays (glBindBuffer(xxx, 0)).

    Created another object of gl helper class, but I still get SIGSEGV, not when I call glDrawArrays for the second time.

    I assume the issue is that both scene and glwidget use the same gl context... is that correct?

    Should I use different context to be able to use VBO in graphicsscene and glwidget? Will I have to call makeCurrent() every time before drawing?
    Or what should be the approach here?

  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: QGraphicsScene and QGLWidget issues (VBO)

    Can you show a minimal compilable example reproducing the problem?
    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.


Similar Threads

  1. Replies: 4
    Last Post: 16th April 2013, 17:32
  2. Replies: 20
    Last Post: 13th June 2012, 01:19
  3. Replies: 8
    Last Post: 9th November 2010, 21:11
  4. QgraphicsScene on QGLWidget background
    By ksrini in forum Qt Programming
    Replies: 2
    Last Post: 30th October 2009, 09:57
  5. layout direction issues with QGraphicsScene
    By sanjayshelke in forum Qt Programming
    Replies: 2
    Last Post: 16th June 2009, 23:23

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.