plugins/qpa: set deprecated functions option correctly

If a context is forward compatible, that means the deprecated functions are not
available, and if the QSurfaceFormat::DeprecatedFunctions option is set, that means
they are available.
Wrongly setting QSurfaceFormat::DeprecatedFunctions thus causes Qt to use OpenGL in
a way the context doesn't actually support.

CCBUG: 486460
This commit is contained in:
Xaver Hugl 2024-06-12 17:44:29 +02:00 committed by Vlad Zahorodnii
parent a9377db1a9
commit 280594354c

View file

@ -223,7 +223,7 @@ void EGLPlatformContext::updateFormatFromContext()
if (m_format.version() >= qMakePair(3, 0)) {
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
if (value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) {
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) {
m_format.setOption(QSurfaceFormat::DeprecatedFunctions);
}
if (value & GL_CONTEXT_FLAG_DEBUG_BIT) {