mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Fix for depth_component16, 24, 32 in get_external_image_format
This commit is contained in:
parent
3d5118d406
commit
0f34d7be2c
@ -6303,6 +6303,9 @@ get_external_image_format(Texture *tex) const {
|
|||||||
switch (tex->get_format()) {
|
switch (tex->get_format()) {
|
||||||
case Texture::F_color_index:
|
case Texture::F_color_index:
|
||||||
case Texture::F_depth_component:
|
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:
|
case Texture::F_depth_stencil:
|
||||||
// This shouldn't be possible.
|
// This shouldn't be possible.
|
||||||
nassertr(false, GL_RGB);
|
nassertr(false, GL_RGB);
|
||||||
@ -6401,6 +6404,9 @@ get_external_image_format(Texture *tex) const {
|
|||||||
return GL_COLOR_INDEX;
|
return GL_COLOR_INDEX;
|
||||||
#endif
|
#endif
|
||||||
case Texture::F_depth_component:
|
case Texture::F_depth_component:
|
||||||
|
case Texture::F_depth_component16:
|
||||||
|
case Texture::F_depth_component24:
|
||||||
|
case Texture::F_depth_component32:
|
||||||
return GL_DEPTH_COMPONENT;
|
return GL_DEPTH_COMPONENT;
|
||||||
case Texture::F_depth_stencil:
|
case Texture::F_depth_stencil:
|
||||||
return _supports_depth_stencil ? GL_DEPTH_STENCIL_EXT : GL_DEPTH_COMPONENT;
|
return _supports_depth_stencil ? GL_DEPTH_STENCIL_EXT : GL_DEPTH_COMPONENT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user