Added MacroglDebug wrapper for automatic detection of errors after the OpenGL calls