From 6b675d1fbb130480725ae5ed3f3bdd995e9b336a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Fri, 17 Jul 2020 05:00:04 +0200 Subject: [PATCH 1/2] GL_POINT_SPRITE is only available for Compatibility Profiles and GLES 1.0 --- Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx index 6cd90e0306..7b834fa6e5 100644 --- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx +++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx @@ -1126,22 +1126,28 @@ void vtkOpenGLContextDevice2D::DrawPointSprites( } // We can actually use point sprites here +#ifdef GL_POINT_SPRITE if (this->RenderWindow->IsPointSpriteBugPresent()) { glEnable(GL_POINT_SPRITE); glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); } +#endif +#ifdef GL_POINT_SPRITE_COORD_ORIGIN glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); +#endif glDrawArrays(GL_POINTS, 0, n); // free everything cbo->ReleaseGraphicsResources(this->RenderWindow); +#ifdef GL_POINT_SPRITE if (this->RenderWindow->IsPointSpriteBugPresent()) { glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE); glDisable(GL_POINT_SPRITE); } +#endif if (sprite) { -- 2.27.0