From dfbe728badaad72d2108e12bb70e7e6dd7a2f081 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 8 Nov 2018 15:50:44 +0100 Subject: [PATCH] glgsg: fix shader point sprites when not using core-only profile --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 19594750c8..3da843c94a 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/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