diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index b167f1baa8..8df6b605bb 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -613,6 +613,8 @@ reset() { get_extension_func("glDebugMessageControlARB"); _supports_debug = true; #endif + } else { + _supports_debug = false; } if (_supports_debug) { @@ -12778,7 +12780,9 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, int width = tex->get_expected_mipmap_x_size(n); int height = tex->get_expected_mipmap_y_size(n); +#ifndef OPENGLES_1 int depth = tex->get_expected_mipmap_z_size(n); +#endif #ifdef DO_PSTATS _data_transferred_pcollector.add_level(view_size); @@ -12958,7 +12962,9 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload, int width = tex->get_expected_mipmap_x_size(n); int height = tex->get_expected_mipmap_y_size(n); +#ifndef OPENGLES_1 int depth = tex->get_expected_mipmap_z_size(n); +#endif #ifdef DO_PSTATS _data_transferred_pcollector.add_level(view_size); diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index ac9b28e784..94adf2f6a8 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -2612,8 +2612,8 @@ update_shader_texture_bindings(ShaderContext *prev) { } size_t num_textures = _shader->_tex_spec.size(); - GLuint *textures; - GLuint *samplers; + GLuint *textures = nullptr; + GLuint *samplers = nullptr; #ifdef OPENGLES static const bool multi_bind = false; #else