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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-15 23:23:35 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-15 23:23:35 +0400
commitef6eab3ce4519a07041d7321b7c5775b1d1870f3 (patch)
tree75d9a5b7cc2ddb976552b979eaa42d2c4f9e1adf /intern
parentc7ec8a2e54b7557a5f0f96a35c1c05402dee95b9 (diff)
Cycles: move clew into cycles namespace to avoid conflicts, and fix mesh
displacement panel showing with blender internal.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/SConscript2
-rw-r--r--intern/cycles/blender/addon/ui.py2
-rw-r--r--intern/cycles/util/CMakeLists.txt2
-rwxr-xr-xintern/cycles/util/util_opencl.cpp (renamed from intern/cycles/util/util_opencl.c)6
-rwxr-xr-xintern/cycles/util/util_opencl.h15
5 files changed, 11 insertions, 16 deletions
diff --git a/intern/cycles/SConscript b/intern/cycles/SConscript
index 1acb7321f09..4d45a6875a9 100644
--- a/intern/cycles/SConscript
+++ b/intern/cycles/SConscript
@@ -6,7 +6,7 @@ cycles = env.Clone()
cycles.Depends('../../source/blender/makesrna/intern/RNA_blender_cpp.h', 'makesrna')
-sources = cycles.Glob('bvh/*.cpp') + cycles.Glob('device/*.cpp') + cycles.Glob('kernel/*.cpp') + cycles.Glob('render/*.cpp') + cycles.Glob('subd/*.cpp') + cycles.Glob('util/*.cpp') + cycles.Glob('util/*.c') + cycles.Glob('blender/*.cpp')
+sources = cycles.Glob('bvh/*.cpp') + cycles.Glob('device/*.cpp') + cycles.Glob('kernel/*.cpp') + cycles.Glob('render/*.cpp') + cycles.Glob('subd/*.cpp') + cycles.Glob('util/*.cpp') + cycles.Glob('blender/*.cpp')
sources.remove(path.join('util', 'util_view.cpp'))
sources.remove(path.join('render', 'film_response.cpp'))
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 6cebe3d24e4..d96efe93cf8 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -295,7 +295,7 @@ class Cycles_PT_mesh_displacement(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return context.mesh or context.curve or context.meta_ball
+ return CyclesButtonsPanel.poll(context) and context.mesh or context.curve or context.meta_ball
def draw(self, context):
layout = self.layout
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 76e948504eb..9182ee4cbe1 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -11,7 +11,7 @@ set(SRC
util_dynlib.cpp
util_md5.cpp
util_memarena.cpp
- util_opencl.c
+ util_opencl.cpp
util_path.cpp
util_string.cpp
util_system.cpp
diff --git a/intern/cycles/util/util_opencl.c b/intern/cycles/util/util_opencl.cpp
index 10429ffcd80..1d05b0b687a 100755
--- a/intern/cycles/util/util_opencl.c
+++ b/intern/cycles/util/util_opencl.cpp
@@ -7,6 +7,8 @@
// Extracted from the CLCC project - http://clcc.sourceforge.net/
//////////////////////////////////////////////////////////////////////////
+#include <stdlib.h>
+
#include "util_opencl.h"
#ifndef CLCC_GENERATE_DOCUMENTATION
@@ -36,7 +38,7 @@
//#define CLCC_DYNLIB_IMPORT implementation_defined
#endif
-#include <stdlib.h>
+CCL_NAMESPACE_BEGIN
//! \brief module handle
static CLCC_DYNLIB_HANDLE module = NULL;
@@ -315,3 +317,5 @@ const char *clErrorString(cl_int error)
return strings[-error];
}
+CCL_NAMESPACE_END
+
diff --git a/intern/cycles/util/util_opencl.h b/intern/cycles/util/util_opencl.h
index 08694874ac1..2e97097ef36 100755
--- a/intern/cycles/util/util_opencl.h
+++ b/intern/cycles/util/util_opencl.h
@@ -10,6 +10,8 @@
#ifndef __UTIL_OPENCL_H__
#define __UTIL_OPENCL_H__
+CCL_NAMESPACE_BEGIN
+
//! This file contains a copy of the contents of CL.H and CL_PLATFORM.H from the
//! official OpenCL spec. The purpose of this code is to load the OpenCL dynamic
//! library at run-time and thus allow the executable to function on many
@@ -56,15 +58,6 @@
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
******************************************************************************/
-#ifdef __APPLE__
-/* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
-#include <AvailabilityMacros.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#ifndef CLCC_GENERATE_DOCUMENTATION
#if defined(_WIN32)
@@ -1312,9 +1305,7 @@ CLEW_FUN_EXPORT PFNCLGETEXTENSIONFUNCTIONADDRESS __clewGetExtensionFuncti
int clLibraryInit(void);
const char *clErrorString(cl_int error);
-#ifdef __cplusplus
-}
-#endif
+CCL_NAMESPACE_END
#endif /* __UTIL_OPENCL_H__ */