diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-02 20:30:08 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-02 20:30:17 +0300 |
commit | 00808eb39ac04c484fcabac6b18666cb2a0191e7 (patch) | |
tree | 68319846e12dee6ababd82db4a4d28c1dcfe1c71 /source/blender/gpu/intern/gpu_init_exit.c | |
parent | a5b2841aa0c4b1b90d29077ba174ed31ae8ee4d9 (diff) |
Make OpenGL debug contexts a flag --debug-gpu instead of a compile time
option.
This makes sense, since contexts get created at runtime, there is little
reason to require recompilation for this.
Only works on linux currently, will be doing more OSs later
Diffstat (limited to 'source/blender/gpu/intern/gpu_init_exit.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_init_exit.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_init_exit.c b/source/blender/gpu/intern/gpu_init_exit.c index a93c1a21130..aefddc774be 100644 --- a/source/blender/gpu/intern/gpu_init_exit.c +++ b/source/blender/gpu/intern/gpu_init_exit.c @@ -32,6 +32,8 @@ #include "BLI_sys_types.h" #include "GPU_init_exit.h" /* interface */ +#include "BKE_global.h" + #include "intern/gpu_codegen.h" #include "intern/gpu_private.h" @@ -54,14 +56,17 @@ void GPU_init(void) gpu_codegen_init(); - GPU_DEBUG_INIT(); + if (G.debug & G_DEBUG_GPU) + gpu_debug_init(); + } void GPU_exit(void) { - GPU_DEBUG_EXIT(); + if (G.debug & G_DEBUG_GPU) + gpu_debug_exit(); gpu_codegen_exit(); gpu_extensions_exit(); /* must come last */ |