mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fix. Restore depth stencil surface.
This commit is contained in:
parent
cce4f2195e
commit
46ada8c264
@ -1706,14 +1706,12 @@ fill_d3d_texture_pixels(DXScreenData &scrn) {
|
||||
IDirect3DSurface9 *depth_stencil_surface;
|
||||
|
||||
// turn off depth stencil when clearing texture if it exists
|
||||
depth_stencil_surface = 0;
|
||||
if (device -> GetDepthStencilSurface (&depth_stencil_surface) == D3D_OK) {
|
||||
if (device -> SetDepthStencilSurface (NULL) == D3D_OK) {
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
depth_stencil_surface = 0;
|
||||
}
|
||||
|
||||
if (device -> SetRenderTarget (0, surface) == D3D_OK) {
|
||||
DWORD flags;
|
||||
@ -1727,6 +1725,7 @@ fill_d3d_texture_pixels(DXScreenData &scrn) {
|
||||
|
||||
// restore depth stencil
|
||||
if (depth_stencil_surface) {
|
||||
device -> SetDepthStencilSurface (depth_stencil_surface);
|
||||
depth_stencil_surface -> Release();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user