Cycles: move clew into cycles namespace to avoid conflicts, and fix mesh

displacement panel showing with blender internal.
This commit is contained in:
Brecht Van Lommel
2011-11-15 19:23:35 +00:00
parent c7ec8a2e54
commit ef6eab3ce4
5 changed files with 11 additions and 16 deletions

View File

@@ -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'))

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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__ */