diff --git a/CMake/Modules/CG1Helper.cmake b/CMake/Modules/CG1Helper.cmake index 4083913..77d2dd5 100644 --- a/CMake/Modules/CG1Helper.cmake +++ b/CMake/Modules/CG1Helper.cmake @@ -75,9 +75,9 @@ FUNCTION(SetupBuildEnvironment) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CLANG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-unused-result") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-unused-result -Wno-misleading-indentation") endif() set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE) set (CMAKE_CXX_STANDARD 14 PARENT_SCOPE) -ENDFUNCTION() \ No newline at end of file +ENDFUNCTION() diff --git a/CMakeLists.txt b/CMakeLists.txt index d4c9b56..d9fca8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(OPENMESH_BUILD_PYTHON_BINDINGS OFF CACHE BOOL " " FORCE) set(OPENMESH_BUILD_SHARED OFF CACHE BOOL " ") add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/OpenMesh ext_build/OpenMesh) if(TARGET OpenMeshCoreStatic) - set(LIBS ${LIBS} OpenMeshCoreStatic) + set(LIBS ${LIBS} OpenMeshCoreStatic) set_property(TARGET OpenMeshCoreStatic OpenMeshToolsStatic PROPERTY FOLDER "dependencies") set_property(TARGET OpenMeshCore OpenMeshToolsStatic PROPERTY EXCLUDE_FROM_ALL TRUE) else() @@ -39,6 +39,7 @@ endif() include_directories(ext/OpenMesh/src) set_property(TARGET OpenMeshCore OpenMeshTools PROPERTY FOLDER "dependencies") set_property(TARGET OpenMeshTools PROPERTY EXCLUDE_FROM_ALL TRUE) +add_definitions(/DOM_STATIC_BUILD) add_subdirectory(common) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/include) @@ -46,4 +47,4 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/include) add_subdirectory(exercise1) add_subdirectory(exercise2) add_subdirectory(exercise3) -add_subdirectory(exercise4) \ No newline at end of file +add_subdirectory(exercise4) diff --git a/exercise1/src/Viewer.cpp b/exercise1/src/Viewer.cpp index 64488b1..aeef41f 100644 --- a/exercise1/src/Viewer.cpp +++ b/exercise1/src/Viewer.cpp @@ -78,6 +78,7 @@ void Viewer::CreateVertexBuffers() // "in_position". First, get the location of this attribute in // the shader program GLuint vid = glGetAttribLocation(program_id, "in_position"); + // Enable this vertex attribute array glEnableVertexAttribArray(vid); // Set the format of the data to match the type of "in_position" diff --git a/exercise3/include/AABBTree.h b/exercise3/include/AABBTree.h index 67b6868..6e6e893 100644 --- a/exercise3/include/AABBTree.h +++ b/exercise3/include/AABBTree.h @@ -364,7 +364,7 @@ public: if(k_best.size() < k ) { k_best.push(ResultEntry(dist,*pit)); - return; + continue; } if(k_best.top().SqrDistance > dist) {