le2d v0.4.8
2D game engine framework
 
Loading...
Searching...
No Matches
render_pass.hpp
Go to the documentation of this file.
1#pragma once
2#include "le2d/renderer.hpp"
3#include <glm/vec2.hpp>
4#include <klib/base_types.hpp>
5
6namespace le {
8class IRenderPass : public klib::Polymorphic {
9 public:
10 static constexpr auto min_size_v{32};
11 static constexpr auto max_size_v{4 * 4096};
12
13 [[nodiscard]] virtual auto get_render_device() const -> kvf::RenderDevice& = 0;
14
16 [[nodiscard]] virtual auto get_render_target() const -> kvf::RenderTarget const& = 0;
17
19 [[nodiscard]] virtual auto get_samples() const -> vk::SampleCountFlagBits = 0;
20
22 [[nodiscard]] virtual auto render_texture() const -> RenderTexture = 0;
23
26 virtual void set_clear_color(kvf::Color color) = 0;
27
29 virtual void recreate(vk::SampleCountFlagBits samples) = 0;
30
32 [[nodiscard]] virtual auto create_renderer() -> std::unique_ptr<IRenderer> = 0;
33};
34} // namespace le
Opaque interface for 2D render pass, owns a multi-sampled color RenderTarget.
Definition render_pass.hpp:8
virtual auto render_texture() const -> RenderTexture=0
virtual void set_clear_color(kvf::Color color)=0
Set clear color for next pass.
static constexpr auto max_size_v
Definition render_pass.hpp:11
static constexpr auto min_size_v
Definition render_pass.hpp:10
virtual auto get_samples() const -> vk::SampleCountFlagBits=0
virtual auto get_render_device() const -> kvf::RenderDevice &=0
virtual void recreate(vk::SampleCountFlagBits samples)=0
Recreate RenderTargets with possibly different MSAA samples.
virtual auto create_renderer() -> std::unique_ptr< IRenderer >=0
virtual auto get_render_target() const -> kvf::RenderTarget const &=0
Definition renderer.hpp:15
Wraps a RenderTarget as a texture.
Definition texture.hpp:55
Definition texture.hpp:9
Definition animation.hpp:8