diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-12-03 12:37:46 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-12-03 12:37:46 +0000 |
commit | 4e6f8db35ddc8fd3f310bb5616d257b5f9996d94 (patch) | |
tree | f764ab4c884cbad4e0621cb811701459cc57781c /gfx/gl/sceneShader.cpp | |
parent | Test case for finding ray entry points (diff) | |
download | ilt-4e6f8db35ddc8fd3f310bb5616d257b5f9996d94.tar.bz2 ilt-4e6f8db35ddc8fd3f310bb5616d257b5f9996d94.tar.xz ilt-4e6f8db35ddc8fd3f310bb5616d257b5f9996d94.zip |
Shader viewPoint now an integer
Diffstat (limited to 'gfx/gl/sceneShader.cpp')
-rw-r--r-- | gfx/gl/sceneShader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/gl/sceneShader.cpp b/gfx/gl/sceneShader.cpp index 59a9748..57c8bb7 100644 --- a/gfx/gl/sceneShader.cpp +++ b/gfx/gl/sceneShader.cpp @@ -26,7 +26,7 @@ SceneShader::SceneShader() : } void -SceneShader::setViewProjection(const Position3D & viewPoint, const glm::mat4 & viewProjection) const +SceneShader::setViewProjection(const GlobalPosition3D & viewPoint, const glm::mat4 & viewProjection) const { for (const auto & prog : std::array<const SceneProgram *, 7> { &basic, &basicInst, &water, &landmass, &absolute, &pointLight, &spotLight}) { @@ -44,11 +44,11 @@ SceneShader::setViewPort(const ViewPort & viewPort) const } void -SceneShader::SceneProgram::setViewProjection(const Position3D & viewPoint, const glm::mat4 & viewProjection) const +SceneShader::SceneProgram::setViewProjection(const GlobalPosition3D & viewPoint, const glm::mat4 & viewProjection) const { glUseProgram(*this); glUniformMatrix4fv(viewProjectionLoc, 1, GL_FALSE, glm::value_ptr(viewProjection)); - glUniform3fv(viewPointLoc, 1, glm::value_ptr(viewPoint)); + glUniform3iv(viewPointLoc, 1, glm::value_ptr(viewPoint)); } void |