mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Allow de-activating GL contexts in tests
This commit is contained in:
@@ -222,6 +222,12 @@ void OpenGLGraphicsTest::ActivateContext(GraphicsWindow *win, void *ctx)
|
||||
{
|
||||
X11Window *x11win = (X11Window *)win;
|
||||
|
||||
if(ctx == NULL)
|
||||
{
|
||||
glXMakeContextCurrent(x11win->xlib.display, NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
glXMakeContextCurrent(x11win->xlib.display, x11win->xlib.window, x11win->xlib.window,
|
||||
(GLXContext)ctx);
|
||||
}
|
||||
|
||||
@@ -257,6 +257,12 @@ void OpenGLGraphicsTest::DestroyContext(void *ctx)
|
||||
|
||||
void OpenGLGraphicsTest::ActivateContext(GraphicsWindow *win, void *ctx)
|
||||
{
|
||||
if(ctx == NULL)
|
||||
{
|
||||
makeCurrent(NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
Win32Window *win32win = (Win32Window *)win;
|
||||
|
||||
HDC dc = GetDC(win32win->wnd);
|
||||
|
||||
Reference in New Issue
Block a user