5 #include <alicorn/std/string.forward.hpp>
6 #include <alicorn/std.memory/unique-ptr.hpp>
7 #include <Covellite/Predefined.hpp>
8 #include <Covellite/Api/Component.hpp>
13 namespace api {
namespace renderer {
class Renderer; } }
43 public CovelliteGui::Core::RenderInterface
45 using String_t = ::alicorn::extension::std::String;
46 using Render_t = ::std::function<void(
void)>;
47 using Renders_t = ::std::vector<Render_t>;
49 using RendersPtr_t = ::std::shared_ptr<Component_t::Renders>;
50 using ComponentPtr_t = ::std::shared_ptr<Component_t>;
51 using Object_t = ::std::vector<ComponentPtr_t>;
55 void RenderGeometry(CovelliteGui::Core::Vertex *,
int,
int *,
int,
56 CovelliteGui::Core::TextureHandle,
const CovelliteGui::Core::Vector2f &)
override;
57 CovelliteGui::Core::CompiledGeometryHandle CompileGeometry(CovelliteGui::Core::Vertex *,
58 int,
int *,
int, CovelliteGui::Core::TextureHandle)
override;
59 void RenderCompiledGeometry(CovelliteGui::Core::CompiledGeometryHandle,
60 const CovelliteGui::Core::Vector2f &)
override;
61 void ReleaseCompiledGeometry(CovelliteGui::Core::CompiledGeometryHandle)
override;
62 void EnableScissorRegion(
bool)
override;
63 void SetScissorRegion(
int,
int,
int,
int)
override;
64 bool LoadTexture(CovelliteGui::Core::TextureHandle &, CovelliteGui::Core::Vector2i &,
65 const CovelliteGui::Core::String &)
override;
66 bool GenerateTexture(CovelliteGui::Core::TextureHandle &,
67 const CovelliteGui::Core::byte *,
const CovelliteGui::Core::Vector2i &)
override;
68 void ReleaseTexture(CovelliteGui::Core::TextureHandle)
override;
71 void RenderScene(
void);
74 const RendersPtr_t m_pRenders;
77 const Renders_t m_DefaultRenders;
78 ComponentPtr_t m_pScissorRect;
83 ComponentPtr_t pPosition;
87 ::std::map<size_t, Object> m_Objects;
89 Renders_t m_RenderQueue;
92 explicit Renderer(
const RendersPtr_t &);
95 friend ::covellite::api::renderer::Renderer;