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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-28 03:13:32 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-28 05:11:42 +0400
commit731ffd3cd4c1d578fb02d39dc512bace850c2e8b (patch)
tree63cced11229d028a2d8a7e5b6c9600e4e0fa6351 /intern/cycles/app
parentaf7a2a3b6a08bdbe99d295e593e770af165eb0e6 (diff)
Cycles: remove approximate subdivision surface with gregory patches code.
It was never fully implemented and will be replaced by OpenSubdiv. Only linear subdivision remains now. Also includes some refactoring in the split/dice code, adding a SubdParams struct to pass around parameters more easily.
Diffstat (limited to 'intern/cycles/app')
-rw-r--r--intern/cycles/app/CMakeLists.txt2
-rw-r--r--intern/cycles/app/cycles_xml.cpp28
2 files changed, 14 insertions, 16 deletions
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index a2142d77a9e..ada5ea55fb2 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -41,7 +41,7 @@ if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
endif()
if(WITH_CYCLES_OSL)
- list(APPEND LIBRARIES cycles_kernel_osl ${OSL_LIBRARIES})
+ list(APPEND LIBRARIES cycles_kernel_osl ${OSL_LIBRARIES} ${LLVM_LIBRARY})
endif()
include_directories(${INC})
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 55a2a30b9a8..df187f046e5 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -703,15 +703,14 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
}
/* finalize subd mesh */
- sdmesh.link_boundary();
-
- /* subdivide */
- DiagSplit dsplit;
- //dsplit.camera = state.scene->camera;
- //dsplit.dicing_rate = 5.0f;
- dsplit.dicing_rate = state.dicing_rate;
- xml_read_float(&dsplit.dicing_rate, node, "dicing_rate");
- sdmesh.tessellate(&dsplit, false, mesh, shader, smooth);
+ sdmesh.finish();
+
+ /* parameters */
+ SubdParams sdparams(mesh, shader, smooth);
+ xml_read_float(&sdparams.dicing_rate, node, "dicing_rate");
+
+ DiagSplit dsplit(sdparams);;
+ sdmesh.tessellate(&dsplit);
}
else {
/* create vertices */
@@ -789,12 +788,11 @@ static void xml_read_patch(const XMLReadState& state, pugi::xml_node node)
mesh->used_shaders.push_back(state.shader);
/* split */
- DiagSplit dsplit;
- //dsplit.camera = state.scene->camera;
- //dsplit.dicing_rate = 5.0f;
- dsplit.dicing_rate = state.dicing_rate;
- xml_read_float(&dsplit.dicing_rate, node, "dicing_rate");
- dsplit.split_quad(mesh, patch, state.shader, state.smooth);
+ SubdParams sdparams(mesh, state.shader, state.smooth);
+ xml_read_float(&sdparams.dicing_rate, node, "dicing_rate");
+
+ DiagSplit dsplit(sdparams);
+ dsplit.split_quad(patch);
delete patch;