diff options
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 8 | ||||
-rw-r--r-- | 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; |