diff options
Diffstat (limited to 'intern/opencolorio/ocio_impl_glsl.cc')
-rw-r--r-- | intern/opencolorio/ocio_impl_glsl.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc index 54be1e0f339..1a3132fa4b3 100644 --- a/intern/opencolorio/ocio_impl_glsl.cc +++ b/intern/opencolorio/ocio_impl_glsl.cc @@ -36,12 +36,7 @@ #include <sstream> #include <string.h> -#ifdef __APPLE__ -#include <OpenGL/gl.h> -#include <OpenGL/glu.h> -#else #include <GL/glew.h> -#endif #include <OpenColorIO/OpenColorIO.h> @@ -202,6 +197,13 @@ static bool ensureLUT3DAllocated(OCIO_GLSLDrawState *state) return state->lut3d_texture_valid; } +/* Detect if we can support GLSL drawing */ +bool OCIOImpl::supportGLSLDraw() +{ + /* GLSL and GL_RGB16F_ARB */ + return GLEW_VERSION_2_0 && (GLEW_VERSION_3_0 || GLEW_ARB_texture_float); +} + /** * Setup OpenGL contexts for a transform defined by processor using GLSL * All LUT allocating baking and shader compilation happens here. |