Results 1 to 5 of 5

Thread: Qwt canvas using QGLWidget?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: Qwt canvas using QGLWidget?

    Quote Originally Posted by alex_sh View Post
    Is it possible to use Qwt on top of QGLWidget?
    No.

    Some time ago I played with an OpenGL plot canvas and for a couple of situations things were faster, for others it was slower. The main reason for this surprising result was that in combination with OpenGL the canvas got only update requests for its complete size ( also incremental painting is not possible at all. ) But this is a couple of years ago - maybe things have improved since then.

    I decided to implement an optional OpenGL canvas not before Qt3 support has been dropped. So it is on my TODO list now - but not for Qwt 6.0 anymore.

    Since QwtPlotCanvas serves as a QPainter for all the plot items, maybe it would be possible to use QGLWidget in there somewhere?
    The plot canvas itsself is no problem at all - it's more about organizing its backing store ( paint cache ), that can't be a QPixmap then.

    I'm asking because our custom plot items are rendering quite slowly, and maybe (I'm not sure, but just maybe) GL-based rendering would be faster?
    I don't know about your plot items, but in general it's more effective to avoid painting instead of trying to accelerate it. Often weeding and clipping or other optimizations for your specific situation are more important.

    When you are talking about raster items with a certain resolution almost all time should be lost in the image composition ( that needs to be done by the CPU ). Here using OpenGL would have no notable effect at all - better try to improve the image composition.

    Uwe

  2. The following user says thank you to Uwe for this useful post:

    alex_sh (28th January 2011)

Similar Threads

  1. Canvas in QT
    By chandan in forum Newbie
    Replies: 5
    Last Post: 11th April 2011, 04:46
  2. how to save canvas
    By doss in forum Newbie
    Replies: 1
    Last Post: 18th April 2009, 22:15
  3. style widget on canvas (qgv)
    By valtovar in forum Qt Programming
    Replies: 1
    Last Post: 30th October 2008, 00:31
  4. menu on right click on canvas
    By quickNitin in forum Newbie
    Replies: 4
    Last Post: 8th October 2006, 12:09
  5. Canvas problems
    By Tommytrojan in forum Qt Programming
    Replies: 22
    Last Post: 9th May 2006, 16:46

Tags for this Thread

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.