[Qt-interest] Painting on QGLPixelBuffer

Andrea Franceschini therealmorpheu5 at gmail.com
Mon Mar 9 17:09:01 CET 2009


Here I am again. First of all I had to stick with the PixelBuffer
because the Framebuffer didn't work even for me, I don't want to know
if it works on the test platform... (ok, sidenote: I have a fairly
recent video card -- ATI X300 with closed source drivers under Linux
-- and FramebufferObject reported being supported but segfaulted: I
didn't even try to make it work).

Anyway here's some code for those of you who still have patience :)
http://pastebin.com/m406d507
http://pastebin.com/m337a8977

Although it seems to work somehow, the only thing that the helper
class at line 90 in Viewport.cpp seems to be able to do is
fillRect(QRect, QColor). And even by commenting out line 90 and making
the painting outside of the helper, the only thing I can do is
fillRect and only rects of the exact size of the PixelBuffer.

Yet, while modifying the plain and simple PixelBuffer (1, not 2, the
one with spinning greenish cubes) example, I've been able to paint
things on the texture. I've been checking and, as far as I understand
the procedures and OpenGL (actually very few) it seems all well
arranged. What am I missing, then?

PS: Sorry Arnold. Thanks for notifying me :)

--
Andrea



More information about the Qt-interest-old mailing list