diff --git a/include/DebugCallback.h b/include/DebugCallback.h index ecad42c..0bec4c9 100644 --- a/include/DebugCallback.h +++ b/include/DebugCallback.h @@ -1,6 +1,6 @@ #pragma once -#include +//#include #include diff --git a/include/InitShader.h b/include/InitShader.h index a04638e..e689989 100644 --- a/include/InitShader.h +++ b/include/InitShader.h @@ -1,7 +1,6 @@ #ifndef __INITSHADER_H__ #define __INITSHADER_H__ -#include #include GLuint InitShader( const char* computeShaderFile); diff --git a/include/PlatformUtils.h b/include/PlatformUtils.h new file mode 100644 index 0000000..3c45673 --- /dev/null +++ b/include/PlatformUtils.h @@ -0,0 +1,13 @@ +#pragma once + +#ifdef _WIN32 +#include +#define DEBUG_BREAK() DebugBreak() +#else +#include +#define DEBUG_BREAK() raise(SIGTRAP) +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif diff --git a/source/Callbacks.cpp b/source/Callbacks.cpp index 5a6ab15..a72d8f6 100644 --- a/source/Callbacks.cpp +++ b/source/Callbacks.cpp @@ -1,5 +1,6 @@ #include "Callbacks.h" -#include "Scene.h" +#include "PlatformUtils.h" +#include "scene.h" #include void Callbacks::Register(GLFWwindow* window) diff --git a/source/DebugCallback.cpp b/source/DebugCallback.cpp index 8b6a8bc..a1aeb69 100644 --- a/source/DebugCallback.cpp +++ b/source/DebugCallback.cpp @@ -26,6 +26,7 @@ void RegisterDebugCallback() #ifdef WIN32 +#include /* Only run this code on WindowsAPI systems, otherwise use cout */ // C-based callback implementation diff --git a/source/scene.cpp b/source/scene.cpp index 20c4f80..a24d616 100644 --- a/source/scene.cpp +++ b/source/scene.cpp @@ -23,6 +23,7 @@ //#include "LoadTexture.h" //Functions for creating OpenGL textures from image files //#include "VideoRecorder.h" //Functions for saving videos #include "DebugCallback.h" +#include "PlatformUtils.h" static const std::string vertex_shader("shaders/vertex.glsl"); static const std::string fragment_shader("shaders/fragment.glsl");