Fishwars: Qt’s Scaling Is Ungood

I found that using the scaled() method of the drawing surface could be replaced by a scaling factor set in QPainter to improve performance slightly. The former method creates a scaled up copy of the entire source which is then copied directly to the window, and the latter method simply scales the source as it is copied to the window. I got a little better performance again by using a QImage source rather than QPixmap, but I was still unsatisfied.

While looking for solutions I found this thread, wherein it’s suggested that X11 may be the main source of pain. I tested my program on Windows XP, and it was far faster, but the scaling was still too expensive. I’ve only scratched the surface of Qt’s API, but I like what I’ve seen so far. I don’t want to drop Qt. So even though it seems like overkill I’m going to try to use OpenGL to scale my drawing surface and deliver it to the screen.

It would be nice if I could use OpenGL to do the drawing, too, but I have a few concerns. I need pixel-perfect primitives: individual dots, lines, circles, etc. that I’m not sure OpenGL can easily deliver.

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.