summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-08-18 15:38:04 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-09-02 01:08:48 +0200
commit276b3d1f8ab2f67b403e312a94c9abe6ae7b792f (patch)
tree265ae75c9cf22d5a6881a17e430f52402ffcc3d5 /vcl
parent7741e4c2e51d43b2bbced7cc25e39959cacd9cfe (diff)
extract some shared code
Change-Id: I062ea860f695189ab1d59615f1d2390710a21d44
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index 16dd5b7a9411..1bd69c221be2 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -337,5 +337,18 @@ float OpenGLHelper::getGLVersion()
return fVersion;
}
+void OpenGLHelper::checkGLError(const char* pFile, size_t nLine)
+{
+ GLenum glErr = glGetError();
+ while (glErr != GL_NO_ERROR)
+ {
+ const char* sError = OpenGLHelper::GLErrorString(glErr);
+
+ if (sError)
+ SAL_WARN("vcl.opengl", "GL Error #" << glErr << "(" << sError << ") in File " << pFile << " at line: " << nLine);
+ else
+ SAL_WARN("vcl.opengl", "GL Error #" << glErr << " (no message available) in File " << pFile << " at line: " << nLine);
+ }
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */