From 625b78bba16dcbbe97fa84bbf8f2273472d79ade Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 6 Mar 2025 00:25:22 +0000 Subject: Pass frustum into render functions Support for culling objects outside the view frustum --- ui/editNetwork.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/editNetwork.h') diff --git a/ui/editNetwork.h b/ui/editNetwork.h index 2ae467d..ae887bd 100644 --- a/ui/editNetwork.h +++ b/ui/editNetwork.h @@ -18,7 +18,7 @@ public: bool click(const SDL_MouseButtonEvent & e, const Ray &) override; bool move(const SDL_MouseMotionEvent & e, const Ray &) override; bool handleInput(const SDL_Event & e, const UIComponent::Position &) override; - void render(const SceneShader &) const override; + void render(const SceneShader &, const Frustum &) const override; void render(const UIShader & shader, const UIComponent::Position & pos) const override; using NetworkClickPos = std::variant; @@ -26,7 +26,7 @@ public: class Builder { public: virtual ~Builder() = default; - virtual void render(const SceneShader & shader) const; + virtual void render(const SceneShader & shader, const Frustum &) const; virtual std::string hint() const = 0; virtual void click(Network *, const GeoData *, const SDL_MouseButtonEvent &, const Ray &) = 0; virtual void move(Network *, const GeoData *, const SDL_MouseMotionEvent &, const Ray &) = 0; -- cgit v1.2.3