dx8: render, take bitmap and more
HI, I'm working on an simple application and I need to render some 3D object (with zbuffer, transparency, light, ect ect) and then copy some rectangle of the backbuffer (or surface??? which is the better???) to a bitmap (16/32bit) or raw image. I'm in trouble with the color format and with the routine to read the backbuffer.
[EDIT] when I getbackbuffer the returned surface is 117x2 pixel (application works in 640x480), why???
[Edited by - besh81 on January 4, 2006 5:30:44 AM]
Where are you getting the 117x2 value from? are you querying the surfaces GetDesc() or is it based on information you get from locking it?
Locking a resource will give you the direct binary representation which you are responsible for decoding line by line (you have to take the 'stride' into account when addressing). It's difficult for us (or you) to do anything without knowing both the input and output formats.
hth
Jack
Locking a resource will give you the direct binary representation which you are responsible for decoding line by line (you have to take the 'stride' into account when addressing). It's difficult for us (or you) to do anything without knowing both the input and output formats.
hth
Jack
Is using D3DXSaveSurfaceToFile not an option?
[EDIT] Oh, this is DX8. Is that function available there? [/EDIT]
[EDIT] Oh, this is DX8. Is that function available there? [/EDIT]
Quote:Original post by sirob
Is using D3DXSaveSurfaceToFile not an option?
[EDIT] Oh, this is DX8. Is that function available there? [/EDIT]
I'm pretty sure that function was new to D3DX9, and it doesn't get mentioned in my DX8 SDK documentation file either...
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement