diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-09-02 17:28:39 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-09-02 17:37:11 +0000 |
commit | 7164ec07ca50a9faba85cb73bcd8a734d058ec34 (patch) | |
tree | e5b3e2c41e81898d0cb93306c253c329e177fa53 /include | |
parent | 0c648002addbecbf1ff5c9b9f6aa708521e16384 (diff) |
Don't call GL debugging methods if there is no context.
Change-Id: Ie6b824953b8ad19fd1b6a146cb6bf52bbb152ef7
Reviewed-on: https://gerrit.libreoffice.org/18276
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/opengl/OpenGLContext.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index cb45973395b4..cf8bd6d0272a 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -208,9 +208,11 @@ public: OpenGLProgram* GetProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" ); OpenGLProgram* UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble = "" ); + /// Is this GL context the current context ? bool isCurrent(); static void clearCurrent(); - + /// Is there a current GL context ? + static bool hasCurrent(); /// make this GL context current - so it is implicit in subsequent GL calls void makeCurrent(); /// reset the GL context so this context is not implicit in subsequent GL calls. |