PDA

View Full Version : Problems updating GL textures from within Qt


mstorsjo
03-23-2010, 09:06 AM
Hi,

I'm trying to draw things using OpenGL ES, within Qt, by uploading data to a texture and drawing this texture within GL.

When updating the texture, parts of it (rectangular blocks at random positions within the texture) gets corrupted. The full code to this example is attached. Updating the texture through glTexSubImage2D doesn't help, it still gets corrupted.

When dropping the exact same GL code into the SimpleGL example (at http://wiki.maemo.org/SimpleGL_example, which uses Xlib instead of Qt), no corruption is visible at all.

Am I doing anything wrong in my example app, or is this a bug in Qt?

// Martin

mstorsjo
03-23-2010, 09:12 AM
I could add that this happens with both Qt 4.5 and 4.6, on a N900 with PR 1.1.1. On desktop platforms, the code works just fine.