From 2b0571ee92602bf24a07df8c9ef0587ea0b4e11a Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 31 Aug 2021 15:37:21 +0200 Subject: [PATCH] glgsg: Also pick up glClearTexSubImageEXT in OpenGL ES 2+ --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 5c065b6a9b..d850364fe1 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -1108,10 +1108,12 @@ reset() { if (has_extension("GL_EXT_clear_texture")) { _glClearTexImage = (PFNGLCLEARTEXIMAGEEXTPROC) get_extension_func("glClearTexImageEXT"); + _glClearTexSubImage = (PFNGLCLEARTEXSUBIMAGEEXTPROC) + get_extension_func("glClearTexSubImageEXT"); - if (_glClearTexImage == nullptr) { + if (_glClearTexImage == nullptr || _glClearTexSubImage == nullptr) { GLCAT.warning() - << "GL_EXT_clear_texture advertised as supported by OpenGL runtime, but could not get pointers to extension function.\n"; + << "GL_EXT_clear_texture advertised as supported by OpenGL runtime, but could not get pointers to extension functions.\n"; } else { _supports_clear_texture = true; }