From 9d876960e8914bfa11bc3be1e500832711c20350 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Fri, 15 Jun 2018 20:17:16 -0600 Subject: This option limits visibility of the glew.h header to just bf_gpu and intern_gawain this is to highlight areas in the code that still directly do opengl calls or use opengl types. This is in preparation for supporting alternative rendering back-ends. Reviewers: brecht, fclem Differential Revision: https://developer.blender.org/D3304 --- intern/gawain/CMakeLists.txt | 7 +++++++ intern/gawain/gawain/gwn_common.h | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'intern/gawain') diff --git a/intern/gawain/CMakeLists.txt b/intern/gawain/CMakeLists.txt index 177c76327aa..ced52b22e2c 100644 --- a/intern/gawain/CMakeLists.txt +++ b/intern/gawain/CMakeLists.txt @@ -1,3 +1,10 @@ +# WITH_OPENGL limits the visibility of the opengl headers to just gawain and bg_gpu, +# to more easily highlight codepadths in other libraries that need to be refactored, +# bf_intern_gawain is allowed to have opengl regardless of this option. + +if(NOT WITH_OPENGL) + add_definitions(-DWITH_OPENGL) +endif() set(INC gawain diff --git a/intern/gawain/gawain/gwn_common.h b/intern/gawain/gawain/gwn_common.h index f1512bf4466..6a56543da40 100644 --- a/intern/gawain/gawain/gwn_common.h +++ b/intern/gawain/gawain/gwn_common.h @@ -20,7 +20,10 @@ #define TRUST_NO_ONE 1 #endif -#include +#if defined(WITH_OPENGL) + #include +#endif + #include #include -- cgit v1.2.3