Covellite++
Version: 2.3.2 Revision: 2584 Platform: x64 Build: 19:03 05.09.2026
Кроссплатформенный фреймворк для разработки приложений на С++
Toggle main menu visibility
Загрузка...
Поиск...
Не найдено
GraphicApi.hpp
1
2
#pragma once
3
#include <deque>
4
#include "IGraphicApi.hpp"
5
#include "Api.forward.hpp"
6
7
namespace
covellite
8
{
9
10
namespace
api
11
{
12
13
namespace
renderer
14
{
15
31
class
GraphicApi :
32
public
Registator_t<IGraphicApi>
33
{
34
using
Components_t = ::std::deque<ComponentPtr_t>;
35
36
protected
:
37
using
Data_t =
::covellite::api::renderer::SettingsData
;
38
39
public
:
40
// Интерфейс IGraphicApi:
41
void
PresentFrame(
void
)
override
;
42
const
Creators_t & GetCreators(
void
)
const
noexcept
final
;
43
44
protected
:
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 CreateTextureArray(
const
ComponentPtr_t &) = 0;
51
virtual
Render_t CreateBuffer(
const
ComponentPtr_t &) = 0;
52
virtual
Render_t CreateTransform(
const
ComponentPtr_t &) = 0;
53
virtual
Render_t CreatePresentBuffer(
const
ComponentPtr_t &) = 0;
54
55
public
:
56
template
<
class
TColor>
57
static
TColor ARGBtoFloat4(uint32_t);
58
59
private
:
60
Render_t CreateUpdater(
const
ComponentPtr_t &)
const
;
61
62
protected
:
85
class
CapturingServiceComponent
final
86
{
87
using
Kind_t = ::alicorn::extension::std::String;
88
using
Services_t = ::std::vector<ComponentPtr_t>;
89
using
Expected_t = ::std::vector<::std::pair<Kind_t, ComponentPtr_t>>;
90
using
Hadler_t = ::std::function<void(
const
ComponentPtr_t &)>;
91
using
Handlers_t = ::std::map<Kind_t, Hadler_t>;
92
93
public
:
94
static
Services_t
Get
(
const
ComponentPtr_t &,
const
Expected_t &);
95
static
void
Process
(
const
ComponentPtr_t &,
const
Handlers_t &);
96
};
97
98
protected
:
99
bool
m_IsResizeWindow =
false
;
100
const
uint8_t Align1[7] = { 0 };
101
102
private
:
103
using
TimePoint_t = ::std::chrono::system_clock::time_point;
104
const
TimePoint_t m_StartProgram;
105
float
m_CurrentFrameTime;
106
const
uint8_t Align2[4] = { 0 };
107
108
protected
:
109
class
Constants;
110
::std::shared_ptr<Constants> m_pConstants;
111
template
<
template
<
class
>
class
TBuffer,
class
... TArgs>
112
void
MakeConstants(TArgs && ...);
113
114
private
:
115
Creators_t m_Creators;
116
117
protected
:
118
GraphicApi(
void
);
119
GraphicApi(
const
GraphicApi &) =
delete
;
120
GraphicApi(GraphicApi &&) =
delete
;
121
GraphicApi & operator= (
const
GraphicApi &) =
delete
;
122
GraphicApi & operator= (GraphicApi &&) =
delete
;
123
~GraphicApi(
void
) =
default
;
124
};
125
126
}
// namespace renderer
127
128
}
// namespace api
129
130
}
// namespace covellite
131
132
namespace
std
133
{
134
135
template
<
class
T>
136
istream & operator>>(istream &, shared_ptr<T> &)
137
{
138
throw
STD_EXCEPTION <<
"Это не должно вызываться, нужно для компилируемости"
;
139
}
140
141
}
// namespace std
covellite::api::renderer::GraphicApi::CapturingServiceComponent
Класс входит в проект Covellite.Api Класс для работы со вспомогательными компонентами.
Определения
GraphicApi.hpp:86
covellite::api::renderer::GraphicApi::CapturingServiceComponent::Process
static void Process(const ComponentPtr_t &, const Handlers_t &)
Функция для последовательной обработки очереди вспомогательных компонентов.
Определения
GraphicApi.CapturingServiceComponent.cpp:92
covellite::api::renderer::GraphicApi::CapturingServiceComponent::Get
static Services_t Get(const ComponentPtr_t &, const Expected_t &)
Функция получения набора вспомогательных компонентов.
Определения
GraphicApi.CapturingServiceComponent.cpp:40
covellite::api::renderer::SettingsData
Класс для передачи значений настроек программы реализации рендера.
Определения
IGraphicApi.hpp:62
Solution
Solution
Covellite.Api
Covellite.Api
Renderer
GraphicApi.hpp
Документация по Covellite++. Последние изменения:
. Создано системой
1.18.0