Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use QGLPixelBuffer or QGLFramebufferObject in QGraphicsItem paint
QtWS25 Last Chance

How to use QGLPixelBuffer or QGLFramebufferObject in QGraphicsItem paint

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    achibana
    wrote on last edited by
    #1

    As we know in QGraphicsScene and QGraphicsView, there are many QGraphicsItems. in the MyQGraphicsItem::paint(QPainter *pxPainter, const QStyleOptionGraphicsItem *pxOption, QWidget *pxWidget) implement, we use the pxPainter to draw image(QImage) or PixelMap(QPixMap). when we set the graphicsView->setViewport(new QGLWidget), we use the OpenGL paintEngine, but we can not use the QGLPixelBuffer or QGLFramebufferObject being the paintDevice. Is there any solution to support? for the QGLFramebufferObject is more efficient as described.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Student3000
      wrote on last edited by
      #2

      me have some similar problem

      Why QGLFramebufferObject in QGraphicsItem don’t work?
      "http://developer.qt.nokia.com/forums/viewthread/984/":http://developer.qt.nokia.com/forums/viewthread/984/

      1 Reply Last reply
      0
      • A Offline
        A Offline
        achibana
        wrote on last edited by
        #3

        Thanks for your referance, so we just ignore the pxPainter in the parameters and paint ourselves.

        Another issue is how to handle the zOrder of the GraphicsItems, or some composition of images.

        I'v tried bindTexture to the QGLFramebufferObject, seems not work.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved