diff options
author | Sebastian Park <SebPark03@gmail.com> | 2024-04-23 21:54:06 -0400 |
---|---|---|
committer | Sebastian Park <SebPark03@gmail.com> | 2024-04-23 21:54:06 -0400 |
commit | ee37315e203286eba679c910e19544648abdcacf (patch) | |
tree | 1dbb8ef6d72f0945d4eaf607e442b7c36edf075e /src | |
parent | 8efd1990da43eefac85e6449881795ae9d974954 (diff) |
Change sampler names to ground sampler .
Diffstat (limited to 'src')
-rw-r--r-- | src/arap.h | 4 | ||||
-rw-r--r-- | src/graphics/shape.cpp | 6 | ||||
-rw-r--r-- | src/graphics/shape.h | 2 |
3 files changed, 8 insertions, 4 deletions
@@ -47,6 +47,10 @@ public: m_shape.initGroundPlane(texturePath, depth, shader); } + void initSkyPlane(std::string texturePath, float height, Shader* shader) { + m_shape.initSkyPlane(texturePath, height, shader); + } + SelectMode select(Shader *shader, int vertex) { return m_shape.select(shader, vertex); diff --git a/src/graphics/shape.cpp b/src/graphics/shape.cpp index fb0178f..e3612e5 100644 --- a/src/graphics/shape.cpp +++ b/src/graphics/shape.cpp @@ -363,11 +363,11 @@ void Shape::initGroundPlane(std::string texturePath, float depth, Shader* shader // // TASK 10: set the texture.frag uniform for our texture shader->bind(); - shader->setUniform("sampler", 0); + shader->setUniform("groundSampler", 0); shader->unbind(); } -void Shape::initSkyPlane(std::string texturePath, float depth, Shader* shader) { +void Shape::initSkyPlane(std::string texturePath, float height, Shader* shader) { //TODO: Complete QString ground_texture_filepath = QString(texturePath.c_str()); @@ -401,7 +401,7 @@ void Shape::initSkyPlane(std::string texturePath, float depth, Shader* shader) { // // TASK 10: set the texture.frag uniform for our texture shader->bind(); - shader->setUniform("sampler", 1); + shader->setUniform("skySampler", 1); shader->unbind(); } diff --git a/src/graphics/shape.h b/src/graphics/shape.h index 165fa96..b993b28 100644 --- a/src/graphics/shape.h +++ b/src/graphics/shape.h @@ -38,7 +38,7 @@ public: void setColor(float r, float g, float b); void initGroundPlane(std::string texturePath, float depth, Shader* shader); - void initSkyPlane(std::string texturePath, float depth, Shader* shader); + void initSkyPlane(std::string texturePath, float height, Shader* shader); void draw(Shader *shader, GLenum mode); SelectMode select(Shader *shader, int vertex); |