Results 1 to 2 of 2

Thread: Drawing the entire window at 60 fps

  1. #1
    Join Date
    Feb 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Drawing the entire window at 60 fps

    I have been looking around for quite a while now and have yet to find a satisfactory answer to the problem I have. I recently started using Qt and think its a great framework and want to use it in my next project.

    The project requires that I be able to draw the entire window at 60 fps with pixel data created by the application. I tried using a QWidget and drawing a QImage in it with a QPainter but at 60 fps it was using a ton of CPU time. So either that method is horridly slow or I did something very wrong.

    I have seen a few other methods talked about but before I go attempt any more prototypes I would like to get some opinions of people highly experienced with Qt. I was looking into opengl as a solution but have not used the api in years but I assume I would need to use textures but I don't know how efficient that would be.

    To reiterate, the question is how would you redraw the entire window in Qt at 60fps with as little performance impact as possible?

    Thanks for your time.

  2. #2
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Drawing the entire window at 60 fps

    How is the pixel data of one frame related to the data of the next? Is your graphics card/cpu otherwise good enough to render textures at 60 fps, e.g. in first-person shooters? Basically I see two solutions: 1) Buffering and 2) textures. I've never done anything like this with Q* objects but if you are able to create the QPixmaps etc. in advance and put them into a container then at swap time all that will remain is the drawing to the framebuffer. On the other hand, if identifiable transformations (translate, rotate, etc.) govern the relationship between one frame and the next, then you can indeed create an OpenGL and use the powerful set of tools it gives you to manipulate them on a frame by frame basis, without having to reinvent the wheel every time.

    Matt

Similar Threads

  1. How to display entire directory(Filesystem)
    By deepakn in forum Newbie
    Replies: 11
    Last Post: 10th November 2009, 10:58
  2. Regarding drawing on Transparent Window
    By Shalabh in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2007, 11:32
  3. Building the entire project
    By vermarajeev in forum Qt Programming
    Replies: 14
    Last Post: 28th February 2007, 04:00
  4. Qprocess...hanging entire application!!!!
    By nupul in forum Qt Programming
    Replies: 5
    Last Post: 10th May 2006, 15:24
  5. Accessing the entire file..
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 28th April 2006, 08:41

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.