4 #include "IGraphicApi.hpp"
5 #include "Api.forward.hpp"
32 public Registator_t<IGraphicApi>
34 using Components_t = ::std::deque<ComponentPtr_t>;
41 void PresentFrame(
void)
override;
42 const Creators_t & GetCreators(
void)
const noexcept
final;
45 virtual Render_t CreateCamera(
const ComponentPtr_t &) = 0;
46 virtual Render_t CreateBkSurface(
const ComponentPtr_t &) = 0;
47 virtual Render_t CreateState(
const ComponentPtr_t &) = 0;
48 virtual Render_t CreateShader(
const ComponentPtr_t &) = 0;
49 virtual Render_t CreateTexture(
const ComponentPtr_t &) = 0;
50 virtual Render_t CreateBuffer(
const ComponentPtr_t &) = 0;
51 virtual Render_t CreateTransform(
const ComponentPtr_t &) = 0;
52 virtual Render_t CreatePresentBuffer(
const ComponentPtr_t &) = 0;
55 template<
class TColor>
56 static TColor ARGBtoFloat4(uint32_t);
59 Render_t CreateUpdater(
const ComponentPtr_t &)
const;
86 using Kind_t = ::alicorn::extension::std::String;
87 using Services_t = ::std::vector<ComponentPtr_t>;
88 using Expected_t = ::std::vector<::std::pair<Kind_t, ComponentPtr_t>>;
89 using Hadler_t = ::std::function<void(
const ComponentPtr_t &)>;
90 using Handlers_t = ::std::map<Kind_t, Hadler_t>;
93 static Services_t
Get(
const ComponentPtr_t &,
const Expected_t &);
94 static void Process(
const ComponentPtr_t &,
const Handlers_t &);
98 bool m_IsResizeWindow =
false;
99 const uint8_t Align1[7] = { 0 };
102 using TimePoint_t = ::std::chrono::system_clock::time_point;
103 const TimePoint_t m_StartProgram;
104 float m_CurrentFrameTime;
105 const uint8_t Align2[4] = { 0 };
109 ::std::shared_ptr<Constants> m_pConstants;
110 template<
template <
class>
class TBuffer,
class ... TArgs>
111 void MakeConstants(TArgs && ...);
114 Creators_t m_Creators;
118 GraphicApi(
const GraphicApi &) =
delete;
119 GraphicApi(GraphicApi &&) =
delete;
120 GraphicApi & operator= (
const GraphicApi &) =
delete;
121 GraphicApi & operator= (GraphicApi &&) =
delete;
122 ~GraphicApi(
void) =
default;
135 istream & operator>>(istream &, shared_ptr<T> &)
137 throw STD_EXCEPTION <<
"Это не должно вызываться, нужно для компилируемости";