Made a proper command-line flag out of disabling GL context resetting. --disable_gl_context_reset
This commit is contained in:
parent
c516447ae1
commit
2a40512b74
|
@ -15,6 +15,7 @@
|
|||
#include "xenia/gpu/gl4/gl4_gpu.h"
|
||||
|
||||
DECLARE_bool(thread_safe_gl);
|
||||
DECLARE_bool(disable_gl_context_reset);
|
||||
|
||||
DECLARE_bool(gl_debug_output);
|
||||
DECLARE_bool(gl_debug_output_synchronous);
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
DEFINE_bool(thread_safe_gl, false,
|
||||
"Only allow one GL context to be active at a time.");
|
||||
|
||||
DEFINE_bool(disable_gl_context_reset, false,
|
||||
"Do not aggressively reset the GL context (helps with capture "
|
||||
"programs such as OBS or FRAPS).");
|
||||
|
||||
DEFINE_bool(gl_debug_output, false, "Dump ARB_debug_output to stderr.");
|
||||
DEFINE_bool(gl_debug_output_synchronous, true,
|
||||
"ARB_debug_output will synchronize to be thread safe.");
|
||||
|
|
|
@ -332,7 +332,9 @@ bool GLContext::MakeCurrent() {
|
|||
}
|
||||
|
||||
void GLContext::ClearCurrent() {
|
||||
wglMakeCurrent(nullptr, nullptr);
|
||||
if (!FLAGS_disable_gl_context_reset) {
|
||||
wglMakeCurrent(nullptr, nullptr);
|
||||
}
|
||||
tls_glew_context_ = nullptr;
|
||||
tls_wglew_context_ = nullptr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue