mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Added forced creation of a depth stencil surface for render to texture.
This commit is contained in:
parent
b75a855d53
commit
f3110d821c
@ -429,10 +429,17 @@ open_buffer() {
|
||||
|
||||
// ***** CREATE A DEPTH STENCIL BUFFER IF NEEDED
|
||||
|
||||
{
|
||||
/*
|
||||
HRESULT hr;
|
||||
IDirect3DSurface9 *_depth_stencil_surface;
|
||||
|
||||
hr = dxgsg -> _d3d_device -> GetDepthStencilSurface (&_depth_stencil_surface);
|
||||
if (SUCCEEDED (hr))
|
||||
{
|
||||
D3DSURFACE_DESC surface_description;
|
||||
|
||||
hr = _depth_stencil_surface -> GetDesc (&surface_description);
|
||||
if (SUCCEEDED (hr))
|
||||
{
|
||||
UINT width;
|
||||
UINT height;
|
||||
D3DFORMAT format;
|
||||
@ -440,11 +447,11 @@ open_buffer() {
|
||||
DWORD multisample_quality;
|
||||
BOOL discard;
|
||||
|
||||
width = ;
|
||||
height = ;
|
||||
format = ;
|
||||
multisample_type = ;
|
||||
multisample_quality = ;
|
||||
width = tex -> get_x_size ( );
|
||||
height = tex -> get_y_size ( );
|
||||
format = surface_description.Format;
|
||||
multisample_type = surface_description.MultiSampleType;
|
||||
multisample_quality = surface_description.MultiSampleQuality;
|
||||
discard = true;
|
||||
|
||||
hr = dxgsg -> _d3d_device -> CreateDepthStencilSurface (
|
||||
@ -453,10 +460,19 @@ open_buffer() {
|
||||
if (SUCCEEDED (hr)) {
|
||||
|
||||
} else {
|
||||
dxgsg9_cat.error ( ) << "CreateDepthStencilSurface " << D3DERRORSTRING(hr) FL;
|
||||
dxgsg9_cat.error ( ) << "GetDesc " << D3DERRORSTRING(hr) FL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dxgsg9_cat.error ( ) << "GetDepthStencilSurface " << D3DERRORSTRING(hr) FL;
|
||||
}
|
||||
|
||||
*/
|
||||
_depth_stencil_surface -> Release ( );
|
||||
}
|
||||
else
|
||||
{
|
||||
dxgsg9_cat.error ( ) << "GetDepthStencilSurface " << D3DERRORSTRING(hr) FL;
|
||||
}
|
||||
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user