Archive for the ‘Qt’ Category

Using FBOs instead of pBuffers in Qt 5

February 10, 2013

In Qt 4 lifetime it was possible to accelerate QPainter drawing with OpenGL by using the QGLPixelBuffer class: it offered a nice and quick way of creating a drawable surface, rendering to it (using ordinary QPainter methods) and grabbing the final result as a QImage.

In Qt 5 QGLPixelBuffer is still there, but it has been deprecated in favour of Framebuffer Objects, wrapped in Qt by the QOpenGLFramebufferObject class. However, QOpenGLFramebufferObject is not a QPaintDevice, therefore we can’t use a QPainter directly on it.



QHash randomization merged!

April 14, 2012

Some minutes ago the patch that made QHash effectively randomised landed in the api_changes branch (you can find it here).

Many thanks to all the people involved in reviewing and staging my patches!

The whole series involves minor API breaks (i.e.: if you declared qHash(T) for some type T, instead of properly #include the right header, then your code may stop to compile) but significant ABI breaks (QHash<int, T>, and therefore QSet<int> memory layout did change).

And, obviously, a significant behaviour change: the order of iteration upon a QHash can change in every run of your program.

So: remember to recompile all of your software if you’re using api_changes (you should already be doing this), as well as the next time api_changes gets merged into master!

For the more curious, here you are the individual changes (linking to the commits on gitorious):


April 7, 2012

The Qt 5.0 alpha was released just a few days ago (what you’re waiting for? Grab the tarball and test it!).

Amongst the thousands of changes, let me introduce you the class I’ve worked on in my spare time during the last months:



Hash changes in Qt 5

April 6, 2012

Back in 2003 Crosby and Wallach figured out that certain implementation of hash tables were vulnerable to a family of DOS attacks.