diff options
-rw-r--r-- | game/network/network.impl.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/game/network/network.impl.h b/game/network/network.impl.h index 699cb94..d2e9ff0 100644 --- a/game/network/network.impl.h +++ b/game/network/network.impl.h @@ -6,9 +6,11 @@ template<typename T> void NetworkOf<T>::render(const Shader & shader) const { - shader.setModel(Location {}, Shader::Program::StaticPos); - texture->Bind(); - links.apply(&T::render, shader); + if constexpr (std::is_base_of_v<Renderable, T>) { + shader.setModel(Location {}, Shader::Program::StaticPos); + texture->Bind(); + links.apply(&Renderable::render, shader); + } } template<typename T> |