Major step towards consistent use of include paths in source files:

- changed the main OPENSUBDIV_INCLUDE_DIR to exclude ./opensubdiv
    - updated CMakeLists.txt files in non-examples to use only this path
    - updated CMakeLists.txt files in examples to append ./opensubdiv to path
    - updated source in regression/common to use #include <opensubdiv/...>
    - updated source in examples/common to use #include <opensubdiv/...>
    - deferred source in examples to be updated on a case-by-case basis
This commit is contained in:
barry 2018-10-09 10:51:31 -07:00
parent c5c9704b90
commit c424594625
35 changed files with 53 additions and 41 deletions

View File

@ -768,7 +768,7 @@ endmacro()
# set (OPENSUBDIV_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INCDIR_BASE})
if (NOT OPENSUBDIV_INCLUDE_DIR)
set(OPENSUBDIV_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/opensubdiv")
set(OPENSUBDIV_INCLUDE_DIR "${PROJECT_SOURCE_DIR}")
endif()
if (NOT NO_TESTS)

View File

@ -25,7 +25,7 @@
#ifndef OSD_EXAMPLES_COMMON_CL_DEVICE_CONTEXT_H
#define OSD_EXAMPLES_COMMON_CL_DEVICE_CONTEXT_H
#include "osd/opencl.h"
#include <opensubdiv/osd/opencl.h>
class CLDeviceContext {
public:

View File

@ -26,7 +26,7 @@
#define OPENSUBDIV_EXAMPLES_D3D11_CONTROL_MESH_DISPLAY_H
#include <d3d11.h>
#include <far/topologyLevel.h>
#include <opensubdiv/far/topologyLevel.h>
class D3D11ControlMeshDisplay {
public:

View File

@ -24,7 +24,7 @@
#include "d3d11PtexMipmapTexture.h"
#include "ptexMipmapTextureLoader.h"
#include <far/error.h> // XXX: to be replaced
#include <opensubdiv/far/error.h> // XXX: to be replaced
#include <D3D11.h>
#include <cassert>

View File

@ -25,7 +25,7 @@
#ifndef OPENSUBDIV_EXAMPLES_D3D11_PTEX_MIPMAP_TEXTURE_H
#define OPENSUBDIV_EXAMPLES_D3D11_PTEX_MIPMAP_TEXTURE_H
#include <osd/nonCopyable.h>
#include <opensubdiv/osd/nonCopyable.h>
#include <Ptexture.h>

View File

@ -27,7 +27,7 @@
#include <D3D11.h>
#include <D3Dcompiler.h>
#include <far/error.h>
#include <opensubdiv/far/error.h>
D3D11DrawConfig::D3D11DrawConfig()
: _vertexShader(NULL), _hullShader(NULL), _domainShader(NULL),

View File

@ -25,8 +25,8 @@
#ifndef OPENSUBDIV_EXAMPLES_GL_CONTROL_MESH_DISPLAY_H
#define OPENSUBDIV_EXAMPLES_GL_CONTROL_MESH_DISPLAY_H
#include <osd/opengl.h>
#include <far/topologyLevel.h>
#include <opensubdiv/osd/opengl.h>
#include <opensubdiv/far/topologyLevel.h>
class GLControlMeshDisplay {
public:

View File

@ -27,7 +27,7 @@
#include "hud.h"
#include <osd/opengl.h>
#include <opensubdiv/osd/opengl.h>
class GLhud : public Hud {

View File

@ -25,7 +25,7 @@
#include "glPtexMipmapTexture.h"
#include "ptexMipmapTextureLoader.h"
#include <osd/opengl.h>
#include <opensubdiv/osd/opengl.h>
GLPtexMipmapTexture::GLPtexMipmapTexture()
: _width(0), _height(0), _depth(0), _layout(0), _texels(0), _memoryUsage(0)

View File

@ -25,8 +25,8 @@
#ifndef OPENSUBDIV_EXAMPLES_GL_PTEX_MIPMAP_TEXTURE_H
#define OPENSUBDIV_EXAMPLES_GL_PTEX_MIPMAP_TEXTURE_H
#include <osd/nonCopyable.h>
#include <osd/opengl.h>
#include <opensubdiv/osd/nonCopyable.h>
#include <opensubdiv/osd/opengl.h>
#include <Ptexture.h>
#include <stdlib.h>

View File

@ -26,8 +26,8 @@
#include "glUtils.h"
#include <vector>
#include <osd/opengl.h>
#include <far/error.h>
#include <opensubdiv/osd/opengl.h>
#include <opensubdiv/far/error.h>
GLDrawConfig::GLDrawConfig(const std::string &version)
: _version(version), _numShaders(0) {

View File

@ -25,7 +25,7 @@
#ifndef OPENSUBDIV_EXAMPLES_GL_SHADER_CACHE_H
#define OPENSUBDIV_EXAMPLES_GL_SHADER_CACHE_H
#include <osd/opengl.h>
#include <opensubdiv/osd/opengl.h>
#include <map>
#include <string>
#include "./shaderCache.h"

View File

@ -41,7 +41,7 @@
#endif
#endif
#include <osd/opengl.h>
#include <opensubdiv/osd/opengl.h>
#include <cstdio>
#include <string>

View File

@ -26,7 +26,7 @@
#define OPENSUBDIV_EXAMPLES_MTL_CONTROL_MESH_DISPLAY_H
#include <Metal/Metal.h>
#include <far/topologyLevel.h>
#include <opensubdiv/far/topologyLevel.h>
class MTLControlMeshDisplay {
public:

View File

@ -25,8 +25,8 @@
#ifndef OPENSUBDIV_EXAMPLES_MTL_PTEX_MIPMAP_TEXTURE_H
#define OPENSUBDIV_EXAMPLES_MTL_PTEX_MIPMAP_TEXTURE_H
#include <osd/mtlCommon.h>
#include <osd/nonCopyable.h>
#include <opensubdiv/osd/mtlCommon.h>
#include <opensubdiv/osd/nonCopyable.h>
#include <Ptexture.h>

View File

@ -25,7 +25,7 @@
#ifndef OPENSUBDIV_EXAMPLES_COMMON_PATCH_COLORS_H
#define OPENSUBDIV_EXAMPLES_COMMON_PATCH_COLORS_H
#include <far/patchTable.h>
#include <opensubdiv/far/patchTable.h>
// returns a unique color for each type of feature-adaptive patches
float const * getAdaptivePatchColor(OpenSubdiv::Far::PatchDescriptor const & desc);

View File

@ -38,6 +38,7 @@ set(PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${DXSDK_INCLUDE_DIR}"
"${PTEX_INCLUDE_DIR}"
)

View File

@ -35,6 +35,7 @@ set(PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${DXSDK_INCLUDE_DIR}"
)

View File

@ -32,6 +32,7 @@ set(SHADER_FILES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -31,6 +31,7 @@ list(APPEND PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -36,6 +36,7 @@ list(APPEND PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -24,6 +24,7 @@
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -38,6 +38,7 @@ list(APPEND PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLEW_INCLUDE_DIR}"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -40,6 +40,7 @@ list(APPEND PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
"${PTEX_INCLUDE_DIR}"
)

View File

@ -36,6 +36,7 @@ list(APPEND PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -31,6 +31,7 @@ list(APPEND PLATFORM_LIBRARIES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -31,6 +31,7 @@ set(SHADER_FILES
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${GLFW_INCLUDE_DIR}"
)

View File

@ -63,6 +63,7 @@ endif()
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${METAL_INCLUDE_DIR}"
"${PTEX_INCLUDE_DIR}"
)

View File

@ -62,6 +62,7 @@ endif()
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}"
"${OPENSUBDIV_INCLUDE_DIR}/opensubdiv"
"${METAL_INCLUDE_DIR}"
)

View File

@ -25,7 +25,7 @@
#ifndef CMP_UTILS_H
#define CMP_UTILS_H
#include <far/topologyRefinerFactory.h>
#include <opensubdiv/far/topologyRefinerFactory.h>
#include "hbr_utils.h"

View File

@ -25,13 +25,14 @@
#ifndef FAR_UTILS_H
#define FAR_UTILS_H
#include <far/topologyRefinerFactory.h>
#include <far/primvarRefiner.h>
#include <far/types.h>
#include "shape_utils.h"
#include <opensubdiv/far/topologyRefinerFactory.h>
#include <opensubdiv/far/primvarRefiner.h>
#include <opensubdiv/far/types.h>
#include <cstdio>
#include "shape_utils.h"
//------------------------------------------------------------------------------

View File

@ -29,16 +29,16 @@
#define HBR_ADAPTIVE
#endif
#include <hbr/mesh.h>
#include <hbr/bilinear.h>
#include <hbr/loop.h>
#include <hbr/catmark.h>
#include <hbr/vertexEdit.h>
#include <hbr/cornerEdit.h>
#include <hbr/holeEdit.h>
#include "shape_utils.h"
#include <opensubdiv/hbr/mesh.h>
#include <opensubdiv/hbr/bilinear.h>
#include <opensubdiv/hbr/loop.h>
#include <opensubdiv/hbr/catmark.h>
#include <opensubdiv/hbr/vertexEdit.h>
#include <opensubdiv/hbr/cornerEdit.h>
#include <opensubdiv/hbr/holeEdit.h>
#include <sstream>
//------------------------------------------------------------------------------

View File

@ -23,8 +23,7 @@
#
include_directories(
"${OPENSUBDIV_INCLUDE_DIR}/"
"${PROJECT_SOURCE_DIR}/"
"${OPENSUBDIV_INCLUDE_DIR}"
)
set(SOURCE_FILES

View File

@ -46,10 +46,10 @@ GLFWwindow* g_window=0;
#include <stdio.h>
#include <cassert>
#include <osd/cpuEvaluator.h>
#include <osd/cpuVertexBuffer.h>
#include <osd/cpuGLVertexBuffer.h>
#include <far/stencilTableFactory.h>
#include <opensubdiv/osd/cpuEvaluator.h>
#include <opensubdiv/osd/cpuVertexBuffer.h>
#include <opensubdiv/osd/cpuGLVertexBuffer.h>
#include <opensubdiv/far/stencilTableFactory.h>
#include "../common/cmp_utils.h"
#include "../common/hbr_utils.h"

View File

@ -24,7 +24,6 @@
include_directories(
"${PROJECT_SOURCE_DIR}/"
"${OPENSUBDIV_INCLUDE_DIR}/"
)