Browse Source

glgsg: fix shader point sprites when not using core-only profile

rdb 7 years ago
parent
commit
dfbe728bad
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 3 - 3
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -11759,8 +11759,6 @@ do_issue_tex_gen() {
 
   _tex_gen_modifies_mat = false;
 
-  bool got_point_sprites = false;
-
   for (int i = 0; i < _num_active_texture_stages; i++) {
     set_active_texture_stage(i);
     if (_supports_point_sprite) {
@@ -11953,7 +11951,6 @@ do_issue_tex_gen() {
 #else
         glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
 #endif
-        got_point_sprites = true;
       }
       break;
 
@@ -11991,6 +11988,9 @@ do_issue_tex_gen() {
 #endif  // OPENGLES
   }
 
+  bool got_point_sprites = _supports_point_sprite &&
+    (_target_tex_gen->get_geom_rendering(Geom::GR_point) & GeomEnums::GR_point_sprite) != 0;
+
   if (got_point_sprites != _tex_gen_point_sprite) {
     _tex_gen_point_sprite = got_point_sprites;
 #ifdef OPENGLES