From 97fcbc2e15c8dd4b9c08156708b2c9e6e75f4f45 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 29 Jan 2025 11:06:57 +0100 Subject: [PATCH] glgsg: Fix error message for unhandled external formats --- 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 b29387463b..3a74f56331 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -465,7 +465,10 @@ get_external_format_components(GLint external_format) { case GL_GREEN_INTEGER: case GL_BLUE_INTEGER: case GL_ALPHA_INTEGER: + case GL_STENCIL_INDEX: #endif + case GL_DEPTH_COMPONENT: + case GL_DEPTH_STENCIL: return 1; #ifndef OPENGLES_1 @@ -523,7 +526,10 @@ copy_image(unsigned char *new_image, const unsigned char *orig_image, case GL_GREEN_INTEGER: case GL_BLUE_INTEGER: case GL_ALPHA_INTEGER: + case GL_STENCIL_INDEX: #endif + case GL_DEPTH_COMPONENT: + case GL_DEPTH_STENCIL: if (num_components == 1) { memcpy(new_image, orig_image, orig_image_size); return;