aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/shapes/qquicknvprfunctions.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/imports/shapes/qquicknvprfunctions.cpp b/src/imports/shapes/qquicknvprfunctions.cpp
index 0b92d4b4c0..409a59be7f 100644
--- a/src/imports/shapes/qquicknvprfunctions.cpp
+++ b/src/imports/shapes/qquicknvprfunctions.cpp
@@ -87,6 +87,8 @@ QSurfaceFormat QQuickNvprFunctions::format()
return fmt;
}
+#define PROC(type, name) reinterpret_cast<type>(ctx->getProcAddress(#name))
+
/*!
\return true if GL_NV_path_rendering is supported with the current OpenGL
context.
@@ -114,6 +116,10 @@ bool QQuickNvprFunctions::isSupported()
if (!ctx->hasExtension(QByteArrayLiteral("GL_NV_path_rendering")))
return false;
+ // Check that GL_NV_Path_rendering extension is at least API revision 1.3
+ if (!PROC(PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC, glProgramPathFragmentInputGenNV))
+ return false;
+
// Do not check for DSA as the string may not be exposed on ES
// drivers, yet the functions we need are resolvable.
#if 0
@@ -199,8 +205,6 @@ bool QQuickNvprFunctions::createFragmentOnlyPipeline(const char *fragmentShaderS
return true;
}
-#define PROC(type, name) reinterpret_cast<type>(ctx->getProcAddress(#name))
-
bool QQuickNvprFunctionsPrivate::resolve()
{
QOpenGLContext *ctx = QOpenGLContext::currentContext();