From 45ac5029c00209aacbbbed88d311d0033c21034b Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 6 Dec 2022 16:53:51 +0100 Subject: [PATCH] glgsg: Fix compile error with OpenGL ES 1 Introduced by 2c9deaaaf06fba7b4d5f71e9e75cd4919aa5a18e --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 3e22c98eb3..1b0190ab93 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -11623,6 +11623,9 @@ set_state_and_transform(const RenderState *target, if (_target_rs->get_attrib(texture_slot) != _state_rs->get_attrib(texture_slot) || !_state_mask.get_bit(texture_slot)) { PStatGPUTimer timer(this, _draw_set_state_texture_pcollector); +#ifdef OPENGLES_1 + determine_target_texture(); +#else if (has_fixed_function_pipeline() || _current_shader == nullptr || _current_shader == _default_shader) { @@ -11634,6 +11637,7 @@ set_state_and_transform(const RenderState *target, _target_tex_gen = (const TexGenAttrib *) _target_rs->get_attrib_def(TexGenAttrib::get_class_slot()); } +#endif do_issue_texture(); // Since the TexGen and TexMatrix states depend partly on the particular