2021-11-25 01:20:17 +01:00
|
|
|
From f65cf376980777639ac5ef52364678c87f1a721f Mon Sep 17 00:00:00 2001
|
2020-07-19 00:18:35 +02:00
|
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
2021-11-25 01:20:17 +01:00
|
|
|
Date: Sun, 21 Nov 2021 22:55:13 +0100
|
|
|
|
Subject: [PATCH] GL_POINT_SPRITE is only available for Compatibility Profiles
|
|
|
|
and GLES 1.0
|
2020-07-19 00:18:35 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
2021-11-25 01:20:17 +01:00
|
|
|
index d30d61af5e..5a942bfda3 100644
|
2020-07-19 00:18:35 +02:00
|
|
|
--- a/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
|
|
|
+++ b/Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx
|
2021-11-25 01:20:17 +01:00
|
|
|
@@ -1123,20 +1123,26 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(
|
2020-07-19 00:18:35 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
|
|
|
|
+#ifdef GL_POINT_SPRITE
|
|
|
|
if (this->RenderWindow->IsPointSpriteBugPresent())
|
|
|
|
{
|
|
|
|
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE);
|
|
|
|
glDisable(GL_POINT_SPRITE);
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
if (sprite)
|
|
|
|
{
|
|
|
|
--
|
2021-11-25 01:20:17 +01:00
|
|
|
2.33.1
|
2020-07-19 00:18:35 +02:00
|
|
|
|