diff --git a/CMakeLists.txt b/CMakeLists.txt index 91d33d56..305901c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -687,6 +687,17 @@ endmacro() #------------------------------------------------------------------------------- # Build targets + +# if you want to build examples against installed OpenSubdiv header files, +# use OPENSUBDIV_INCLUDE_DIR. + +# example: if you have already installed opensubdiv libs in this cmake setup, +# set (OPENSUBDIV_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INCDIR_BASE}) + +if (NOT OPENSUBDIV_INCLUDE_DIR) + set(OPENSUBDIV_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/opensubdiv") +endif() + if (NOT NO_TESTS) enable_testing() endif() diff --git a/examples/common/CMakeLists.txt b/examples/common/CMakeLists.txt index 181c294b..24743cd1 100644 --- a/examples/common/CMakeLists.txt +++ b/examples/common/CMakeLists.txt @@ -148,7 +148,7 @@ endif() #------------------------------------------------------------------------------- include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" + "${OPENSUBDIV_INCLUDE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" ) @@ -165,4 +165,3 @@ add_library(examples_common_obj ${EXAMPLES_COMMON_HEADER_FILES} ${INC_FILES} ) - diff --git a/examples/common/objAnim.cpp b/examples/common/objAnim.cpp index 99009de4..d99df4b0 100644 --- a/examples/common/objAnim.cpp +++ b/examples/common/objAnim.cpp @@ -23,8 +23,7 @@ // #include "objAnim.h" - -#include <../regression/common/shape_utils.h> +#include "../../regression/common/shape_utils.h" #include #include diff --git a/examples/dxPtexViewer/CMakeLists.txt b/examples/dxPtexViewer/CMakeLists.txt index 712844c0..0a3017b0 100644 --- a/examples/dxPtexViewer/CMakeLists.txt +++ b/examples/dxPtexViewer/CMakeLists.txt @@ -35,8 +35,7 @@ set(PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${DXSDK_INCLUDE_DIR}" "${PTEX_INCLUDE_DIR}" ) diff --git a/examples/dxPtexViewer/dxPtexViewer.cpp b/examples/dxPtexViewer/dxPtexViewer.cpp index 5dd60e61..65bad169 100644 --- a/examples/dxPtexViewer/dxPtexViewer.cpp +++ b/examples/dxPtexViewer/dxPtexViewer.cpp @@ -61,7 +61,7 @@ OpenSubdiv::Osd::D3D11MeshInterface *g_mesh; #include "Ptexture.h" #include "PtexUtils.h" -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/d3d11Hud.h" diff --git a/examples/dxViewer/CMakeLists.txt b/examples/dxViewer/CMakeLists.txt index 5336d848..ec256bb8 100644 --- a/examples/dxViewer/CMakeLists.txt +++ b/examples/dxViewer/CMakeLists.txt @@ -34,8 +34,7 @@ set(PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${DXSDK_INCLUDE_DIR}" ) diff --git a/examples/dxViewer/dxviewer.cpp b/examples/dxViewer/dxviewer.cpp index 5e59b1eb..ff62a942 100644 --- a/examples/dxViewer/dxviewer.cpp +++ b/examples/dxViewer/dxviewer.cpp @@ -60,7 +60,7 @@ OpenSubdiv::Osd::D3D11MeshInterface *g_mesh = NULL; OpenSubdiv::Osd::D3D11LegacyGregoryPatchTable *g_legacyGregoryPatchTable = NULL; -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/d3d11Hud.h" diff --git a/examples/dxViewer/init_shapes.h b/examples/dxViewer/init_shapes.h index aad82279..aa9583ee 100644 --- a/examples/dxViewer/init_shapes.h +++ b/examples/dxViewer/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,62 +37,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { // g_defaultShapes.push_back( ShapeDesc("bilinear_cube", bilinear_cube, kBilinear) ); diff --git a/examples/farViewer/CMakeLists.txt b/examples/farViewer/CMakeLists.txt index 785d4022..bb4c41b2 100644 --- a/examples/farViewer/CMakeLists.txt +++ b/examples/farViewer/CMakeLists.txt @@ -31,8 +31,7 @@ set(SHADER_FILES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/farViewer/farViewer.cpp b/examples/farViewer/farViewer.cpp index 08dbecc1..ea22f888 100644 --- a/examples/farViewer/farViewer.cpp +++ b/examples/farViewer/farViewer.cpp @@ -55,8 +55,7 @@ GLFWmonitor* g_primary=0; #include #include -#include - +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glUtils.h" diff --git a/examples/farViewer/gl_mesh.h b/examples/farViewer/gl_mesh.h index d9ce72d6..a2b1eaba 100644 --- a/examples/farViewer/gl_mesh.h +++ b/examples/farViewer/gl_mesh.h @@ -25,8 +25,8 @@ #ifndef GL_MESH_H #define GL_MESH_H -#include -#include +#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/hbr_utils.h" #include #include "../common/glUtils.h" diff --git a/examples/farViewer/init_shapes.h b/examples/farViewer/init_shapes.h index e5a1afe6..96f50c32 100644 --- a/examples/farViewer/init_shapes.h +++ b/examples/farViewer/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,61 +37,6 @@ struct ShapeDesc { static std::vector g_shapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { // g_shapes.push_back( ShapeDesc("bilinear_cube", bilinear_cube, kBilinear) ); diff --git a/examples/glEvalLimit/CMakeLists.txt b/examples/glEvalLimit/CMakeLists.txt index 7a5dce5c..65b2d884 100644 --- a/examples/glEvalLimit/CMakeLists.txt +++ b/examples/glEvalLimit/CMakeLists.txt @@ -30,8 +30,7 @@ list(APPEND PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glEvalLimit/glEvalLimit.cpp b/examples/glEvalLimit/glEvalLimit.cpp index 6172e3af..73026cfe 100644 --- a/examples/glEvalLimit/glEvalLimit.cpp +++ b/examples/glEvalLimit/glEvalLimit.cpp @@ -95,7 +95,7 @@ GLFWmonitor* g_primary=0; #include -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" diff --git a/examples/glEvalLimit/init_shapes.h b/examples/glEvalLimit/init_shapes.h index 9fbd8d74..7b72fd59 100644 --- a/examples/glEvalLimit/init_shapes.h +++ b/examples/glEvalLimit/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,51 +37,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include //------------------------------------------------------------------------------ static void initShapes() { diff --git a/examples/glFVarViewer/CMakeLists.txt b/examples/glFVarViewer/CMakeLists.txt index c81ad029..ebafbbbf 100644 --- a/examples/glFVarViewer/CMakeLists.txt +++ b/examples/glFVarViewer/CMakeLists.txt @@ -35,8 +35,7 @@ list(APPEND PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glFVarViewer/glFVarViewer.cpp b/examples/glFVarViewer/glFVarViewer.cpp index fe3ce083..a185bffd 100644 --- a/examples/glFVarViewer/glFVarViewer.cpp +++ b/examples/glFVarViewer/glFVarViewer.cpp @@ -43,14 +43,12 @@ GLFWwindow* g_window = 0; GLFWmonitor* g_primary = 0; #include - #include #include - #include OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL; -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" diff --git a/examples/glFVarViewer/init_shapes.h b/examples/glFVarViewer/init_shapes.h index 20209d89..9f97846d 100644 --- a/examples/glFVarViewer/init_shapes.h +++ b/examples/glFVarViewer/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,63 +37,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { diff --git a/examples/glImaging/CMakeLists.txt b/examples/glImaging/CMakeLists.txt index 458e811c..bea906c3 100644 --- a/examples/glImaging/CMakeLists.txt +++ b/examples/glImaging/CMakeLists.txt @@ -23,8 +23,7 @@ # include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glImaging/glImaging.cpp b/examples/glImaging/glImaging.cpp index a58e2dab..3d6cb560 100644 --- a/examples/glImaging/glImaging.cpp +++ b/examples/glImaging/glImaging.cpp @@ -84,7 +84,7 @@ #include -#include +#include "../../regression/common/vtr_utils.h" #include "../common/patchColors.h" #include "../common/stb_image_write.h" // common.obj has an implementation. #include "../common/glShaderCache.h" diff --git a/examples/glImaging/init_shapes.h b/examples/glImaging/init_shapes.h index 88f1c2f0..3a434d05 100644 --- a/examples/glImaging/init_shapes.h +++ b/examples/glImaging/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,73 +37,6 @@ struct ShapeDesc { static std::vector g_shapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { diff --git a/examples/glPaintTest/CMakeLists.txt b/examples/glPaintTest/CMakeLists.txt index 44088c46..ab7f2496 100644 --- a/examples/glPaintTest/CMakeLists.txt +++ b/examples/glPaintTest/CMakeLists.txt @@ -37,8 +37,7 @@ list(APPEND PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLEW_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glPaintTest/glPaintTest.cpp b/examples/glPaintTest/glPaintTest.cpp index 4e13a61e..1ed081c6 100644 --- a/examples/glPaintTest/glPaintTest.cpp +++ b/examples/glPaintTest/glPaintTest.cpp @@ -44,14 +44,12 @@ GLFWmonitor* g_primary=0; #include #include - #include #include - #include OpenSubdiv::Osd::GLMeshInterface *g_mesh; -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" diff --git a/examples/glPaintTest/init_shapes.h b/examples/glPaintTest/init_shapes.h index 56769f82..5b4e9127 100644 --- a/examples/glPaintTest/init_shapes.h +++ b/examples/glPaintTest/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,48 +37,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_cube_corner0", catmark_cube_corner0, kCatmark ) ); diff --git a/examples/glPtexViewer/CMakeLists.txt b/examples/glPtexViewer/CMakeLists.txt index 9a3d6c0f..d83f2594 100644 --- a/examples/glPtexViewer/CMakeLists.txt +++ b/examples/glPtexViewer/CMakeLists.txt @@ -38,8 +38,7 @@ list(APPEND PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" "${PTEX_INCLUDE_DIR}" ) diff --git a/examples/glPtexViewer/glPtexViewer.cpp b/examples/glPtexViewer/glPtexViewer.cpp index f20d75fc..7aefb1d8 100644 --- a/examples/glPtexViewer/glPtexViewer.cpp +++ b/examples/glPtexViewer/glPtexViewer.cpp @@ -92,7 +92,7 @@ OpenSubdiv::Osd::GLMeshInterface *g_mesh; #include "Ptexture.h" #include "PtexUtils.h" -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" diff --git a/examples/glShareTopology/CMakeLists.txt b/examples/glShareTopology/CMakeLists.txt index 1e1b42e3..a4738168 100644 --- a/examples/glShareTopology/CMakeLists.txt +++ b/examples/glShareTopology/CMakeLists.txt @@ -35,8 +35,7 @@ list(APPEND PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glShareTopology/glShareTopology.cpp b/examples/glShareTopology/glShareTopology.cpp index 8e89433e..33ca0293 100644 --- a/examples/glShareTopology/glShareTopology.cpp +++ b/examples/glShareTopology/glShareTopology.cpp @@ -82,7 +82,7 @@ GLFWmonitor* g_primary=0; #endif -#include +#include "../../regression/common/vtr_utils.h" #include "init_shapes.h" #include "../common/stopwatch.h" diff --git a/examples/glShareTopology/init_shapes.h b/examples/glShareTopology/init_shapes.h index de6fc4dc..0289e23b 100644 --- a/examples/glShareTopology/init_shapes.h +++ b/examples/glShareTopology/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -38,75 +39,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_cube_corner0", catmark_cube_corner0, kCatmark ) ); diff --git a/examples/glShareTopology/sceneBase.cpp b/examples/glShareTopology/sceneBase.cpp index 3ae832f0..12d5678b 100644 --- a/examples/glShareTopology/sceneBase.cpp +++ b/examples/glShareTopology/sceneBase.cpp @@ -22,11 +22,11 @@ // language governing permissions and limitations under the Apache License. // +#include "sceneBase.h" #include -#include +#include "../../regression/common/vtr_utils.h" #include #include -#include "sceneBase.h" using namespace OpenSubdiv; diff --git a/examples/glStencilViewer/CMakeLists.txt b/examples/glStencilViewer/CMakeLists.txt index 5de1ce78..1b0b5e8e 100644 --- a/examples/glStencilViewer/CMakeLists.txt +++ b/examples/glStencilViewer/CMakeLists.txt @@ -30,8 +30,7 @@ list(APPEND PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glStencilViewer/glStencilViewer.cpp b/examples/glStencilViewer/glStencilViewer.cpp index efe52a06..f70461c4 100644 --- a/examples/glStencilViewer/glStencilViewer.cpp +++ b/examples/glStencilViewer/glStencilViewer.cpp @@ -42,7 +42,7 @@ GLFWwindow* g_window=0; GLFWmonitor* g_primary=0; -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glUtils.h" diff --git a/examples/glStencilViewer/init_shapes.h b/examples/glStencilViewer/init_shapes.h index aad82279..aa9583ee 100644 --- a/examples/glStencilViewer/init_shapes.h +++ b/examples/glStencilViewer/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -36,62 +37,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { // g_defaultShapes.push_back( ShapeDesc("bilinear_cube", bilinear_cube, kBilinear) ); diff --git a/examples/glViewer/CMakeLists.txt b/examples/glViewer/CMakeLists.txt index 817cd64e..a12018af 100644 --- a/examples/glViewer/CMakeLists.txt +++ b/examples/glViewer/CMakeLists.txt @@ -30,8 +30,7 @@ set(SHADER_FILES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${PROJECT_SOURCE_DIR}/regression" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/examples/glViewer/glViewer.cpp b/examples/glViewer/glViewer.cpp index 850a8f76..f5bd5ca9 100644 --- a/examples/glViewer/glViewer.cpp +++ b/examples/glViewer/glViewer.cpp @@ -86,7 +86,7 @@ GLFWmonitor* g_primary=0; OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL; OpenSubdiv::Osd::GLLegacyGregoryPatchTable *g_legacyGregoryPatchTable = NULL; -#include +#include "../../regression/common/vtr_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" diff --git a/examples/glViewer/init_shapes.h b/examples/glViewer/init_shapes.h index b3347c5c..c56368a2 100644 --- a/examples/glViewer/init_shapes.h +++ b/examples/glViewer/init_shapes.h @@ -22,7 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#include +#include "../../regression/common/shape_utils.h" +#include "../../regression/shapes/all.h" struct ShapeDesc { @@ -38,84 +39,6 @@ struct ShapeDesc { static std::vector g_defaultShapes; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - //------------------------------------------------------------------------------ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_cube_corner0", catmark_cube_corner0, kCatmark ) ); diff --git a/examples/mayaPolySmooth/CMakeLists.txt b/examples/mayaPolySmooth/CMakeLists.txt index f4446597..ab95cadd 100644 --- a/examples/mayaPolySmooth/CMakeLists.txt +++ b/examples/mayaPolySmooth/CMakeLists.txt @@ -41,7 +41,7 @@ set(PLATFORM_LIBRARIES ) include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" + "${OPENSUBDIV_INCLUDE_DIR}" "${MAYA_INCLUDE_DIRS}" ) diff --git a/regression/common/CMakeLists.txt b/regression/common/CMakeLists.txt index ddcb41ec..4e393514 100644 --- a/regression/common/CMakeLists.txt +++ b/regression/common/CMakeLists.txt @@ -33,10 +33,7 @@ set(REGRESSION_COMMON_HEADER_FILES vtr_utils.h ) -include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" - "${CMAKE_CURRENT_BINARY_DIR}" -) +include_directories("${OPENSUBDIV_INCLUDE_DIR}") add_library(regression_common_obj OBJECT diff --git a/regression/common/cmp_utils.h b/regression/common/cmp_utils.h index 3f1d034e..02f1ce9d 100644 --- a/regression/common/cmp_utils.h +++ b/regression/common/cmp_utils.h @@ -27,7 +27,7 @@ #include -#include "../../regression/common/hbr_utils.h" +#include "hbr_utils.h" //------------------------------------------------------------------------------ diff --git a/regression/common/hbr_utils.h b/regression/common/hbr_utils.h index 1c518f66..c56a0f5a 100644 --- a/regression/common/hbr_utils.h +++ b/regression/common/hbr_utils.h @@ -37,7 +37,7 @@ #include #include -#include "../../regression/common/shape_utils.h" +#include "shape_utils.h" #include diff --git a/regression/common/vtr_utils.cpp b/regression/common/vtr_utils.cpp index f14926d6..edc64cf8 100644 --- a/regression/common/vtr_utils.cpp +++ b/regression/common/vtr_utils.cpp @@ -22,7 +22,7 @@ // language governing permissions and limitations under the Apache License. // -#include "../../regression/common/vtr_utils.h" +#include "vtr_utils.h" struct FVarVertex { diff --git a/regression/common/vtr_utils.h b/regression/common/vtr_utils.h index 1cd370b9..461d6fa2 100644 --- a/regression/common/vtr_utils.h +++ b/regression/common/vtr_utils.h @@ -29,7 +29,7 @@ #include #include -#include "../../regression/common/shape_utils.h" +#include "shape_utils.h" //------------------------------------------------------------------------------ diff --git a/regression/far_regression/CMakeLists.txt b/regression/far_regression/CMakeLists.txt index 93c330fc..687cb4d4 100644 --- a/regression/far_regression/CMakeLists.txt +++ b/regression/far_regression/CMakeLists.txt @@ -22,7 +22,7 @@ # language governing permissions and limitations under the Apache License. # -include_directories("${PROJECT_SOURCE_DIR}/opensubdiv") +include_directories("${OPENSUBDIV_INCLUDE_DIR}") set(SOURCE_FILES far_regression.cpp diff --git a/regression/hbr_regression/CMakeLists.txt b/regression/hbr_regression/CMakeLists.txt index 8326a599..6956a37c 100644 --- a/regression/hbr_regression/CMakeLists.txt +++ b/regression/hbr_regression/CMakeLists.txt @@ -22,7 +22,7 @@ # language governing permissions and limitations under the Apache License. # -include_directories("${PROJECT_SOURCE_DIR}/opensubdiv") +include_directories("${OPENSUBDIV_INCLUDE_DIR}") _add_possibly_cuda_executable(hbr_regression main.cpp diff --git a/regression/osd_regression/CMakeLists.txt b/regression/osd_regression/CMakeLists.txt index edf32f73..78c4a02d 100644 --- a/regression/osd_regression/CMakeLists.txt +++ b/regression/osd_regression/CMakeLists.txt @@ -23,7 +23,7 @@ # include_directories( - "${PROJECT_SOURCE_DIR}/opensubdiv" + "${OPENSUBDIV_INCLUDE_DIR}" "${GLFW_INCLUDE_DIR}" ) diff --git a/regression/osd_regression/main.cpp b/regression/osd_regression/main.cpp index c63ce5ae..9a72c1b9 100644 --- a/regression/osd_regression/main.cpp +++ b/regression/osd_regression/main.cpp @@ -48,15 +48,12 @@ GLFWwindow* g_window=0; #include #include - - #include - #include -#include "../../regression/common/cmp_utils.h" -#include "../../regression/common/hbr_utils.h" -#include "../../regression/common/vtr_utils.h" +#include "../common/cmp_utils.h" +#include "../common/hbr_utils.h" +#include "../common/vtr_utils.h" // // Regression testing matching Osd to Hbr diff --git a/regression/shapes/all.h b/regression/shapes/all.h new file mode 100644 index 00000000..698d8fa1 --- /dev/null +++ b/regression/shapes/all.h @@ -0,0 +1,105 @@ +// +// Copyright 2015 Pixar +// +// Licensed under the Apache License, Version 2.0 (the "Apache License") +// with the following modification; you may not use this file except in +// compliance with the Apache License and the following modification to it: +// Section 6. Trademarks. is deleted and replaced with: +// +// 6. Trademarks. This License does not grant permission to use the trade +// names, trademarks, service marks, or product names of the Licensor +// and its affiliates, except as required to comply with Section 4(c) of +// the License and to reproduce the content of the NOTICE file. +// +// You may obtain a copy of the Apache License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the Apache License with the above modification is +// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the Apache License for the specific +// language governing permissions and limitations under the Apache License. +// +#ifndef OPENSUBDIV_REGRESSION_SHAPES_ALL_H +#define OPENSUBDIV_REGRESSION_SHAPES_ALL_H + +#include "catmark_bishop.h" +#include "catmark_car.h" +#include "catmark_chaikin0.h" +#include "catmark_chaikin1.h" +#include "catmark_chaikin2.h" +#include "catmark_cube_corner0.h" +#include "catmark_cube_corner1.h" +#include "catmark_cube_corner2.h" +#include "catmark_cube_corner3.h" +#include "catmark_cube_corner4.h" +#include "catmark_cube_creases0.h" +#include "catmark_cube_creases1.h" +#include "catmark_cube_creases2.h" +#include "catmark_cube.h" +#include "catmark_dart_edgecorner.h" +#include "catmark_dart_edgeonly.h" +#include "catmark_edgecorner.h" +#include "catmark_edgeonly.h" +#include "catmark_fan.h" +#include "catmark_flap.h" +#include "catmark_flap2.h" +#include "catmark_fvar_bound0.h" +#include "catmark_fvar_bound1.h" +#include "catmark_fvar_bound2.h" +#include "catmark_gregory_test0.h" +#include "catmark_gregory_test1.h" +#include "catmark_gregory_test2.h" +#include "catmark_gregory_test3.h" +#include "catmark_gregory_test4.h" +#include "catmark_gregory_test5.h" +#include "catmark_gregory_test6.h" +#include "catmark_gregory_test7.h" +#include "catmark_helmet.h" +#include "catmark_hole_test1.h" +#include "catmark_hole_test2.h" +#include "catmark_hole_test3.h" +#include "catmark_hole_test4.h" +#include "catmark_lefthanded.h" +#include "catmark_righthanded.h" +#include "catmark_pole8.h" +#include "catmark_pole64.h" +#include "catmark_pole360.h" +#include "catmark_nonman_quadpole8.h" +#include "catmark_nonman_quadpole64.h" +#include "catmark_nonman_quadpole360.h" +#include "catmark_pawn.h" +#include "catmark_pyramid_creases0.h" +#include "catmark_pyramid_creases1.h" +#include "catmark_pyramid.h" +#include "catmark_rook.h" +#include "catmark_smoothtris0.h" +#include "catmark_smoothtris1.h" +#include "catmark_square_hedit0.h" +#include "catmark_square_hedit1.h" +#include "catmark_square_hedit2.h" +#include "catmark_square_hedit3.h" +#include "catmark_tent_creases0.h" +#include "catmark_tent_creases1.h" +#include "catmark_tent.h" +#include "catmark_torus.h" +#include "catmark_torus_creases0.h" + +#include "bilinear_cube.h" + +#include "loop_cube_creases0.h" +#include "loop_cube_creases1.h" +#include "loop_cube.h" +#include "loop_icosahedron.h" +#include "loop_saddle_edgecorner.h" +#include "loop_saddle_edgeonly.h" +#include "loop_triangle_edgecorner.h" +#include "loop_triangle_edgeonly.h" +#include "loop_chaikin0.h" +#include "loop_chaikin1.h" +#include "loop_pole8.h" +#include "loop_pole64.h" +#include "loop_pole360.h" + +#endif // OPENSUBDIV_REGRESSION_SHAPES_ALL_H