diff --git a/testbed/CMakeLists.txt b/testbed/CMakeLists.txt index 4d3ecdac..cd66c695 100644 --- a/testbed/CMakeLists.txt +++ b/testbed/CMakeLists.txt @@ -28,7 +28,7 @@ SET(CMAKE_CXX_FLAGS "-std=c++0x") #ADD_DEFINITIONS(-DGL3) # Headers -INCLUDE_DIRECTORIES("src/" "opengl-framework/src/" "glfw/include/" "common/" "scenes/" "imgui/") +INCLUDE_DIRECTORIES(${GLEW_INCLUDE_PATH} "src/" "opengl-framework/src/" "glfw/include/" "common/" "scenes/" "imgui/") # Testbed source files SET(TESTBED_SOURCES diff --git a/testbed/common/Cone.cpp b/testbed/common/Cone.cpp index 6657ed9d..079a6189 100644 --- a/testbed/common/Cone.cpp +++ b/testbed/common/Cone.cpp @@ -236,7 +236,7 @@ void Cone::createVBOAndVAO() { // Create th VBO for the indices data mVBOIndices.create(); mVBOIndices.bind(); - size_t sizeIndices = mIndices[0].size() * sizeof(uint); + size_t sizeIndices = mIndices[0].size() * sizeof(unsigned int); mVBOIndices.copyDataIntoVBO(sizeIndices, getIndicesPointer(), GL_STATIC_DRAW); mVBOIndices.unbind(); diff --git a/testbed/common/ConvexMesh.cpp b/testbed/common/ConvexMesh.cpp index cd766e5a..182c5940 100644 --- a/testbed/common/ConvexMesh.cpp +++ b/testbed/common/ConvexMesh.cpp @@ -260,7 +260,7 @@ void ConvexMesh::createVBOAndVAO() { // Create th VBO for the indices data mVBOIndices.create(); mVBOIndices.bind(); - size_t sizeIndices = mIndices[0].size() * sizeof(uint); + size_t sizeIndices = mIndices[0].size() * sizeof(unsigned int); mVBOIndices.copyDataIntoVBO(sizeIndices, getIndicesPointer(), GL_STATIC_DRAW); mVBOIndices.unbind(); diff --git a/testbed/common/Cylinder.cpp b/testbed/common/Cylinder.cpp index 2aa45923..bfc39092 100644 --- a/testbed/common/Cylinder.cpp +++ b/testbed/common/Cylinder.cpp @@ -237,7 +237,7 @@ void Cylinder::createVBOAndVAO() { // Create th VBO for the indices data mVBOIndices.create(); mVBOIndices.bind(); - size_t sizeIndices = mIndices[0].size() * sizeof(uint); + size_t sizeIndices = mIndices[0].size() * sizeof(unsigned int); mVBOIndices.copyDataIntoVBO(sizeIndices, getIndicesPointer(), GL_STATIC_DRAW); mVBOIndices.unbind(); diff --git a/testbed/common/Dumbbell.cpp b/testbed/common/Dumbbell.cpp index 630630ee..12bf37e7 100644 --- a/testbed/common/Dumbbell.cpp +++ b/testbed/common/Dumbbell.cpp @@ -273,7 +273,7 @@ void Dumbbell::createVBOAndVAO() { // Create th VBO for the indices data mVBOIndices.create(); mVBOIndices.bind(); - size_t sizeIndices = mIndices[0].size() * sizeof(uint); + size_t sizeIndices = mIndices[0].size() * sizeof(unsigned int); mVBOIndices.copyDataIntoVBO(sizeIndices, getIndicesPointer(), GL_STATIC_DRAW); mVBOIndices.unbind(); diff --git a/testbed/common/VisualContactPoint.cpp b/testbed/common/VisualContactPoint.cpp index b0d5351d..0014a980 100644 --- a/testbed/common/VisualContactPoint.cpp +++ b/testbed/common/VisualContactPoint.cpp @@ -161,7 +161,7 @@ void VisualContactPoint::createVBOAndVAO() { // Create th VBO for the indices data mVBOIndices.create(); mVBOIndices.bind(); - size_t sizeIndices = mMesh.getIndices(0).size() * sizeof(uint); + size_t sizeIndices = mMesh.getIndices(0).size() * sizeof(unsigned int); mVBOIndices.copyDataIntoVBO(sizeIndices, mMesh.getIndicesPointer(), GL_STATIC_DRAW); mVBOIndices.unbind(); diff --git a/testbed/opengl-framework/src/maths/Matrix4.h b/testbed/opengl-framework/src/maths/Matrix4.h index 9463b15b..1a504c38 100644 --- a/testbed/opengl-framework/src/maths/Matrix4.h +++ b/testbed/opengl-framework/src/maths/Matrix4.h @@ -33,6 +33,7 @@ #include "Vector3.h" #include "Vector4.h" #include "Matrix3.h" +#include "definitions.h" namespace openglframework { @@ -441,7 +442,7 @@ inline Matrix4 Matrix4::perspectiveProjectionMatrix(float near, float far, int w // Compute the aspect ratio float aspect = float(width) / float(height); - float top = near * tan((fieldOfView / 2.0f) * (float(M_PI) / 180.0f)); + float top = near * tan((fieldOfView / 2.0f) * (float(PI) / 180.0f)); float bottom = -top; float left = bottom * aspect; float right = top * aspect; diff --git a/testbed/scenes/raycast/RaycastScene.cpp b/testbed/scenes/raycast/RaycastScene.cpp index c437df5b..b2760012 100644 --- a/testbed/scenes/raycast/RaycastScene.cpp +++ b/testbed/scenes/raycast/RaycastScene.cpp @@ -139,8 +139,8 @@ void RaycastScene::createLines() { for (int i=0; i