mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Fix for when clearing non 2D textures.
This commit is contained in:
parent
8b08531496
commit
75a7b1226a
@ -98,6 +98,7 @@ create_texture(DXScreenData &scrn) {
|
||||
DWORD target_bpp = get_bits_per_pixel(get_texture()->get_format(), &num_alpha_bits);
|
||||
DWORD num_color_channels = get_texture()->get_num_components();
|
||||
|
||||
// printf ("format = %d \n", get_texture()->get_format());
|
||||
// printf ("target_bpp %d, num_color_channels %d num_alpha_bits %d \n", target_bpp, num_color_channels, num_alpha_bits);
|
||||
|
||||
//PRINT_REFCNT(dxgsg9, scrn._d3d9);
|
||||
@ -1427,6 +1428,7 @@ fill_d3d_texture_pixels(bool supports_automatic_mipmap_generation, IDirect3DDev
|
||||
if (get_texture()->get_render_to_texture()) {
|
||||
HRESULT result;
|
||||
|
||||
if (_d3d_2d_texture) {
|
||||
// clear render to texture
|
||||
IDirect3DSurface9 *surface;
|
||||
|
||||
@ -1455,6 +1457,7 @@ fill_d3d_texture_pixels(bool supports_automatic_mipmap_generation, IDirect3DDev
|
||||
|
||||
surface -> Release();
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user