summaryrefslogtreecommitdiff
path: root/gfx/gl/sceneShader.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-19 00:23:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-20 15:08:43 +0000
commitc7af64b7061c59c987958d0830838f1c05caeb29 (patch)
tree8195696b2130eb6a2674c075416b15a352440b61 /gfx/gl/sceneShader.cpp
parentCopy render vital link data to vertex buffer (diff)
downloadilt-c7af64b7061c59c987958d0830838f1c05caeb29.tar.bz2
ilt-c7af64b7061c59c987958d0830838f1c05caeb29.tar.xz
ilt-c7af64b7061c59c987958d0830838f1c05caeb29.zip
Render rail network using new shaders
Non-functional, totally unimplemented at this stage
Diffstat (limited to 'gfx/gl/sceneShader.cpp')
-rw-r--r--gfx/gl/sceneShader.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/gfx/gl/sceneShader.cpp b/gfx/gl/sceneShader.cpp
index 1b3b27c..146e642 100644
--- a/gfx/gl/sceneShader.cpp
+++ b/gfx/gl/sceneShader.cpp
@@ -1,14 +1,19 @@
#include "sceneShader.h"
#include <gfx/gl/shaders/fs-landmass.h>
#include <gfx/gl/shaders/fs-material.h>
+#include <gfx/gl/shaders/fs-network.h>
#include <gfx/gl/shaders/fs-pointLight.h>
#include <gfx/gl/shaders/fs-spotLight.h>
#include <gfx/gl/shaders/fs-water.h>
+#include <gfx/gl/shaders/gs-networkCurve.h>
+#include <gfx/gl/shaders/gs-networkStraight.h>
#include <gfx/gl/shaders/gs-pointLight.h>
#include <gfx/gl/shaders/gs-spotLight.h>
#include <gfx/gl/shaders/vs-dynamicPoint.h>
#include <gfx/gl/shaders/vs-dynamicPointInst.h>
#include <gfx/gl/shaders/vs-fixedPoint.h>
+#include <gfx/gl/shaders/vs-networkCurve.h>
+#include <gfx/gl/shaders/vs-networkStraight.h>
#include <gfx/gl/shaders/vs-pointLight.h>
#include <gfx/gl/shaders/vs-spotLight.h>
#include <gfx/gl/shaders/vs-water.h>
@@ -21,15 +26,17 @@
SceneShader::SceneShader() :
basicInst {dynamicPointInst_vs, material_fs}, landmass {fixedPoint_vs, landmass_fs},
absolute {fixedPoint_vs, material_fs}, spotLightInst {spotLight_vs, spotLight_gs, spotLight_fs},
- pointLightInst {pointLight_vs, pointLight_gs, pointLight_fs}
+ pointLightInst {pointLight_vs, pointLight_gs, pointLight_fs},
+ networkStraight {networkStraight_vs, networkStraight_gs, network_fs},
+ networkCurve {networkCurve_vs, networkCurve_gs, network_fs}
{
}
void
SceneShader::setViewProjection(const GlobalPosition3D & viewPoint, const glm::mat4 & viewProjection) const
{
- for (const auto & prog : std::initializer_list<const SceneProgram *> {
- &basic, &basicInst, &water, &landmass, &absolute, &pointLightInst, &spotLightInst}) {
+ for (const auto & prog : std::initializer_list<const SceneProgram *> {&basic, &basicInst, &water, &landmass,
+ &absolute, &pointLightInst, &spotLightInst, &networkStraight, &networkCurve}) {
prog->setViewProjection(viewPoint, viewProjection);
}
}
@@ -37,8 +44,8 @@ SceneShader::setViewProjection(const GlobalPosition3D & viewPoint, const glm::ma
void
SceneShader::setViewPort(const ViewPort & viewPort) const
{
- for (const auto & prog : std::initializer_list<const SceneProgram *> {
- &basic, &basicInst, &water, &landmass, &absolute, &pointLightInst, &spotLightInst}) {
+ for (const auto & prog : std::initializer_list<const SceneProgram *> {&basic, &basicInst, &water, &landmass,
+ &absolute, &pointLightInst, &spotLightInst, &networkStraight, &networkCurve}) {
prog->setViewPort(viewPort);
}
}