diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-12-18 21:16:52 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-12-18 21:16:52 +0300 |
commit | 82921ce42002901791d786890c232dc6768c8e62 (patch) | |
tree | f4fd36aabfaf058d8abdd2b40d96520cdbc72e9a /intern/opensubdiv/opensubdiv_utils_capi.cc | |
parent | 672f2efbe68ff6e75b0994358fa0269fc7105f43 (diff) |
OpenSubdiv: Avoid having bad-level call
This is always asking for problems. Additionally, that call was leading
to OpenGL calls happening from threads.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_utils_capi.cc')
-rw-r--r-- | intern/opensubdiv/opensubdiv_utils_capi.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/opensubdiv/opensubdiv_utils_capi.cc b/intern/opensubdiv/opensubdiv_utils_capi.cc index c993e347587..ae5592367dd 100644 --- a/intern/opensubdiv/opensubdiv_utils_capi.cc +++ b/intern/opensubdiv/opensubdiv_utils_capi.cc @@ -41,6 +41,8 @@ # include "opensubdiv_device_context_cuda.h" #endif /* OPENSUBDIV_HAS_CUDA */ +static bool gpu_legacy_support_global = false; + int openSubdiv_getAvailableEvaluators(void) { if (!openSubdiv_supportGPUDisplay()) { @@ -80,13 +82,19 @@ int openSubdiv_getAvailableEvaluators(void) return flags; } -void openSubdiv_init(void) +void openSubdiv_init(bool gpu_legacy_support) { /* Ensure all OpenGL strings are cached. */ (void)openSubdiv_getAvailableEvaluators(); + gpu_legacy_support_global = gpu_legacy_support; } void openSubdiv_cleanup(void) { openSubdiv_osdGLDisplayDeinit(); } + +bool openSubdiv_gpu_legacy_support(void) +{ + return gpu_legacy_support_global; +} |