21 #ifndef _STELOPENGL_HPP_ 22 #define _STELOPENGL_HPP_ 24 #include <QOpenGLFunctions> 27 # define GL(line) do { \ 29 Q_ASSERT(StelOpenGL::mainContext == QOpenGLContext::currentContext());\ 31 Q_ASSERT_X(!StelOpenGL::checkGLErrors(__FILE__, __LINE__), "GL macro", "OpenGL errors encountered");\ 34 # define GL(line) line 53 #if defined(QT_OPENGL_ES_2) 55 #define GL_DOUBLE GL_FLOAT 59 #endif // _STELOPENGL_HPP_ QOpenGLContext * mainContext
The main context as created by the StelMainView (only used for debugging)
int checkGLErrors(const char *file, int line)
Retrieves and prints all current OpenGL errors to console (glGetError in a loop)
void clearGLErrors()
Clears all queued-up OpenGL errors without handling them.
Namespace containing some OpenGL helpers.
const char * getGLErrorText(GLenum code)
Converts a GLenum from glGetError to a string.