diff --git a/panda/src/dxgsg8/wdxGraphicsBuffer8.cxx b/panda/src/dxgsg8/wdxGraphicsBuffer8.cxx index 3f1980c06d..703216a405 100644 --- a/panda/src/dxgsg8/wdxGraphicsBuffer8.cxx +++ b/panda/src/dxgsg8/wdxGraphicsBuffer8.cxx @@ -256,6 +256,7 @@ rebuild_bitplanes() { for (int i=0; iget_format() != Texture::F_depth_stencil)&& + (get_texture(i)->get_format() != Texture::F_depth_component)&& (color_tex_index < 0)) { color_tex_index = i; } else { @@ -420,6 +421,7 @@ select_cube_map(int cube_map_index) { for (int i=0; iget_format() != Texture::F_depth_stencil)&& + (get_texture(i)->get_format() != Texture::F_depth_component)&& (color_tex_index < 0)) { color_tex_index = i; } else { diff --git a/panda/src/dxgsg9/dxTextureContext9.cxx b/panda/src/dxgsg9/dxTextureContext9.cxx index e1cc08e294..d7d688cb00 100755 --- a/panda/src/dxgsg9/dxTextureContext9.cxx +++ b/panda/src/dxgsg9/dxTextureContext9.cxx @@ -2127,6 +2127,8 @@ get_bits_per_pixel(Texture::Format format, int *alphbits) { case Texture::F_rgba5: *alphbits = 1; return 16; + case Texture::F_depth_component: + return 16; case Texture::F_depth_stencil: return 32; case Texture::F_rgb5: diff --git a/panda/src/dxgsg9/wdxGraphicsBuffer9.cxx b/panda/src/dxgsg9/wdxGraphicsBuffer9.cxx index 532c494a32..93e040a26d 100644 --- a/panda/src/dxgsg9/wdxGraphicsBuffer9.cxx +++ b/panda/src/dxgsg9/wdxGraphicsBuffer9.cxx @@ -594,6 +594,7 @@ select_cube_map(int cube_map_index) { for (int i=0; iget_format() != Texture::F_depth_stencil)&& + (get_texture(i)->get_format() != Texture::F_depth_component)&& (color_tex_index < 0)) { color_tex_index = i; } else {