i have my image data in an array.i want to load it onto the back buffer.it tried a number of ways..including creating a plain surface and then trying the D3DXLoadSurfaceFromFileInMemory() function. But when i pass the pointer to the array the function fails.Can i pass the array pointer directly to this function?
or should i may be create an HBITMAP object from this array before passing it to this function?....or is there any other easier way for loading my backbuffer with this image data....HELP!!!
image data in memory--how to load it into back buffer??
Started by celu, Nov 23 2006 02:48 PM
3 replies to this topic
#1
Posted 23 November 2006 - 02:48 PM
#2
Posted 23 November 2006 - 05:49 PM
Just lock the backbuffer to get a pointer, then copy the image data directly into it.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 23 November 2006 - 05:51 PM
You can only copy to backbuffer from renderttarget textures with StretchRect (or from plain surface, but the dimensions must be the same).
#4
Posted 23 November 2006 - 06:42 PM
unless you have a very good reason to do it with the CPU, load the image into a texture and blit it onto the backbuffer.
That'll be a lot faster.
That'll be a lot faster.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












