diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-12-07 02:47:58 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-12-07 02:47:58 +0300 |
commit | a048d5f945be217c0c3e90cb716bf6bb7c267097 (patch) | |
tree | 53958fec97a9d842f77247f0461ee7ab82a00640 /intern/opensubdiv/opensubdiv_capi.cc | |
parent | 50df05c35cca2f26f613f3d44dd3175852da2f78 (diff) |
OpenSubdiv: refine OpenGL version & extension checks
Use new GPU_legacy_support() function.
Determine GLSL version once instead of per shader.
For Texture Buffers, allow ARB or EXT version of the extension. Either
one will do.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_capi.cc')
-rw-r--r-- | intern/opensubdiv/opensubdiv_capi.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/opensubdiv/opensubdiv_capi.cc b/intern/opensubdiv/opensubdiv_capi.cc index f715bf32565..6c226d6cf6b 100644 --- a/intern/opensubdiv/opensubdiv_capi.cc +++ b/intern/opensubdiv/opensubdiv_capi.cc @@ -296,8 +296,9 @@ const struct OpenSubdiv_TopologyRefinerDescr *openSubdiv_getGLMeshTopologyRefine int openSubdiv_supportGPUDisplay(void) { // TODO: simplify extension check once Blender adopts GL 3.2 - return (GLEW_VERSION_3_2 && GLEW_ARB_compatibility) || - (GLEW_VERSION_3_1 && GLEW_ARB_compatibility && GLEW_EXT_geometry_shader4) || - (GLEW_VERSION_3_0 && GLEW_EXT_geometry_shader4 && GLEW_ARB_uniform_buffer_object && GLEW_ARB_texture_buffer_object); + return GPU_legacy_support() && + (GLEW_VERSION_3_2 || + (GLEW_VERSION_3_1 && GLEW_EXT_geometry_shader4) || + (GLEW_VERSION_3_0 && GLEW_EXT_geometry_shader4 && GLEW_ARB_uniform_buffer_object && (GLEW_ARB_texture_buffer_object || GLEW_EXT_texture_buffer_object))); /* also ARB_explicit_attrib_location? */ } |