On 25/07/06, Stefan Dösinger stefan@codeweavers.com wrote:
I have written this function while debugging the font issue in Battlefield 1942. It writes the surface contents unmodified in a .dds file which can be read by the dxtex utility in the DirectX sdk, and a few Linux applications. It doesn't have to convert the surface's content, so it minimizes possible bugs in the dumping code. I have #if 0 -ed the code because it is only needed for debugging and can be activated as needed, but I think it can be quite useful to debug issues with compressed surfaces.
Why is this in surface_gdi.c instead of surface.c?
Am Dienstag 25 Juli 2006 16:39 schrieb H. Verbeet:
On 25/07/06, Stefan Dösinger stefan@codeweavers.com wrote:
I have written this function while debugging the font issue in Battlefield 1942. It writes the surface contents unmodified in a .dds file which can be read by the dxtex utility in the DirectX sdk, and a few Linux applications. It doesn't have to convert the surface's content, so it minimizes possible bugs in the dumping code. I have #if 0 -ed the code because it is only needed for debugging and can be activated as needed, but I think it can be quite useful to debug issues with compressed surfaces.
Why is this in surface_gdi.c instead of surface.c?
Because unlike IWineD3DSurface_SaveSnapshot it doesn't save the contents of the GL texture, but the content of the local surface memory. The opengl version of this file would read the compressed opengl data back and write it to the file.