From 731ffd3cd4c1d578fb02d39dc512bace850c2e8b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 28 Nov 2013 00:13:32 +0100 Subject: 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. --- intern/cycles/app/CMakeLists.txt | 2 +- intern/cycles/app/cycles_xml.cpp | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 16 deletions(-) (limited to 'intern/cycles/app') 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; -- cgit v1.2.3