diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-16 04:01:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-16 19:01:44 +0300 |
commit | 71ac1376627b3abc7e2bda93fef42bc3b81f9b4e (patch) | |
tree | d07bc60ce520b9f27517f6f3955d62169ab736eb /source/blender/gpu | |
parent | 8084b7e6e273e16a4441100a56570627128413da (diff) |
Cleanup: GPU: Move quad buffer stereo check to GPU module
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_extensions.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index ab54148a2ff..263deeaf28d 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -57,6 +57,8 @@ void GPU_mem_stats_get(int *totalmem, int *freemem); void GPU_code_generate_glsl_lib(void); +bool GPU_stereo_quadbuffer_support(void); + #ifdef __cplusplus } #endif diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index d1c7aba37df..1c533c80ab7 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -437,3 +437,11 @@ void GPU_mem_stats_get(int *totalmem, int *freemem) *freemem = 0; } } + +/* Return support for the active context + window. */ +bool GPU_stereo_quadbuffer_support(void) +{ + GLboolean stereo = GL_FALSE; + glGetBooleanv(GL_STEREO, &stereo); + return stereo == GL_TRUE; +} |