Results 1 to 16 of 16

Thread: QGLWidget 2d painting performance

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QGLWidget 2d painting performance

    Try modifying the demo so that it draws some pixmap on each chip.

  2. #2
    Join Date
    Jan 2008
    Posts
    11
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QGLWidget 2d painting performance

    Quote Originally Posted by wysota View Post
    Try modifying the demo so that it draws some pixmap on each chip.
    I will try that later on.

    Another interesting detail is that a drawPixmap() takes half of the time than a bindTexture() does, which could either mean that drawPixmap does not make a texture conversion or bindTexture() has lots of overhead... or both

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

    Default Re: QGLWidget 2d painting performance

    You can take a look at sources of the gl paint engine and check it out yourself.

  4. #4
    Join Date
    Jan 2008
    Posts
    11
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QGLWidget 2d painting performance

    Quote Originally Posted by wysota View Post
    You can take a look at sources of the gl paint engine and check it out yourself.
    Well, I had a closer look at drawPixmap in class QOpenGLPaintEngine and indeed, they convert a QPixmap into a texture using bindTexture. But under certain circumstances they use the GL_TEXTURE_RECTANGLE_NV instead of GL_TEXTURE_2D option for binding, which seems to make the performance difference. Unfortunately in my code, this does not work (can't bind the texture). Has anyone experience on this?

    Still I'd like to avoid this caching behavior, is there any way to avoid this and do a "normal" drawPixmap as QWidget does?

    While playing around with QGLWidget I experienced a possible Qt bug. I'm using a QStackedWidget and 3 Widgets( 2 different views and a transition GLWidget). When I switch from the GLWidget to the new view, the former view is shown for one frame. But no paintevent is called in the old view. Looks like there's some old data in the video memory of the graphic card or something like that. Anyone experienced the same or knows how the get around this?

    Regards,
    André
    Last edited by amnesiac; 28th January 2008 at 14:22.

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
  •  
Qt is a trademark of The Qt Company.