From cbd695a295e2e12fce2ce2dda86df977bc345a51 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 12 Aug 2019 10:15:59 +0200 Subject: rhi: gl: also enable point sprites on non-ES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/gui/rhi/qrhigles2.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3