mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 22:38:34 +00:00
Support creating debug contexts.
This commit is contained in:
parent
6b4924c844
commit
335c32d95d
@ -382,6 +382,7 @@ static bool gfx_ctx_set_video_mode(
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, g_major,
|
||||
GLX_CONTEXT_MINOR_VERSION_ARB, g_minor,
|
||||
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
GLX_CONTEXT_FLAGS_ARB, g_extern.system.hw_render_callback.debug_context ? GLX_CONTEXT_DEBUG_BIT_ARB : 0,
|
||||
None,
|
||||
};
|
||||
|
||||
|
@ -117,11 +117,18 @@ static void create_gl_context(HWND hwnd)
|
||||
#endif
|
||||
#ifndef WGL_CONTEXT_CORE_PROFILE_BIT_ARB
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x0001
|
||||
#endif
|
||||
#ifndef WGL_CONTEXT_FLAGS_ARB
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#endif
|
||||
#ifndef WGL_CONTEXT_DEBUG_BIT_ARB
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#endif
|
||||
const int attribs[] = {
|
||||
WGL_CONTEXT_MAJOR_VERSION_ARB, g_major,
|
||||
WGL_CONTEXT_MINOR_VERSION_ARB, g_minor,
|
||||
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
WGL_CONTEXT_FLAGS_ARB, g_extern.system.hw_render_callback.debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0,
|
||||
0,
|
||||
};
|
||||
|
||||
|
@ -533,6 +533,7 @@ struct retro_hw_render_callback
|
||||
// The reset callback might still be called in extreme situations such as if the context is lost beyond recovery.
|
||||
// For optimal stability, set this to false, and allow context to be reset at any time.
|
||||
retro_hw_context_reset_t context_destroy; // A callback to be called before the context is destroyed. Resources can be deinitialized at this step. This can be set to NULL, in which resources will just be destroyed without any notification.
|
||||
bool debug_context; // Creates a debug context. Only takes effect when using GL core.
|
||||
};
|
||||
|
||||
// Callback type passed in RETRO_ENVIRONMENT_SET_KEYBOARD_CALLBACK. Called by the frontend in response to keyboard events.
|
||||
|
Loading…
Reference in New Issue
Block a user