Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-04 14:48:14 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-04 14:59:31 +0300
commit4fe2b45d3db430cdbe5922327eeb7a5e92a5f9a2 (patch)
tree919ef9eb89c3f4f61d1e84fe463b618c2100fd21 /intern/cycles
parent12e9ccb256a6afa36320b7853e9d949de1e3054b (diff)
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.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/render/shader.h9
1 files changed, 9 insertions, 0 deletions
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 <OSL/oslexec.h>
#endif