Don't recreate the item each time you change the image. Simply set the new image on the already existing item. And create the item on stack and not on heap. Apart from that your approach seems fine (although using OpenGL for that is ok too).
Don't recreate the item each time you change the image. Simply set the new image on the already existing item. And create the item on stack and not on heap. Apart from that your approach seems fine (although using OpenGL for that is ok too).
ntp (4th March 2008)
Here is a followup. Turns out the real problem was that I wasn't allocating enough memory for the incoming image. It needed to be displayBuffer = (unsigned char*) (malloc ((w*h) * 4)); not (... * 3).
I am using Format_RGB32 but I was focusing on the RGB part and needed to allocate 32 bits and the last 8 bits are used for padding.
Bookmarks