summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-12-03 12:37:46 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-12-03 12:37:46 +0000
commit4e6f8db35ddc8fd3f310bb5616d257b5f9996d94 (patch)
treef764ab4c884cbad4e0621cb811701459cc57781c /gfx/gl/sceneShader.cpp
parentTest case for finding ray entry points (diff)
downloadilt-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.cpp6
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