[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58235] branches/soc-2013-cycles_volume: - added tbb lib to macros.cmake;
Rafael Campos
rafaelcdn at gmail.com
Sun Jul 14 14:58:21 CEST 2013
Revision: 58235
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58235
Author: jehuty
Date: 2013-07-14 12:58:21 +0000 (Sun, 14 Jul 2013)
Log Message:
-----------
- added tbb lib to macros.cmake;
- edited root CMakeLists.txt to add internal subdir for OPENVDB_INCLUDE_DIRS;
- removed #define ZLIB_WINAPI from extern/openvdb/internal/openvdb/io/Compression.h, which was causing conflicts with OpenEXR's IlmImf.h (which I assume already defines this).
- added preprocessor guard in openvdb/internal/openvdb/math/Coord.h, so #define NOMINMAX is specific to Windows;
- added extern_openvdb lib to intern/cycles/CMakeLists.txt;
- included openvdb.h in osl/osl_services.h, and called one of its methods to ensure it's working;
- added extern_openvdb to creator/CMakeLists.txt;
Modified Paths:
--------------
branches/soc-2013-cycles_volume/CMakeLists.txt
branches/soc-2013-cycles_volume/build_files/cmake/macros.cmake
branches/soc-2013-cycles_volume/extern/openvdb/CMakeLists.txt
branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.cc
branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.h
branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/math/Coord.h
branches/soc-2013-cycles_volume/intern/cycles/CMakeLists.txt
branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.cpp
branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.h
branches/soc-2013-cycles_volume/source/creator/CMakeLists.txt
Modified: branches/soc-2013-cycles_volume/CMakeLists.txt
===================================================================
--- branches/soc-2013-cycles_volume/CMakeLists.txt 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/CMakeLists.txt 2013-07-14 12:58:21 UTC (rev 58235)
@@ -1898,7 +1898,7 @@
if(WITH_CYCLES_OPENVDB)
- set(OPENVDB_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/openvdb")
+ set(OPENVDB_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/extern/openvdb/internal")
endif()
#-----------------------------------------------------------------------------
Modified: branches/soc-2013-cycles_volume/build_files/cmake/macros.cmake
===================================================================
--- branches/soc-2013-cycles_volume/build_files/cmake/macros.cmake 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/build_files/cmake/macros.cmake 2013-07-14 12:58:21 UTC (rev 58235)
@@ -248,7 +248,9 @@
if(WITH_MEM_JEMALLOC)
link_directories(${JEMALLOC_LIBPATH})
endif()
-
+ if(WITH_CYCLES_OPENVDB)
+ link_directories(${TBB_LIBPATH})
+ endif()
if(WIN32 AND NOT UNIX)
link_directories(${PTHREADS_LIBPATH})
endif()
@@ -380,6 +382,9 @@
if(WITH_CYCLES_OSL)
target_link_libraries(${target} ${OSL_LIBRARIES})
endif()
+ if(WITH_CYCLES_OPENVDB)
+ target_link_libraries(${target} ${TBB_LIBRARIES})
+ endif()
if(WITH_LLVM)
target_link_libraries(${target} ${LLVM_LIBRARY})
endif()
Modified: branches/soc-2013-cycles_volume/extern/openvdb/CMakeLists.txt
===================================================================
--- branches/soc-2013-cycles_volume/extern/openvdb/CMakeLists.txt 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/extern/openvdb/CMakeLists.txt 2013-07-14 12:58:21 UTC (rev 58235)
@@ -29,8 +29,8 @@
set(INC_SYS
${BOOST_INCLUDE_DIR}
+ ${TBB_INCLUDE_DIRS}
${OPENEXR_INCLUDE_DIR}
- ${TBB_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
)
Modified: branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.cc
===================================================================
--- branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.cc 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.cc 2013-07-14 12:58:21 UTC (rev 58235)
@@ -28,8 +28,6 @@
//
///////////////////////////////////////////////////////////////////////////
-#define ZLIB_WINAPI
-
#include "Compression.h"
#include <boost/algorithm/string/join.hpp>
Modified: branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.h
===================================================================
--- branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.h 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/io/Compression.h 2013-07-14 12:58:21 UTC (rev 58235)
@@ -39,7 +39,6 @@
#include <string>
#include <vector>
-
namespace openvdb {
OPENVDB_USE_VERSION_NAMESPACE
namespace OPENVDB_VERSION_NAME {
Modified: branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/math/Coord.h
===================================================================
--- branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/math/Coord.h 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/extern/openvdb/internal/openvdb/math/Coord.h 2013-07-14 12:58:21 UTC (rev 58235)
@@ -31,7 +31,9 @@
#ifndef OPENVDB_MATH_COORD_HAS_BEEN_INCLUDED
#define OPENVDB_MATH_COORD_HAS_BEEN_INCLUDED
+#ifdef _WIN32
#define NOMINMAX
+#endif
#include <openvdb/Platform.h>
#include "Math.h"
Modified: branches/soc-2013-cycles_volume/intern/cycles/CMakeLists.txt
===================================================================
--- branches/soc-2013-cycles_volume/intern/cycles/CMakeLists.txt 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/intern/cycles/CMakeLists.txt 2013-07-14 12:58:21 UTC (rev 58235)
@@ -66,6 +66,12 @@
${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO
${OPENEXR_INCLUDE_DIR})
+if(WITH_CYCLES_OPENVDB)
+ include_directories(
+ ${OPENVDB_INCLUDE_DIRS}
+ ${TBB_INCLUDE_DIRS})
+endif()
+
# Subdirectories
if(WITH_CYCLES_BLENDER)
Modified: branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.cpp
===================================================================
--- branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.cpp 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.cpp 2013-07-14 12:58:21 UTC (rev 58235)
@@ -789,7 +789,12 @@
OSL::ShaderGlobals *sg, const OSL::Vec3 &P,
const OSL::Vec3 &dPdx, const OSL::Vec3 &dPdy,
const OSL::Vec3 &dPdz, float *result)
-{
+{
+ //test call
+ openvdb::initialize();
+
+ openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create();
+
OSL::TextureSystem *ts = osl_ts;
bool status = ts->texture3d(filename, options, P, dPdx, dPdy, dPdz, result);
Modified: branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.h
===================================================================
--- branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.h 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/intern/cycles/kernel/osl/osl_services.h 2013-07-14 12:58:21 UTC (rev 58235)
@@ -30,6 +30,8 @@
#include <OSL/oslexec.h>
#include <OSL/oslclosure.h>
+#include<openvdb/openvdb.h>
+
CCL_NAMESPACE_BEGIN
class Object;
Modified: branches/soc-2013-cycles_volume/source/creator/CMakeLists.txt
===================================================================
--- branches/soc-2013-cycles_volume/source/creator/CMakeLists.txt 2013-07-14 12:51:41 UTC (rev 58234)
+++ branches/soc-2013-cycles_volume/source/creator/CMakeLists.txt 2013-07-14 12:58:21 UTC (rev 58235)
@@ -836,6 +836,9 @@
if(WITH_CYCLES_OSL)
list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
endif()
+ if(WITH_CYCLES_OPENVDB)
+ blender_include_dirs(../../extern/openvdb)
+ endif()
endif()
#if(UNIX)
@@ -1004,6 +1007,10 @@
list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
endif()
+ if(WITH_CYCLES_OPENVDB)
+ list(APPEND BLENDER_SORTED_LIBS extern_openvdb)
+ endif()
+
if(WITH_INTERNATIONAL)
list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
endif()
More information about the Bf-blender-cvs
mailing list