summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 23:21:25 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-07-07 23:21:25 +0100
commit07064efcfecb0f1140f829ee2481079fa02cc587 (patch)
treead9914fc74c46cacbfb6a1187ce99cb89171521a /gfx/gl/sceneShader.cpp
parentAdd shadow shader which takes into account texture transparency (diff)
downloadilt-07064efcfecb0f1140f829ee2481079fa02cc587.tar.bz2
ilt-07064efcfecb0f1140f829ee2481079fa02cc587.tar.xz
ilt-07064efcfecb0f1140f829ee2481079fa02cc587.zip
Simplify setup of uniform locations and containing programs
Diffstat (limited to 'gfx/gl/sceneShader.cpp')
-rw-r--r--gfx/gl/sceneShader.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/gfx/gl/sceneShader.cpp b/gfx/gl/sceneShader.cpp
index 985faa0..4cbccb3 100644
--- a/gfx/gl/sceneShader.cpp
+++ b/gfx/gl/sceneShader.cpp
@@ -71,10 +71,7 @@ SceneShader::SceneProgram::setViewPort(const ViewPort & viewPort) const
}
}
-SceneShader::BasicProgram::BasicProgram() :
- SceneProgram {dynamicPoint_vs, material_fs}, modelLoc {*this, "model"}, modelPosLoc {*this, "modelPos"}
-{
-}
+SceneShader::BasicProgram::BasicProgram() : SceneProgram {dynamicPoint_vs, material_fs} { }
void
SceneShader::BasicProgram::setModel(Location const & location) const
@@ -90,13 +87,6 @@ SceneShader::BasicProgram::use(Location const & location) const
setModel(location);
}
-template<typename... S>
-SceneShader::NetworkProgram::NetworkProgram(S &&... s) :
- AbsolutePosProgram {std::forward<S>(s)...}, profileLoc {*this, "profile"}, texturePosLoc {*this, "texturePos"},
- profileLengthLoc {*this, "profileLength"}
-{
-}
-
void
SceneShader::NetworkProgram::use(
const std::span<const glm::vec3> profile, const std::span<const float> texturePos) const
@@ -107,7 +97,7 @@ SceneShader::NetworkProgram::use(
glUniform(profileLengthLoc, static_cast<GLuint>(profile.size()));
}
-SceneShader::WaterProgram::WaterProgram() : SceneProgram {water_vs, water_fs}, waveLoc {*this, "waves"} { }
+SceneShader::WaterProgram::WaterProgram() : SceneProgram {water_vs, water_fs} { }
void
SceneShader::WaterProgram::use(float waveCycle) const