diff --git a/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.cpp b/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.cpp index 8da241a02ea906a903b8742b08ca3c812e99e00f..afa7126f7499db695f9a5f731a0b5a23eb26f4bc 100644 --- a/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.cpp +++ b/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.cpp @@ -33,3 +33,8 @@ std::ostream& OpenGLError::log() { return g_log.error(); } + +std::ostream& OpenGLError::logDebug() +{ + return g_log.debug(); +} diff --git a/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.h b/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.h index cdeb10d98f2ca333a20654e82d640597988998f8..c5e63188a828b6325d5725d70a9a11ba5006b648 100644 --- a/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.h +++ b/MantidPlot/src/Mantid/InstrumentWidget/OpenGLError.h @@ -16,6 +16,8 @@ public: static bool check(const std::string& funName); static bool hasError(const std::string& funName){return check(funName);} static std::ostream& log(); + static std::ostream& logDebug(); + private: std::string m_msg; }; diff --git a/MantidPlot/src/Mantid/InstrumentWidget/ProjectionSurface.cpp b/MantidPlot/src/Mantid/InstrumentWidget/ProjectionSurface.cpp index 1c6a0052da5fb529510990d2b153790c8ae3dee3..37a85ee1cfdd7f02149a70bff5c8a43c632989ad 100644 --- a/MantidPlot/src/Mantid/InstrumentWidget/ProjectionSurface.cpp +++ b/MantidPlot/src/Mantid/InstrumentWidget/ProjectionSurface.cpp @@ -220,7 +220,8 @@ void ProjectionSurface::draw(MantidGLWidget *widget,bool picking)const getController()->onPaint( painter ); painter.end(); // Discard any error generated here - glGetError(); + GLuint ecode = glGetError(); + OpenGLError::logDebug() << "Discarding OpenGL error: " << gluErrorString(ecode); } }