Support for out-of-source builds.

Uses environment variable to tell the program where to find resource
files.
Sharder sources are still search for in the current workind directory.
This commit is contained in:
Marin Nilsson
2015-07-30 21:48:41 +02:00
parent eac76c9a50
commit a8a8d11f22
28 changed files with 189 additions and 118 deletions

View File

@@ -20,6 +20,7 @@
// Other Libs
#include <SOIL.h>
#include <learnopengl/filesystem.h>
// Properties
GLuint screenWidth = 800, screenHeight = 600;
@@ -74,8 +75,8 @@ int main()
Shader shader("shader.vs", "shader.frag");
// Load models
Model ourModel("../../../resources/objects/nanosuit/nanosuit.obj");
Model ourModel(FileSystem::getPath("resources/objects/nanosuit/nanosuit.obj").c_str());
// Draw in wireframe
//glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);