Repository navigation
Conversation
- Add FLAG_GL_CONTEXT_DEBUG to request an OpenGL debug context at InitWindow(), replacing the compile-time RLGL_ENABLE_OPENGL_DEBUG_CONTEXT option that was gated to OpenGL 4.3 - Request a debug context on all platform backends: GLFW, SDL, RGFW, Win32, Android, DRM and Web - Add rlEnableDebugContext() and automatically register the debug callback when the created context exposes GL_CONTEXT_FLAG_DEBUG_BIT - Use core debug output on OpenGL 4.3+ and GL_ARB_debug_output on OpenGL 3.3 - Enable GL_DEBUG_OUTPUT only on the core OpenGL 4.3 path; the token is not part of GL_ARB_debug_output - Skip the GL_CONTEXT_FLAGS query on OpenGL 2.1 builds, where the token is not available
Owner
|
@jestarray Thanks but I prefer to keep it as a build flag for users with that very specific need. Also, raylib does not expose directly any graphics API specific flag. |
Contributor
Author
|
There are a few problems keeping it behind
I personally prefer it being a
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the compile-time
RLGL_ENABLE_OPENGL_DEBUG_CONTEXToption with a runtimeFLAG_GL_CONTEXT_DEBUGconfig flag, so applications can request an OpenGL debugcontext at
InitWindow()without rebuilding raylib.Changes
FLAG_GL_CONTEXT_DEBUG(0x00020000) toConfigFlags.Win32 (WGL), Android, DRM and Web. The WebGL hint is ignored by browsers.
rlEnableDebugContext()to register the debug callback and enablesynchronous debug output.
rlglInit()checksGL_CONTEXT_FLAGSforGL_CONTEXT_FLAG_DEBUG_BITandenables debug output automatically when the created context is a debug context.
glDebugMessageCallback/GL_DEBUG_OUTPUT) onOpenGL 4.3+, and
GL_ARB_debug_outputon OpenGL 3.3.GL_DEBUG_OUTPUTonly on the core 4.3 path. The token is not part ofGL_ARB_debug_outputand raisedGL_INVALID_ENUMon ARB-only contexts.GL_CONTEXT_FLAGSquery on OpenGL 2.1 builds, where the token isnot available.
RLGL_ENABLE_OPENGL_DEBUG_CONTEXTfromconfig.h.Usage