rendering a pixmap on a graphics object GDI+
Is there any way of efficiently rendering a simple animation thread workarea
colour indexed pixelmap (8bpp in this case) onto a visible GDI+ graphics
object.
- animation thread read/write random access to 8-bit pixelmap data.
- display thread read access only to 8-bit pixelmap for visible screen
update at selected frame rate (10fps - hardware accelerated if possible)
So far I have found that I can use DrawImage(...) however this implies
working with Image (Bitmap) objects and necessary LockBits/UnlockBits
overhead in getting direct access to the pixelmap for the animation thread.
In OpenGL I can use the glDrawPixels(...) function without any contention
between a worker animation thread and the on screen display update thread -
I was hoping that something similar was available in GDI+.
For info I have tried LockBits-ing the Bitmap at the start of the animation
and leaving the BitmapData locked indefinitely but this is obviously
disallowed...
Any suggestions will be greatly appreciated
Thanks
Steve
Date:Mon, 30 Jul 2007 13:03:23 +0100
Author:
|