From 5dc52d15b89bb4c13a1aef63b0f313a713c53ad1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 13 Mar 2021 14:41:10 +0000 Subject: Only attempt to render renderable networks --- game/network/network.impl.h | 8 +++++--- 1 file 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 void NetworkOf::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) { + shader.setModel(Location {}, Shader::Program::StaticPos); + texture->Bind(); + links.apply(&Renderable::render, shader); + } } template -- cgit v1.2.3