From 07064efcfecb0f1140f829ee2481079fa02cc587 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jul 2024 23:21:25 +0100 Subject: Simplify setup of uniform locations and containing programs --- gfx/gl/sceneShader.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'gfx/gl/sceneShader.cpp') 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 -SceneShader::NetworkProgram::NetworkProgram(S &&... s) : - AbsolutePosProgram {std::forward(s)...}, profileLoc {*this, "profile"}, texturePosLoc {*this, "texturePos"}, - profileLengthLoc {*this, "profileLength"} -{ -} - void SceneShader::NetworkProgram::use( const std::span profile, const std::span texturePos) const @@ -107,7 +97,7 @@ SceneShader::NetworkProgram::use( glUniform(profileLengthLoc, static_cast(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 -- cgit v1.2.3