Original Post
Hi, I have 4 questions for Direct3D 9 gurus: 1. How do I draw directly a memory bitmap to back buffer (like glDrawPixels) ? 2. How do I read from back buffer to a memory bitmap (like glReadPixels) ? 3. How do I upload a memory bitmap to a texture (like glTexImage2D) ? 4. How do I upload an area of the back buffer to a texture (like glCopyTexSubImage2D) ? * I refer to memory bitmap as a simple C array of uints. based on the research I have done, I think I know how to do the 4, I just want to know if I'm right or not or if there are better ways, this is what I know so far: 1. get the back buffer from the device, lock it, and write to it from memory. 2. get the back buffer from the device, lock it, and read from it to memory. 3. lock the texture, and write to it from memory. 4. get the back buffer from the device, lock it, lock the texture, and read from the back buffer to the texture. I have read that locking the back buffer hits performance, so are my answers ok, or are better ways ? Thanks!