summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhigles2.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-08-12 10:15:59 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-08-14 12:55:15 +0200
commitcbd695a295e2e12fce2ce2dda86df977bc345a51 (patch)
tree33fd62d290a003d666964e03314dae18978b6f34 /src/gui/rhi/qrhigles2.cpp
parent959ff0d378c8d31216a70bf38726deac3c7051ff (diff)
rhi: gl: also enable point sprites on non-ES
With GLES both point sprites and gl_PointSize in the vertex shader are implcitly enabled, but OpenGL has these as optional and must be enabled explicitly. Change-Id: I48cf6134f6bbd721cb938e2cad82d255cf4fb2cd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2.cpp')
-rw-r--r--src/gui/rhi/qrhigles2.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp
index eabc550447..4ad68d6cd0 100644
--- a/src/gui/rhi/qrhigles2.cpp
+++ b/src/gui/rhi/qrhigles2.cpp
@@ -268,6 +268,10 @@ QT_BEGIN_NAMESPACE
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
#endif
+#ifndef GL_POINT_SPRITE
+#define GL_POINT_SPRITE 0x8861
+#endif
+
/*!
Constructs a new QRhiGles2InitParams.
@@ -477,9 +481,10 @@ bool QRhiGles2::create(QRhi::Flags flags)
else
caps.textureCompareMode = true;
- if (!caps.gles)
+ if (!caps.gles) {
f->glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
- // else (with gles) this is always on
+ f->glEnable(GL_POINT_SPRITE);
+ } // else (with gles) these are always on
nativeHandlesStruct.context = ctx;