summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-04-20 23:38:03 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-05-01 00:17:36 (GMT)
commitab0ee278362ec8bd3acbed0e98b3392aad68bef5 (patch)
tree4cca83012d163a6d99a2e04a90756bf4921f7837 /src/opengl
parent17ee6906eb726ea9b03c6c7e67448cf3d924f0f8 (diff)
downloadQt-ab0ee278362ec8bd3acbed0e98b3392aad68bef5.zip
Qt-ab0ee278362ec8bd3acbed0e98b3392aad68bef5.tar.gz
Qt-ab0ee278362ec8bd3acbed0e98b3392aad68bef5.tar.bz2
Make QGLShaderProgram::disable() static.
Reviewed-by: trustme
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglshaderprogram.cpp8
-rw-r--r--src/opengl/qglshaderprogram.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 9180c3e..55d1bda 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -1211,8 +1211,11 @@ bool QGLShaderProgram::enable()
return true;
}
+#undef ctx
+#define ctx QGLContext::currentContext()
+
/*!
- Disables this shader program in the currently active QGLContext.
+ Disables the active shader program in the current QGLContext.
This is equivalent to calling \c{glUseProgram(0)}.
\sa enable()
@@ -1227,6 +1230,9 @@ void QGLShaderProgram::disable()
#endif
}
+#undef ctx
+#define ctx d->context
+
/*!
Returns the OpenGL identifier associated with this shader program.
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index eddd447..8a54a5d 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -139,7 +139,7 @@ public:
QString log() const;
bool enable();
- void disable();
+ static void disable();
GLuint programId() const;