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>
bb10
Laszlo Agocs 2019-08-12 10:15:59 +02:00
parent 959ff0d378
commit cbd695a295
1 changed files with 7 additions and 2 deletions

View File

@ -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;