diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-08-12 10:15:59 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-08-14 12:55:15 +0200 |
commit | cbd695a295e2e12fce2ce2dda86df977bc345a51 (patch) | |
tree | 33fd62d290a003d666964e03314dae18978b6f34 | |
parent | 959ff0d378c8d31216a70bf38726deac3c7051ff (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>
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 9 |
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; |