Skip to content

Commit

Permalink
Merge pull request #839 from castano/ic-gl-debug-bit
Browse files Browse the repository at this point in the history
Create GL context with DEBUG_BIT set when SOKOL_DEBUG is defined.
  • Loading branch information
floooh committed Nov 10, 2023
2 parents 3315fcd + ae83e42 commit cbebbcb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sokol_app.h
Original file line number Diff line number Diff line change
Expand Up @@ -2499,6 +2499,7 @@ typedef struct {
#define WGL_STENCIL_BITS_ARB 0x2023
#define WGL_DOUBLE_BUFFER_ARB 0x2011
#define WGL_SAMPLES_ARB 0x2042
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
Expand Down Expand Up @@ -6860,7 +6861,11 @@ _SOKOL_PRIVATE void _sapp_wgl_create_context(void) {
const int attrs[] = {
WGL_CONTEXT_MAJOR_VERSION_ARB, _sapp.desc.gl_major_version,
WGL_CONTEXT_MINOR_VERSION_ARB, _sapp.desc.gl_minor_version,
#if defined(SOKOL_DEBUG)
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB | WGL_CONTEXT_DEBUG_BIT_ARB,
#else
WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,
#endif
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
0, 0
};
Expand Down

0 comments on commit cbebbcb

Please sign in to comment.