diff --git a/OpenGLEngine/MyBasicShaderProgram.cpp b/OpenGLEngine/MyBasicShaderProgram.cpp
index 1454dcd..4b59e5f 100644
--- a/OpenGLEngine/MyBasicShaderProgram.cpp
+++ b/OpenGLEngine/MyBasicShaderProgram.cpp
@@ -4,8 +4,8 @@
MyBasicShaderProgram::MyBasicShaderProgram()
// TEMP Hardcode in the path. (Should Use Relative Path to General Shader Dir)
- : m_vertex_shader(Util::load_file("D:/Development/C++/OpenGLEngine/OpenGLEngine/MyBasicVS.glsl"), VERTEX_SHADER),
- m_fragment_shader(Util::load_file("D:/Development/C++/OpenGLEngine/OpenGLEngine/MyBasicFS.glsl"), FRAGMENT_SHADER)
+ : m_vertex_shader(Util::load_file(SHADER_PATH "MyBasicVS.glsl"), VERTEX_SHADER),
+ m_fragment_shader(Util::load_file(SHADER_PATH "MyBasicFS.glsl"), FRAGMENT_SHADER)
{
attach_shader(m_vertex_shader);
attach_shader(m_fragment_shader);
diff --git a/OpenGLEngine/MySimpleShaderProgram.cpp b/OpenGLEngine/MySimpleShaderProgram.cpp
index db7f976..7ed61c4 100644
--- a/OpenGLEngine/MySimpleShaderProgram.cpp
+++ b/OpenGLEngine/MySimpleShaderProgram.cpp
@@ -4,8 +4,8 @@
MySimpleShaderProgram::MySimpleShaderProgram()
// TEMP Hardcode in the path. (Should Use Relative Path to General Shader Dir)
- : m_vertex_shader(Util::load_file("D:/Development/C++/OpenGLEngine/OpenGLEngine/MySimpleVS.glsl"), VERTEX_SHADER),
- m_fragment_shader(Util::load_file("D:/Development/C++/OpenGLEngine/OpenGLEngine/MySimpleFS.glsl"), FRAGMENT_SHADER)
+ : m_vertex_shader(Util::load_file(SHADER_PATH "MySimpleVS.glsl"), VERTEX_SHADER),
+ m_fragment_shader(Util::load_file(SHADER_PATH "MySimpleFS.glsl"), FRAGMENT_SHADER)
{
attach_shader(m_vertex_shader);
attach_shader(m_fragment_shader);
diff --git a/OpenGLEngine/OpenGLEngine.vcxproj b/OpenGLEngine/OpenGLEngine.vcxproj
index d07bbd5..accd101 100644
--- a/OpenGLEngine/OpenGLEngine.vcxproj
+++ b/OpenGLEngine/OpenGLEngine.vcxproj
@@ -91,6 +91,7 @@
true
$(ProjectDir)..\include;%(AdditionalIncludeDirectories)
NotUsing
+ SHADER_PATH=R"($(ProjectDir))";%(PreprocessorDefinitions)
@@ -130,6 +131,7 @@
true
$(ProjectDir)..\include;%(AdditionalIncludeDirectories)
NotUsing
+ SHADER_PATH=R"($(ProjectDir))";%(PreprocessorDefinitions)
true