// shortcut to add OpenGL errors detected by this emulation:
#define INSERT_API_ERROR( e, m ) KHR_DEBUG_EMULATOR_lastGLError = e; KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, e, GL_DEBUG_SEVERITY_HIGH, -1, m );
// we will never get here if the debug context is real in the first place!
KHR_DEBUG_EMULATOR_DebugMessageInsert_internal(GL_DEBUG_SOURCE_API,GL_DEBUG_TYPE_PERFORMANCE,0,GL_DEBUG_SEVERITY_NOTIFICATION,-1,"Note: Application is not running in a real debug context, debug context behaviour is only simulated in a slow way!");