From ab0ee278362ec8bd3acbed0e98b3392aad68bef5 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Tue, 21 Apr 2009 09:38:03 +1000 Subject: Make QGLShaderProgram::disable() static. Reviewed-by: trustme --- src/opengl/qglshaderprogram.cpp | 8 +++++++- src/opengl/qglshaderprogram.h | 2 +- 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; -- cgit v0.12