summaryrefslogtreecommitdiff
path: root/game/network/network.impl.h
blob: 699cb9465b17aa6d1747cf21f5606eb9e184a175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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);
}

template<typename T>
void
NetworkOf<T>::joinLinks(const LinkPtr & l) const
{
	for (const auto & ol : links.objects) {
		Network::joinLinks(l, ol);
	}
}