diff --git a/intern/opensubdiv/internal/evaluator/gl_compute_evaluator.cc b/intern/opensubdiv/internal/evaluator/gl_compute_evaluator.cc index df747e23d2a..148770b0d39 100644 --- a/intern/opensubdiv/internal/evaluator/gl_compute_evaluator.cc +++ b/intern/opensubdiv/internal/evaluator/gl_compute_evaluator.cc @@ -24,6 +24,20 @@ #include +/* There are few aspects here: + * - macOS is strict about including both gl.h and gl3.h + * - libepoxy only pretends to be a replacement for gl.h + * - OpenSubdiv internally uses `OpenGL/gl3.h` on macOS + * + * In order to silence the warning pretend that gl3 has been included, fully relying on symbols + * from the epoxy. + * + * This works differently from how OpenSubdiv internally will use `OpenGL/gl3.h` without epoxy. + * Sounds fragile, but so far things seems to work. */ +#if defined(__APPLE__) +# define __gl3_h_ +#endif + #include "gl_compute_evaluator.h" #include