mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
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:
@@ -19,6 +19,7 @@
|
||||
#include <SOIL.h>
|
||||
|
||||
#include <random> // necessary for generation of random floats (for sample kernel and noise texture)
|
||||
#include <learnopengl/filesystem.h>
|
||||
|
||||
// Properties
|
||||
const GLuint SCR_WIDTH = 800, SCR_HEIGHT = 600;
|
||||
@@ -96,7 +97,7 @@ int main()
|
||||
glUniform1i(glGetUniformLocation(shaderSSAO.Program, "texNoise"), 2);
|
||||
|
||||
// Objects
|
||||
Model nanosuit("../../../resources/objects/nanosuit/nanosuit.obj");
|
||||
Model nanosuit(FileSystem::getPath("resources/objects/nanosuit/nanosuit.obj").c_str());
|
||||
|
||||
// Lights
|
||||
glm::vec3 lightPos = glm::vec3(2.0, 4.0, -2.0);
|
||||
|
||||
Reference in New Issue
Block a user