diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/network/network.impl.h | 2 | ||||
-rw-r--r-- | game/terrain.cpp | 5 | ||||
-rw-r--r-- | game/vehicles/railVehicleClass.cpp | 6 |
3 files changed, 6 insertions, 7 deletions
diff --git a/game/network/network.impl.h b/game/network/network.impl.h index 5f60c80..045335f 100644 --- a/game/network/network.impl.h +++ b/game/network/network.impl.h @@ -7,7 +7,7 @@ void NetworkOf<T>::render(const SceneShader & shader) const { if constexpr (std::is_base_of_v<Renderable, T>) { - shader.setModel(Location {}, SceneShader::Program::StaticPos); + shader.absolute.use(); texture->bind(); links.apply(&Renderable::render, shader); } diff --git a/game/terrain.cpp b/game/terrain.cpp index 911a541..31f7fb1 100644 --- a/game/terrain.cpp +++ b/game/terrain.cpp @@ -85,12 +85,11 @@ Terrain::tick(TickDuration dur) void Terrain::render(const SceneShader & shader) const { - shader.setModel(Location {}, SceneShader::Program::LandMass); + shader.landmass.use(); grass->bind(); meshes.apply(&Mesh::Draw); - shader.setModel(Location {}, SceneShader::Program::Water); - shader.setUniform("waves", {waveCycle, 0, 0}); + shader.water.use(waveCycle); water->bind(); meshes.apply(&Mesh::Draw); } diff --git a/game/vehicles/railVehicleClass.cpp b/game/vehicles/railVehicleClass.cpp index 7d69338..5bcdc6e 100644 --- a/game/vehicles/railVehicleClass.cpp +++ b/game/vehicles/railVehicleClass.cpp @@ -42,13 +42,13 @@ void RailVehicleClass::render( const SceneShader & shader, const Location & location, const std::array<Location, 2> & bl) const { + shader.basic.use(location); texture->bind(); + bodyMesh->Draw(); for (auto b = 0U; b < bogies.size(); ++b) { - shader.setModel(bl[b]); + shader.basic.setModel(bl[b]); bogies[b]->Draw(); } - shader.setModel(location); - bodyMesh->Draw(); } float |