From 0f34d7be2cdb18084e0abcb48b5664601c98fd03 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 29 May 2014 14:11:26 +0000 Subject: [PATCH] Fix for depth_component16, 24, 32 in get_external_image_format --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 38c82c3596..aadc09e121 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -6303,6 +6303,9 @@ get_external_image_format(Texture *tex) const { switch (tex->get_format()) { case Texture::F_color_index: case Texture::F_depth_component: + case Texture::F_depth_component16: + case Texture::F_depth_component24: + case Texture::F_depth_component32: case Texture::F_depth_stencil: // This shouldn't be possible. nassertr(false, GL_RGB); @@ -6401,6 +6404,9 @@ get_external_image_format(Texture *tex) const { return GL_COLOR_INDEX; #endif case Texture::F_depth_component: + case Texture::F_depth_component16: + case Texture::F_depth_component24: + case Texture::F_depth_component32: return GL_DEPTH_COMPONENT; case Texture::F_depth_stencil: return _supports_depth_stencil ? GL_DEPTH_STENCIL_EXT : GL_DEPTH_COMPONENT;