mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Enable GL hooks via EGL on windows, as well as via WGL
* Without this, injecting into a GLES application on windows might not work as the hooks won't be enabled when a context create is seen.
This commit is contained in:
@@ -193,6 +193,7 @@ HOOK_EXPORT EGLContext EGLAPIENTRY eglCreateContext_renderdoc_hooked(EGLDisplay
|
||||
|
||||
eglhook.configs[ret] = config;
|
||||
|
||||
EnableGLHooks();
|
||||
eglhook.driver.SetDriverType(RDCDriver::OpenGLES);
|
||||
{
|
||||
SCOPED_LOCK(glLock);
|
||||
|
||||
@@ -970,7 +970,9 @@ void SetDriverForHooks(WrappedOpenGL *driver);
|
||||
// intialisation. This can have false positives if the program creates a context late, but it's the
|
||||
// best we can do.
|
||||
#if ENABLED(RDOC_WIN32)
|
||||
void EnableHooks();
|
||||
void EnableGLHooks();
|
||||
#else
|
||||
#define EnableGLHooks() (void)0
|
||||
#endif
|
||||
|
||||
// this function looks up our list of hook entry points and returns our hook entry point instead of
|
||||
|
||||
@@ -105,7 +105,7 @@ void SetDriverForHooks(WrappedOpenGL *driver)
|
||||
}
|
||||
|
||||
#if ENABLED(RDOC_WIN32)
|
||||
void EnableHooks()
|
||||
void EnableGLHooks()
|
||||
{
|
||||
glhook.enabled = true;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
void WGLHook::PopulateFromContext(HDC dc, HGLRC rc)
|
||||
{
|
||||
SetDriverForHooks(&driver);
|
||||
EnableHooks();
|
||||
EnableGLHooks();
|
||||
|
||||
// called from wglCreate*Context*, to populate GL functions as soon as possible by making a new
|
||||
// context current and fetching our function pointers
|
||||
|
||||
Reference in New Issue
Block a user