From 4fe2b45d3db430cdbe5922327eeb7a5e92a5f9a2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 4 Dec 2014 16:48:14 +0500 Subject: Cycles: Fix compilation error after recent logging changes Forbid OSL from polluting current conext with obscure stuff from windows.h, it's not useful and unhealthy anyway. Maybe we sohuld also forbid using abbreviated Glog constants as well tho. --- intern/cycles/render/shader.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'intern/cycles') diff --git a/intern/cycles/render/shader.h b/intern/cycles/render/shader.h index b267731abe5..29c10ffa4f3 100644 --- a/intern/cycles/render/shader.h +++ b/intern/cycles/render/shader.h @@ -18,6 +18,15 @@ #define __SHADER_H__ #ifdef WITH_OSL +# if defined(_MSC_VER) +/* Prevent OSL from pollyting the context with weird macroses from windows.h. + * TODO(sergey): Ideally it's only enough to have class/struct declarations in + * the header and skip header include here. + */ +# define NOGDI +# define NOMINMAX +# define WIN32_LEAN_AND_MEAN +# endif # include #endif -- cgit v1.2.3