Results 1 to 2 of 2

Thread: OpenGL 2D drawing problem

  1. #1

    Default OpenGL 2D drawing problem

    We are trying to speedup our implementation of 2D drawing with GLWidget extension, however the result of GLWidget implementation is very very poor ...

    We changed QWidget to QGLWidget but kept the paintEvent implementation

    Maybe we have to change more intructions?

    Thank you in advance

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: OpenGL 2D drawing problem

    Typically when using QGLWidget you want to do your painting (OpenGL calls) in paintGL method.
    If you have done all your painting stuff in paintEvent and simply changed the QWidget to QGLWidget I don't really see why there should be performance boost, I'd rather expect the opposite.
    It would be easier to say more if we could actually see some of your code, and explanation what are you painting in your paintEvent.
    QGLWidget is used to provide possibility to render OpenGL graphics - basically a scene consisting of primitives.

Similar Threads

  1. Problems with Qt OpenGL drawing a textured Quad
    By Halcom in forum Qt Programming
    Replies: 1
    Last Post: 26th October 2010, 13:27
  2. drawing into QImage with OpenGL
    By produktdotestow in forum Qt Programming
    Replies: 2
    Last Post: 23rd July 2010, 14:10
  3. Flickering when drawing Qt widgets over an OpenGL window
    By ksierens in forum Qt Programming
    Replies: 0
    Last Post: 31st May 2010, 15:31
  4. Mouse Drawing in opengl
    By sdastagirmca in forum Qt Programming
    Replies: 1
    Last Post: 15th October 2009, 10:32
  5. drawing in opengl
    By sdastagirmca in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2009, 15:26

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.