Jelajahi Sumber

glgsg: Fix compile error with OpenGL ES 1

Introduced by 2c9deaaaf06fba7b4d5f71e9e75cd4919aa5a18e
rdb 3 tahun lalu
induk
melakukan
45ac5029c0
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 4 - 0
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) ||
   if (_target_rs->get_attrib(texture_slot) != _state_rs->get_attrib(texture_slot) ||
       !_state_mask.get_bit(texture_slot)) {
       !_state_mask.get_bit(texture_slot)) {
     PStatGPUTimer timer(this, _draw_set_state_texture_pcollector);
     PStatGPUTimer timer(this, _draw_set_state_texture_pcollector);
+#ifdef OPENGLES_1
+    determine_target_texture();
+#else
     if (has_fixed_function_pipeline() ||
     if (has_fixed_function_pipeline() ||
         _current_shader == nullptr ||
         _current_shader == nullptr ||
         _current_shader == _default_shader) {
         _current_shader == _default_shader) {
@@ -11634,6 +11637,7 @@ set_state_and_transform(const RenderState *target,
       _target_tex_gen = (const TexGenAttrib *)
       _target_tex_gen = (const TexGenAttrib *)
         _target_rs->get_attrib_def(TexGenAttrib::get_class_slot());
         _target_rs->get_attrib_def(TexGenAttrib::get_class_slot());
     }
     }
+#endif
     do_issue_texture();
     do_issue_texture();
 
 
     // Since the TexGen and TexMatrix states depend partly on the particular
     // Since the TexGen and TexMatrix states depend partly on the particular