frustum_culling_pass.hpp 1.24 KB
Newer Older
1
2
3
4
5
6
#pragma once

#include <mirrage/renderer/deferred_renderer.hpp>

namespace mirrage::renderer {

7
8
	class Frustum_culling_pass_factory;

9
10
	class Frustum_culling_pass : public Render_pass {
	  public:
11
12
		using Factory = Frustum_culling_pass_factory;

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
		Frustum_culling_pass(Deferred_renderer&, ecs::Entity_manager&);


		void update(util::Time dt) override;
		void draw(Frame_data&) override;

		auto name() const noexcept -> const char* override { return "Frustum_culling"; }

	  private:
		Deferred_renderer&   _renderer;
		ecs::Entity_manager& _ecs;
	};

	class Frustum_culling_pass_factory : public Render_pass_factory {
	  public:
28
29
30
31
32
		auto id() const noexcept -> Render_pass_id override
		{
			return render_pass_id_of<Frustum_culling_pass_factory>();
		}

33
34
35
36
37
		auto create_pass(Deferred_renderer&,
		                 std::shared_ptr<void>,
		                 util::maybe<ecs::Entity_manager&>,
		                 Engine&,
		                 bool&) -> std::unique_ptr<Render_pass> override;
38
39
40
41
42
43
44
45

		auto rank_device(vk::PhysicalDevice, util::maybe<std::uint32_t>, int) -> int override;

		void configure_device(vk::PhysicalDevice,
		                      util::maybe<std::uint32_t>,
		                      graphic::Device_create_info&) override;
	};
} // namespace mirrage::renderer