From c5e0c2e3f869b53fa4e53e1c4deb401d79db08de Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 2 May 2023 11:53:52 +0200 Subject: rhi: gl: Skip useless glEnable for point sprites in core profiles Might fail with invalid enum in core profile contexts. The behavior is the same regardless. Pick-to: 6.5 6.2 Fixes: QTBUG-113289 Change-Id: I5e5764494be3c5f37537f5f9b3b5311d9c49def4 Reviewed-by: Giuseppe D'Angelo --- src/gui/rhi/qrhigles2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 666395437a..d0a0c0a870 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -956,7 +956,8 @@ bool QRhiGles2::create(QRhi::Flags flags) if (!caps.gles) { f->glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); - f->glEnable(GL_POINT_SPRITE); + if (!caps.coreProfile) + f->glEnable(GL_POINT_SPRITE); } // else (with gles) these are always on // Match D3D and others when it comes to seamless cubemap filtering. -- cgit v1.2.1