summaryrefslogtreecommitdiff
path: root/game/network/network.impl.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-10 00:53:08 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-10 00:53:08 +0000
commitc274ac05690b34ba05b41d6e7864e6a663c73c1a (patch)
treeb73b3654ae8cd99deba893b278378a4831e5c70c /game/network/network.impl.h
parentAdd findNodeAt to locate a node instance by position (diff)
downloadilt-c274ac05690b34ba05b41d6e7864e6a663c73c1a.tar.bz2
ilt-c274ac05690b34ba05b41d6e7864e6a663c73c1a.tar.xz
ilt-c274ac05690b34ba05b41d6e7864e6a663c73c1a.zip
Push RailLinks functionality into new base classes Network and NetworkOf<>
Diffstat (limited to 'game/network/network.impl.h')
-rw-r--r--game/network/network.impl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/game/network/network.impl.h b/game/network/network.impl.h
new file mode 100644
index 0000000..ddb1ae5
--- /dev/null
+++ b/game/network/network.impl.h
@@ -0,0 +1,12 @@
+#include "network.h"
+#include <gfx/gl/shader.h>
+#include <gfx/models/texture.h>
+
+template<typename T>
+void
+NetworkOf<T>::render(const Shader & shader) const
+{
+ shader.setModel(Location {}, Shader::Program::StaticPos);
+ texture->Bind();
+ links.apply(&T::render, shader);
+}