mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
adding shaders compilation in makefile
This commit is contained in:
@@ -14,12 +14,14 @@ namespace mlx
|
||||
void GraphicsSupport::PixelPut(int x, int y, std::uint32_t color) noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
/*
|
||||
NonOwningPtr<Texture> texture = m_put_pixel_manager.DrawPixel(x, y, m_current_depth, color);
|
||||
if(texture)
|
||||
{
|
||||
Sprite& new_sprite = p_scene->CreateSprite(texture);
|
||||
new_sprite.SetPosition(Vec3f{ 0.0f, 0.0f, static_cast<float>(m_current_depth) });
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void GraphicsSupport::StringPut(int x, int y, std::uint32_t color, std::string str)
|
||||
@@ -39,10 +41,10 @@ namespace mlx
|
||||
{
|
||||
Sprite& new_sprite = p_scene->CreateSprite(texture);
|
||||
new_sprite.SetPosition(Vec3f{ static_cast<float>(x), static_cast<float>(y), static_cast<float>(m_current_depth) });
|
||||
m_current_depth++;
|
||||
}
|
||||
else
|
||||
sprite->SetPosition(Vec3f{ static_cast<float>(x), static_cast<float>(y), static_cast<float>(m_current_depth) });
|
||||
m_current_depth++;
|
||||
}
|
||||
|
||||
void GraphicsSupport::LoadFont(const std::filesystem::path& filepath, float scale)
|
||||
|
||||
@@ -1,77 +1,68 @@
|
||||
3,2,35,7,0,0,1,0,39,0,0,0,73,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,14,0,
|
||||
3,0,0,0,0,0,1,0,0,0,15,0,12,0,0,0,0,0,36,0,0,0,109,97,105,110,0,0,0,0,
|
||||
13,0,0,0,17,0,0,0,19,0,0,0,23,0,0,0,29,0,0,0,31,0,0,0,32,0,0,0,3,0,
|
||||
3,0,0,0,0,0,100,0,0,0,5,0,5,0,4,0,0,0,86,105,101,119,101,114,68,97,116,97,0,0,
|
||||
6,0,8,0,4,0,0,0,0,0,0,0,112,114,111,106,101,99,116,105,111,110,95,109,97,116,114,105,120,0,
|
||||
0,0,5,0,5,0,7,0,0,0,83,112,114,105,116,101,68,97,116,97,0,0,6,0,5,0,7,0,0,0,
|
||||
0,0,0,0,99,111,108,111,114,0,0,0,6,0,6,0,7,0,0,0,1,0,0,0,112,111,115,105,116,105,
|
||||
111,110,0,0,0,0,5,0,4,0,26,0,0,0,86,101,114,116,73,110,0,0,6,0,4,0,26,0,0,0,
|
||||
0,0,0,0,112,111,115,0,6,0,5,0,26,0,0,0,1,0,0,0,99,111,108,111,114,0,0,0,6,0,
|
||||
5,0,26,0,0,0,2,0,0,0,110,111,114,109,97,108,0,0,6,0,4,0,26,0,0,0,3,0,0,0,
|
||||
117,118,0,0,5,0,4,0,33,0,0,0,86,101,114,116,79,117,116,0,6,0,5,0,33,0,0,0,0,0,
|
||||
0,0,99,111,108,111,114,0,0,0,6,0,4,0,33,0,0,0,1,0,0,0,117,118,0,0,6,0,4,0,
|
||||
33,0,0,0,2,0,0,0,112,111,115,0,5,0,5,0,6,0,0,0,118,105,101,119,101,114,95,100,97,116,
|
||||
97,0,5,0,4,0,9,0,0,0,109,111,100,101,108,0,0,0,5,0,3,0,13,0,0,0,112,111,115,0,
|
||||
5,0,4,0,17,0,0,0,99,111,108,111,114,0,0,0,5,0,4,0,19,0,0,0,110,111,114,109,97,108,
|
||||
0,0,5,0,3,0,23,0,0,0,117,118,0,0,5,0,4,0,29,0,0,0,99,111,108,111,114,0,0,0,
|
||||
5,0,3,0,31,0,0,0,117,118,0,0,5,0,5,0,32,0,0,0,112,111,115,105,116,105,111,110,0,0,
|
||||
0,0,5,0,4,0,36,0,0,0,109,97,105,110,0,0,0,0,71,0,4,0,6,0,0,0,33,0,0,0,
|
||||
0,0,0,0,71,0,4,0,6,0,0,0,34,0,0,0,0,0,0,0,71,0,4,0,32,0,0,0,11,0,
|
||||
0,0,0,0,0,0,71,0,4,0,13,0,0,0,30,0,0,0,0,0,0,0,71,0,4,0,17,0,0,0,
|
||||
30,0,0,0,1,0,0,0,71,0,4,0,19,0,0,0,30,0,0,0,2,0,0,0,71,0,4,0,23,0,
|
||||
0,0,30,0,0,0,3,0,0,0,71,0,4,0,29,0,0,0,30,0,0,0,0,0,0,0,71,0,4,0,
|
||||
31,0,0,0,30,0,0,0,1,0,0,0,71,0,3,0,4,0,0,0,2,0,0,0,72,0,4,0,4,0,
|
||||
0,0,0,0,0,0,5,0,0,0,72,0,5,0,4,0,0,0,0,0,0,0,7,0,0,0,16,0,0,0,
|
||||
72,0,5,0,4,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,71,0,3,0,7,0,0,0,2,0,
|
||||
0,0,72,0,5,0,7,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,72,0,5,0,7,0,0,0,
|
||||
1,0,0,0,35,0,0,0,16,0,0,0,72,0,5,0,26,0,0,0,0,0,0,0,35,0,0,0,0,0,
|
||||
0,0,72,0,5,0,26,0,0,0,1,0,0,0,35,0,0,0,16,0,0,0,72,0,5,0,26,0,0,0,
|
||||
2,0,0,0,35,0,0,0,32,0,0,0,72,0,5,0,26,0,0,0,3,0,0,0,35,0,0,0,48,0,
|
||||
0,0,72,0,5,0,33,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,72,0,5,0,33,0,0,0,
|
||||
1,0,0,0,35,0,0,0,16,0,0,0,72,0,5,0,33,0,0,0,2,0,0,0,35,0,0,0,32,0,
|
||||
0,0,22,0,3,0,1,0,0,0,32,0,0,0,23,0,4,0,2,0,0,0,1,0,0,0,4,0,0,0,
|
||||
24,0,4,0,3,0,0,0,2,0,0,0,4,0,0,0,30,0,3,0,4,0,0,0,3,0,0,0,32,0,
|
||||
4,0,5,0,0,0,2,0,0,0,4,0,0,0,30,0,4,0,7,0,0,0,2,0,0,0,2,0,0,0,
|
||||
32,0,4,0,8,0,0,0,9,0,0,0,7,0,0,0,19,0,2,0,10,0,0,0,33,0,3,0,11,0,
|
||||
0,0,10,0,0,0,32,0,4,0,12,0,0,0,1,0,0,0,2,0,0,0,21,0,4,0,14,0,0,0,
|
||||
32,0,0,0,1,0,0,0,43,0,4,0,14,0,0,0,15,0,0,0,0,0,0,0,32,0,4,0,16,0,
|
||||
0,0,7,0,0,0,2,0,0,0,43,0,4,0,14,0,0,0,18,0,0,0,1,0,0,0,43,0,4,0,
|
||||
14,0,0,0,20,0,0,0,2,0,0,0,23,0,4,0,21,0,0,0,1,0,0,0,2,0,0,0,32,0,
|
||||
4,0,22,0,0,0,1,0,0,0,21,0,0,0,43,0,4,0,14,0,0,0,24,0,0,0,3,0,0,0,
|
||||
32,0,4,0,25,0,0,0,7,0,0,0,21,0,0,0,30,0,6,0,26,0,0,0,2,0,0,0,2,0,
|
||||
0,0,2,0,0,0,21,0,0,0,32,0,4,0,27,0,0,0,7,0,0,0,26,0,0,0,32,0,4,0,
|
||||
28,0,0,0,3,0,0,0,2,0,0,0,32,0,4,0,30,0,0,0,3,0,0,0,21,0,0,0,30,0,
|
||||
5,0,33,0,0,0,2,0,0,0,21,0,0,0,2,0,0,0,43,0,4,0,1,0,0,0,34,0,0,0,
|
||||
0,0,128,63,32,0,4,0,35,0,0,0,7,0,0,0,33,0,0,0,32,0,4,0,50,0,0,0,7,0,
|
||||
0,0,1,0,0,0,32,0,4,0,55,0,0,0,9,0,0,0,2,0,0,0,32,0,4,0,59,0,0,0,
|
||||
2,0,0,0,3,0,0,0,59,0,4,0,5,0,0,0,6,0,0,0,2,0,0,0,59,0,4,0,8,0,
|
||||
0,0,9,0,0,0,9,0,0,0,59,0,4,0,12,0,0,0,13,0,0,0,1,0,0,0,59,0,4,0,
|
||||
12,0,0,0,17,0,0,0,1,0,0,0,59,0,4,0,12,0,0,0,19,0,0,0,1,0,0,0,59,0,
|
||||
4,0,22,0,0,0,23,0,0,0,1,0,0,0,59,0,4,0,28,0,0,0,29,0,0,0,3,0,0,0,
|
||||
59,0,4,0,30,0,0,0,31,0,0,0,3,0,0,0,59,0,4,0,28,0,0,0,32,0,0,0,3,0,
|
||||
0,0,54,0,5,0,10,0,0,0,36,0,0,0,0,0,0,0,11,0,0,0,248,0,2,0,37,0,0,0,
|
||||
59,0,4,0,35,0,0,0,38,0,0,0,7,0,0,0,59,0,4,0,27,0,0,0,39,0,0,0,7,0,
|
||||
0,0,65,0,5,0,16,0,0,0,40,0,0,0,39,0,0,0,15,0,0,0,63,0,3,0,40,0,0,0,
|
||||
13,0,0,0,65,0,5,0,16,0,0,0,41,0,0,0,39,0,0,0,18,0,0,0,63,0,3,0,41,0,
|
||||
0,0,17,0,0,0,65,0,5,0,16,0,0,0,42,0,0,0,39,0,0,0,20,0,0,0,63,0,3,0,
|
||||
42,0,0,0,19,0,0,0,65,0,5,0,25,0,0,0,43,0,0,0,39,0,0,0,24,0,0,0,63,0,
|
||||
3,0,43,0,0,0,23,0,0,0,65,0,5,0,25,0,0,0,44,0,0,0,39,0,0,0,24,0,0,0,
|
||||
61,0,4,0,21,0,0,0,45,0,0,0,44,0,0,0,81,0,5,0,1,0,0,0,46,0,0,0,45,0,
|
||||
0,0,0,0,0,0,127,0,4,0,1,0,0,0,47,0,0,0,34,0,0,0,133,0,5,0,1,0,0,0,
|
||||
48,0,0,0,46,0,0,0,47,0,0,0,65,0,5,0,25,0,0,0,49,0,0,0,39,0,0,0,24,0,
|
||||
0,0,65,0,5,0,50,0,0,0,51,0,0,0,49,0,0,0,15,0,0,0,62,0,3,0,51,0,0,0,
|
||||
48,0,0,0,65,0,5,0,25,0,0,0,52,0,0,0,39,0,0,0,24,0,0,0,61,0,4,0,21,0,
|
||||
0,0,53,0,0,0,52,0,0,0,65,0,5,0,25,0,0,0,54,0,0,0,38,0,0,0,18,0,0,0,
|
||||
62,0,3,0,54,0,0,0,53,0,0,0,65,0,5,0,55,0,0,0,56,0,0,0,9,0,0,0,15,0,
|
||||
0,0,61,0,4,0,2,0,0,0,57,0,0,0,56,0,0,0,65,0,5,0,16,0,0,0,58,0,0,0,
|
||||
38,0,0,0,15,0,0,0,62,0,3,0,58,0,0,0,57,0,0,0,65,0,5,0,59,0,0,0,60,0,
|
||||
0,0,6,0,0,0,15,0,0,0,61,0,4,0,3,0,0,0,61,0,0,0,60,0,0,0,65,0,5,0,
|
||||
16,0,0,0,62,0,0,0,39,0,0,0,15,0,0,0,61,0,4,0,2,0,0,0,63,0,0,0,62,0,
|
||||
0,0,65,0,5,0,55,0,0,0,64,0,0,0,9,0,0,0,18,0,0,0,61,0,4,0,2,0,0,0,
|
||||
65,0,0,0,64,0,0,0,129,0,5,0,2,0,0,0,66,0,0,0,63,0,0,0,65,0,0,0,145,0,
|
||||
5,0,2,0,0,0,67,0,0,0,61,0,0,0,66,0,0,0,65,0,5,0,16,0,0,0,68,0,0,0,
|
||||
38,0,0,0,20,0,0,0,62,0,3,0,68,0,0,0,67,0,0,0,61,0,4,0,33,0,0,0,69,0,
|
||||
0,0,38,0,0,0,81,0,5,0,2,0,0,0,70,0,0,0,69,0,0,0,0,0,0,0,62,0,3,0,
|
||||
29,0,0,0,70,0,0,0,81,0,5,0,21,0,0,0,71,0,0,0,69,0,0,0,1,0,0,0,62,0,
|
||||
3,0,31,0,0,0,71,0,0,0,81,0,5,0,2,0,0,0,72,0,0,0,69,0,0,0,2,0,0,0,
|
||||
62,0,3,0,32,0,0,0,72,0,0,0,253,0,1,0,56,0,1,0
|
||||
3,2,35,7,0,0,1,0,39,0,0,0,67,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,14,0,
|
||||
3,0,0,0,0,0,1,0,0,0,15,0,10,0,0,0,0,0,33,0,0,0,109,97,105,110,0,0,0,0,
|
||||
13,0,0,0,19,0,0,0,25,0,0,0,27,0,0,0,28,0,0,0,3,0,3,0,0,0,0,0,100,0,
|
||||
0,0,5,0,5,0,4,0,0,0,86,105,101,119,101,114,68,97,116,97,0,0,6,0,8,0,4,0,0,0,
|
||||
0,0,0,0,112,114,111,106,101,99,116,105,111,110,95,109,97,116,114,105,120,0,0,0,5,0,5,0,7,0,
|
||||
0,0,83,112,114,105,116,101,68,97,116,97,0,0,6,0,5,0,7,0,0,0,0,0,0,0,99,111,108,111,
|
||||
114,0,0,0,6,0,6,0,7,0,0,0,1,0,0,0,112,111,115,105,116,105,111,110,0,0,0,0,5,0,
|
||||
4,0,22,0,0,0,86,101,114,116,73,110,0,0,6,0,4,0,22,0,0,0,0,0,0,0,112,111,115,0,
|
||||
6,0,4,0,22,0,0,0,1,0,0,0,117,118,0,0,5,0,4,0,29,0,0,0,86,101,114,116,79,117,
|
||||
116,0,6,0,5,0,29,0,0,0,0,0,0,0,99,111,108,111,114,0,0,0,6,0,4,0,29,0,0,0,
|
||||
1,0,0,0,117,118,0,0,6,0,4,0,29,0,0,0,2,0,0,0,112,111,115,0,5,0,5,0,6,0,
|
||||
0,0,118,105,101,119,101,114,95,100,97,116,97,0,5,0,4,0,9,0,0,0,109,111,100,101,108,0,0,0,
|
||||
5,0,3,0,13,0,0,0,112,111,115,0,5,0,3,0,19,0,0,0,117,118,0,0,5,0,4,0,25,0,
|
||||
0,0,99,111,108,111,114,0,0,0,5,0,3,0,27,0,0,0,117,118,0,0,5,0,5,0,28,0,0,0,
|
||||
112,111,115,105,116,105,111,110,0,0,0,0,5,0,4,0,33,0,0,0,109,97,105,110,0,0,0,0,71,0,
|
||||
4,0,6,0,0,0,33,0,0,0,0,0,0,0,71,0,4,0,6,0,0,0,34,0,0,0,0,0,0,0,
|
||||
71,0,4,0,28,0,0,0,11,0,0,0,0,0,0,0,71,0,4,0,13,0,0,0,30,0,0,0,0,0,
|
||||
0,0,71,0,4,0,19,0,0,0,30,0,0,0,1,0,0,0,71,0,4,0,25,0,0,0,30,0,0,0,
|
||||
0,0,0,0,71,0,4,0,27,0,0,0,30,0,0,0,1,0,0,0,71,0,3,0,4,0,0,0,2,0,
|
||||
0,0,72,0,4,0,4,0,0,0,0,0,0,0,5,0,0,0,72,0,5,0,4,0,0,0,0,0,0,0,
|
||||
7,0,0,0,16,0,0,0,72,0,5,0,4,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,71,0,
|
||||
3,0,7,0,0,0,2,0,0,0,72,0,5,0,7,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,
|
||||
72,0,5,0,7,0,0,0,1,0,0,0,35,0,0,0,16,0,0,0,72,0,5,0,22,0,0,0,0,0,
|
||||
0,0,35,0,0,0,0,0,0,0,72,0,5,0,22,0,0,0,1,0,0,0,35,0,0,0,16,0,0,0,
|
||||
72,0,5,0,29,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,72,0,5,0,29,0,0,0,1,0,
|
||||
0,0,35,0,0,0,16,0,0,0,72,0,5,0,29,0,0,0,2,0,0,0,35,0,0,0,32,0,0,0,
|
||||
22,0,3,0,1,0,0,0,32,0,0,0,23,0,4,0,2,0,0,0,1,0,0,0,4,0,0,0,24,0,
|
||||
4,0,3,0,0,0,2,0,0,0,4,0,0,0,30,0,3,0,4,0,0,0,3,0,0,0,32,0,4,0,
|
||||
5,0,0,0,2,0,0,0,4,0,0,0,30,0,4,0,7,0,0,0,2,0,0,0,2,0,0,0,32,0,
|
||||
4,0,8,0,0,0,9,0,0,0,7,0,0,0,19,0,2,0,10,0,0,0,33,0,3,0,11,0,0,0,
|
||||
10,0,0,0,32,0,4,0,12,0,0,0,1,0,0,0,2,0,0,0,21,0,4,0,14,0,0,0,32,0,
|
||||
0,0,1,0,0,0,43,0,4,0,14,0,0,0,15,0,0,0,0,0,0,0,32,0,4,0,16,0,0,0,
|
||||
7,0,0,0,2,0,0,0,23,0,4,0,17,0,0,0,1,0,0,0,2,0,0,0,32,0,4,0,18,0,
|
||||
0,0,1,0,0,0,17,0,0,0,43,0,4,0,14,0,0,0,20,0,0,0,1,0,0,0,32,0,4,0,
|
||||
21,0,0,0,7,0,0,0,17,0,0,0,30,0,4,0,22,0,0,0,2,0,0,0,17,0,0,0,32,0,
|
||||
4,0,23,0,0,0,7,0,0,0,22,0,0,0,32,0,4,0,24,0,0,0,3,0,0,0,2,0,0,0,
|
||||
32,0,4,0,26,0,0,0,3,0,0,0,17,0,0,0,30,0,5,0,29,0,0,0,2,0,0,0,17,0,
|
||||
0,0,2,0,0,0,43,0,4,0,1,0,0,0,30,0,0,0,0,0,128,191,32,0,4,0,31,0,0,0,
|
||||
7,0,0,0,29,0,0,0,43,0,4,0,14,0,0,0,32,0,0,0,2,0,0,0,32,0,4,0,44,0,
|
||||
0,0,7,0,0,0,1,0,0,0,32,0,4,0,49,0,0,0,9,0,0,0,2,0,0,0,32,0,4,0,
|
||||
53,0,0,0,2,0,0,0,3,0,0,0,59,0,4,0,5,0,0,0,6,0,0,0,2,0,0,0,59,0,
|
||||
4,0,8,0,0,0,9,0,0,0,9,0,0,0,59,0,4,0,12,0,0,0,13,0,0,0,1,0,0,0,
|
||||
59,0,4,0,18,0,0,0,19,0,0,0,1,0,0,0,59,0,4,0,24,0,0,0,25,0,0,0,3,0,
|
||||
0,0,59,0,4,0,26,0,0,0,27,0,0,0,3,0,0,0,59,0,4,0,24,0,0,0,28,0,0,0,
|
||||
3,0,0,0,54,0,5,0,10,0,0,0,33,0,0,0,0,0,0,0,11,0,0,0,248,0,2,0,34,0,
|
||||
0,0,59,0,4,0,31,0,0,0,35,0,0,0,7,0,0,0,59,0,4,0,23,0,0,0,36,0,0,0,
|
||||
7,0,0,0,65,0,5,0,16,0,0,0,37,0,0,0,36,0,0,0,15,0,0,0,63,0,3,0,37,0,
|
||||
0,0,13,0,0,0,65,0,5,0,21,0,0,0,38,0,0,0,36,0,0,0,20,0,0,0,63,0,3,0,
|
||||
38,0,0,0,19,0,0,0,65,0,5,0,21,0,0,0,39,0,0,0,36,0,0,0,20,0,0,0,61,0,
|
||||
4,0,17,0,0,0,40,0,0,0,39,0,0,0,81,0,5,0,1,0,0,0,41,0,0,0,40,0,0,0,
|
||||
0,0,0,0,133,0,5,0,1,0,0,0,42,0,0,0,41,0,0,0,30,0,0,0,65,0,5,0,21,0,
|
||||
0,0,43,0,0,0,36,0,0,0,20,0,0,0,65,0,5,0,44,0,0,0,45,0,0,0,43,0,0,0,
|
||||
15,0,0,0,62,0,3,0,45,0,0,0,42,0,0,0,65,0,5,0,21,0,0,0,46,0,0,0,36,0,
|
||||
0,0,20,0,0,0,61,0,4,0,17,0,0,0,47,0,0,0,46,0,0,0,65,0,5,0,21,0,0,0,
|
||||
48,0,0,0,35,0,0,0,20,0,0,0,62,0,3,0,48,0,0,0,47,0,0,0,65,0,5,0,49,0,
|
||||
0,0,50,0,0,0,9,0,0,0,15,0,0,0,61,0,4,0,2,0,0,0,51,0,0,0,50,0,0,0,
|
||||
65,0,5,0,16,0,0,0,52,0,0,0,35,0,0,0,15,0,0,0,62,0,3,0,52,0,0,0,51,0,
|
||||
0,0,65,0,5,0,53,0,0,0,54,0,0,0,6,0,0,0,15,0,0,0,61,0,4,0,3,0,0,0,
|
||||
55,0,0,0,54,0,0,0,65,0,5,0,16,0,0,0,56,0,0,0,36,0,0,0,15,0,0,0,61,0,
|
||||
4,0,2,0,0,0,57,0,0,0,56,0,0,0,65,0,5,0,49,0,0,0,58,0,0,0,9,0,0,0,
|
||||
20,0,0,0,61,0,4,0,2,0,0,0,59,0,0,0,58,0,0,0,129,0,5,0,2,0,0,0,60,0,
|
||||
0,0,57,0,0,0,59,0,0,0,145,0,5,0,2,0,0,0,61,0,0,0,55,0,0,0,60,0,0,0,
|
||||
65,0,5,0,16,0,0,0,62,0,0,0,35,0,0,0,32,0,0,0,62,0,3,0,62,0,0,0,61,0,
|
||||
0,0,61,0,4,0,29,0,0,0,63,0,0,0,35,0,0,0,81,0,5,0,2,0,0,0,64,0,0,0,
|
||||
63,0,0,0,0,0,0,0,62,0,3,0,25,0,0,0,64,0,0,0,81,0,5,0,17,0,0,0,65,0,
|
||||
0,0,63,0,0,0,1,0,0,0,62,0,3,0,27,0,0,0,65,0,0,0,81,0,5,0,2,0,0,0,
|
||||
66,0,0,0,63,0,0,0,2,0,0,0,62,0,3,0,28,0,0,0,66,0,0,0,253,0,1,0,56,0,
|
||||
1,0
|
||||
|
||||
@@ -1,49 +1,31 @@
|
||||
3,2,35,7,0,0,1,0,39,0,0,0,62,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,11,0,
|
||||
6,0,32,0,0,0,71,76,83,76,46,115,116,100,46,52,53,48,0,0,0,0,14,0,3,0,0,0,0,0,
|
||||
1,0,0,0,15,0,7,0,4,0,0,0,34,0,0,0,109,97,105,110,0,0,0,0,23,0,0,0,29,0,
|
||||
0,0,16,0,3,0,34,0,0,0,7,0,0,0,3,0,3,0,0,0,0,0,100,0,0,0,5,0,4,0,
|
||||
25,0,0,0,86,101,114,116,79,117,116,0,6,0,4,0,25,0,0,0,0,0,0,0,117,118,0,0,5,0,
|
||||
4,0,30,0,0,0,70,114,97,103,79,117,116,0,6,0,5,0,30,0,0,0,0,0,0,0,99,111,108,111,
|
||||
114,0,0,0,5,0,5,0,5,0,0,0,117,95,116,101,120,116,117,114,101,0,0,0,5,0,3,0,23,0,
|
||||
0,0,117,118,0,0,5,0,4,0,29,0,0,0,99,111,108,111,114,0,0,0,5,0,6,0,33,0,0,0,
|
||||
76,105,110,101,97,114,84,111,115,82,71,66,0,0,0,0,5,0,4,0,34,0,0,0,109,97,105,110,0,0,
|
||||
0,0,71,0,4,0,5,0,0,0,33,0,0,0,0,0,0,0,71,0,4,0,5,0,0,0,34,0,0,0,
|
||||
0,0,0,0,71,0,4,0,23,0,0,0,30,0,0,0,0,0,0,0,71,0,4,0,29,0,0,0,30,0,
|
||||
0,0,0,0,0,0,72,0,5,0,25,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,72,0,5,0,
|
||||
30,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,22,0,3,0,1,0,0,0,32,0,0,0,25,0,
|
||||
9,0,2,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
|
||||
0,0,0,0,27,0,3,0,3,0,0,0,2,0,0,0,32,0,4,0,4,0,0,0,0,0,0,0,3,0,
|
||||
0,0,23,0,4,0,6,0,0,0,1,0,0,0,3,0,0,0,32,0,4,0,7,0,0,0,7,0,0,0,
|
||||
6,0,0,0,33,0,4,0,8,0,0,0,6,0,0,0,7,0,0,0,43,0,4,0,1,0,0,0,9,0,
|
||||
0,0,28,46,77,59,21,0,4,0,10,0,0,0,32,0,0,0,1,0,0,0,43,0,4,0,10,0,0,0,
|
||||
11,0,0,0,0,0,0,0,20,0,2,0,12,0,0,0,23,0,4,0,13,0,0,0,12,0,0,0,3,0,
|
||||
0,0,43,0,4,0,1,0,0,0,14,0,0,0,61,10,135,63,43,0,4,0,1,0,0,0,15,0,0,0,
|
||||
0,0,128,63,43,0,4,0,1,0,0,0,16,0,0,0,154,153,25,64,43,0,4,0,1,0,0,0,17,0,
|
||||
0,0,174,71,97,61,43,0,4,0,1,0,0,0,18,0,0,0,82,184,78,65,19,0,2,0,19,0,0,0,
|
||||
33,0,3,0,20,0,0,0,19,0,0,0,23,0,4,0,21,0,0,0,1,0,0,0,2,0,0,0,32,0,
|
||||
4,0,22,0,0,0,1,0,0,0,21,0,0,0,32,0,4,0,24,0,0,0,7,0,0,0,21,0,0,0,
|
||||
30,0,3,0,25,0,0,0,21,0,0,0,32,0,4,0,26,0,0,0,7,0,0,0,25,0,0,0,23,0,
|
||||
4,0,27,0,0,0,1,0,0,0,4,0,0,0,32,0,4,0,28,0,0,0,3,0,0,0,27,0,0,0,
|
||||
30,0,3,0,30,0,0,0,27,0,0,0,32,0,4,0,31,0,0,0,7,0,0,0,30,0,0,0,32,0,
|
||||
4,0,59,0,0,0,7,0,0,0,27,0,0,0,59,0,4,0,4,0,0,0,5,0,0,0,0,0,0,0,
|
||||
59,0,4,0,22,0,0,0,23,0,0,0,1,0,0,0,59,0,4,0,28,0,0,0,29,0,0,0,3,0,
|
||||
0,0,54,0,5,0,6,0,0,0,33,0,0,0,0,0,0,0,8,0,0,0,55,0,3,0,7,0,0,0,
|
||||
35,0,0,0,248,0,2,0,36,0,0,0,61,0,4,0,6,0,0,0,37,0,0,0,35,0,0,0,80,0,
|
||||
6,0,6,0,0,0,38,0,0,0,9,0,0,0,9,0,0,0,9,0,0,0,186,0,5,0,13,0,0,0,
|
||||
39,0,0,0,37,0,0,0,38,0,0,0,61,0,4,0,6,0,0,0,40,0,0,0,35,0,0,0,136,0,
|
||||
5,0,1,0,0,0,41,0,0,0,15,0,0,0,16,0,0,0,80,0,6,0,6,0,0,0,42,0,0,0,
|
||||
41,0,0,0,41,0,0,0,41,0,0,0,12,0,7,0,6,0,0,0,43,0,0,0,32,0,0,0,26,0,
|
||||
0,0,40,0,0,0,42,0,0,0,142,0,5,0,6,0,0,0,44,0,0,0,43,0,0,0,14,0,0,0,
|
||||
80,0,6,0,6,0,0,0,45,0,0,0,17,0,0,0,17,0,0,0,17,0,0,0,131,0,5,0,6,0,
|
||||
0,0,46,0,0,0,44,0,0,0,45,0,0,0,61,0,4,0,6,0,0,0,47,0,0,0,35,0,0,0,
|
||||
142,0,5,0,6,0,0,0,48,0,0,0,47,0,0,0,18,0,0,0,169,0,6,0,6,0,0,0,49,0,
|
||||
0,0,39,0,0,0,46,0,0,0,48,0,0,0,254,0,2,0,49,0,0,0,56,0,1,0,54,0,5,0,
|
||||
19,0,0,0,34,0,0,0,0,0,0,0,20,0,0,0,248,0,2,0,50,0,0,0,59,0,4,0,31,0,
|
||||
0,0,51,0,0,0,7,0,0,0,59,0,4,0,26,0,0,0,52,0,0,0,7,0,0,0,65,0,5,0,
|
||||
24,0,0,0,53,0,0,0,52,0,0,0,11,0,0,0,63,0,3,0,53,0,0,0,23,0,0,0,61,0,
|
||||
4,0,3,0,0,0,54,0,0,0,5,0,0,0,65,0,5,0,24,0,0,0,55,0,0,0,52,0,0,0,
|
||||
11,0,0,0,61,0,4,0,21,0,0,0,56,0,0,0,55,0,0,0,87,0,5,0,27,0,0,0,57,0,
|
||||
0,0,54,0,0,0,56,0,0,0,65,0,5,0,59,0,0,0,58,0,0,0,51,0,0,0,11,0,0,0,
|
||||
62,0,3,0,58,0,0,0,57,0,0,0,61,0,4,0,30,0,0,0,60,0,0,0,51,0,0,0,81,0,
|
||||
5,0,27,0,0,0,61,0,0,0,60,0,0,0,0,0,0,0,62,0,3,0,29,0,0,0,61,0,0,0,
|
||||
3,2,35,7,0,0,1,0,39,0,0,0,34,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,14,0,
|
||||
3,0,0,0,0,0,1,0,0,0,15,0,7,0,4,0,0,0,21,0,0,0,109,97,105,110,0,0,0,0,
|
||||
10,0,0,0,18,0,0,0,16,0,3,0,21,0,0,0,7,0,0,0,3,0,3,0,0,0,0,0,100,0,
|
||||
0,0,5,0,4,0,14,0,0,0,86,101,114,116,79,117,116,0,6,0,4,0,14,0,0,0,0,0,0,0,
|
||||
117,118,0,0,5,0,4,0,19,0,0,0,70,114,97,103,79,117,116,0,6,0,5,0,19,0,0,0,0,0,
|
||||
0,0,99,111,108,111,114,0,0,0,5,0,5,0,5,0,0,0,117,95,116,101,120,116,117,114,101,0,0,0,
|
||||
5,0,3,0,10,0,0,0,117,118,0,0,5,0,4,0,18,0,0,0,99,111,108,111,114,0,0,0,5,0,
|
||||
4,0,21,0,0,0,109,97,105,110,0,0,0,0,71,0,4,0,5,0,0,0,33,0,0,0,0,0,0,0,
|
||||
71,0,4,0,5,0,0,0,34,0,0,0,0,0,0,0,71,0,4,0,10,0,0,0,30,0,0,0,0,0,
|
||||
0,0,71,0,4,0,18,0,0,0,30,0,0,0,0,0,0,0,72,0,5,0,14,0,0,0,0,0,0,0,
|
||||
35,0,0,0,0,0,0,0,72,0,5,0,19,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,22,0,
|
||||
3,0,1,0,0,0,32,0,0,0,25,0,9,0,2,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,27,0,3,0,3,0,0,0,2,0,0,0,32,0,
|
||||
4,0,4,0,0,0,0,0,0,0,3,0,0,0,19,0,2,0,6,0,0,0,33,0,3,0,7,0,0,0,
|
||||
6,0,0,0,23,0,4,0,8,0,0,0,1,0,0,0,2,0,0,0,32,0,4,0,9,0,0,0,1,0,
|
||||
0,0,8,0,0,0,21,0,4,0,11,0,0,0,32,0,0,0,1,0,0,0,43,0,4,0,11,0,0,0,
|
||||
12,0,0,0,0,0,0,0,32,0,4,0,13,0,0,0,7,0,0,0,8,0,0,0,30,0,3,0,14,0,
|
||||
0,0,8,0,0,0,32,0,4,0,15,0,0,0,7,0,0,0,14,0,0,0,23,0,4,0,16,0,0,0,
|
||||
1,0,0,0,4,0,0,0,32,0,4,0,17,0,0,0,3,0,0,0,16,0,0,0,30,0,3,0,19,0,
|
||||
0,0,16,0,0,0,32,0,4,0,20,0,0,0,7,0,0,0,19,0,0,0,32,0,4,0,31,0,0,0,
|
||||
7,0,0,0,16,0,0,0,59,0,4,0,4,0,0,0,5,0,0,0,0,0,0,0,59,0,4,0,9,0,
|
||||
0,0,10,0,0,0,1,0,0,0,59,0,4,0,17,0,0,0,18,0,0,0,3,0,0,0,54,0,5,0,
|
||||
6,0,0,0,21,0,0,0,0,0,0,0,7,0,0,0,248,0,2,0,22,0,0,0,59,0,4,0,20,0,
|
||||
0,0,23,0,0,0,7,0,0,0,59,0,4,0,15,0,0,0,24,0,0,0,7,0,0,0,65,0,5,0,
|
||||
13,0,0,0,25,0,0,0,24,0,0,0,12,0,0,0,63,0,3,0,25,0,0,0,10,0,0,0,61,0,
|
||||
4,0,3,0,0,0,26,0,0,0,5,0,0,0,65,0,5,0,13,0,0,0,27,0,0,0,24,0,0,0,
|
||||
12,0,0,0,61,0,4,0,8,0,0,0,28,0,0,0,27,0,0,0,87,0,5,0,16,0,0,0,29,0,
|
||||
0,0,26,0,0,0,28,0,0,0,65,0,5,0,31,0,0,0,30,0,0,0,23,0,0,0,12,0,0,0,
|
||||
62,0,3,0,30,0,0,0,29,0,0,0,61,0,4,0,19,0,0,0,32,0,0,0,23,0,0,0,81,0,
|
||||
5,0,16,0,0,0,33,0,0,0,32,0,0,0,0,0,0,0,62,0,3,0,18,0,0,0,33,0,0,0,
|
||||
253,0,1,0,56,0,1,0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
3,2,35,7,0,0,1,0,39,0,0,0,59,0,0,0,0,0,0,0,17,0,2,0,1,0,0,0,14,0,
|
||||
3,0,0,0,0,0,1,0,0,0,15,0,8,0,0,0,0,0,36,0,0,0,109,97,105,110,0,0,0,0,
|
||||
3,0,0,0,0,0,1,0,0,0,15,0,8,0,0,0,0,0,37,0,0,0,109,97,105,110,0,0,0,0,
|
||||
20,0,0,0,26,0,0,0,29,0,0,0,3,0,3,0,0,0,0,0,100,0,0,0,5,0,4,0,23,0,
|
||||
0,0,86,101,114,116,73,110,0,0,6,0,6,0,23,0,0,0,0,0,0,0,118,101,114,116,95,105,110,100,
|
||||
101,120,0,0,5,0,4,0,30,0,0,0,86,101,114,116,79,117,116,0,6,0,4,0,30,0,0,0,0,0,
|
||||
0,0,117,118,0,0,6,0,6,0,30,0,0,0,1,0,0,0,112,111,115,105,116,105,111,110,0,0,0,0,
|
||||
5,0,5,0,15,0,0,0,118,101,114,116,105,99,101,115,0,0,0,0,5,0,6,0,20,0,0,0,118,101,
|
||||
114,116,101,120,95,105,110,100,101,120,0,0,0,0,5,0,3,0,26,0,0,0,117,118,0,0,5,0,5,0,
|
||||
29,0,0,0,112,111,115,105,116,105,111,110,0,0,0,0,5,0,4,0,36,0,0,0,109,97,105,110,0,0,
|
||||
29,0,0,0,112,111,115,105,116,105,111,110,0,0,0,0,5,0,4,0,37,0,0,0,109,97,105,110,0,0,
|
||||
0,0,71,0,4,0,20,0,0,0,11,0,0,0,42,0,0,0,71,0,4,0,29,0,0,0,11,0,0,0,
|
||||
0,0,0,0,71,0,4,0,26,0,0,0,30,0,0,0,0,0,0,0,72,0,5,0,23,0,0,0,0,0,
|
||||
0,0,35,0,0,0,0,0,0,0,72,0,5,0,30,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,
|
||||
@@ -27,22 +27,22 @@
|
||||
30,0,4,0,30,0,0,0,2,0,0,0,27,0,0,0,32,0,4,0,31,0,0,0,7,0,0,0,2,0,
|
||||
0,0,32,0,4,0,32,0,0,0,7,0,0,0,30,0,0,0,43,0,4,0,18,0,0,0,33,0,0,0,
|
||||
1,0,0,0,43,0,4,0,1,0,0,0,34,0,0,0,0,0,0,0,43,0,4,0,1,0,0,0,35,0,
|
||||
0,0,0,0,0,63,32,0,4,0,44,0,0,0,6,0,0,0,2,0,0,0,32,0,4,0,50,0,0,0,
|
||||
7,0,0,0,27,0,0,0,59,0,5,0,6,0,0,0,15,0,0,0,6,0,0,0,14,0,0,0,59,0,
|
||||
4,0,19,0,0,0,20,0,0,0,1,0,0,0,59,0,4,0,25,0,0,0,26,0,0,0,3,0,0,0,
|
||||
59,0,4,0,28,0,0,0,29,0,0,0,3,0,0,0,54,0,5,0,16,0,0,0,36,0,0,0,0,0,
|
||||
0,0,17,0,0,0,248,0,2,0,37,0,0,0,59,0,4,0,31,0,0,0,38,0,0,0,7,0,0,0,
|
||||
59,0,4,0,32,0,0,0,39,0,0,0,7,0,0,0,59,0,4,0,24,0,0,0,40,0,0,0,7,0,
|
||||
0,0,65,0,5,0,22,0,0,0,41,0,0,0,40,0,0,0,21,0,0,0,63,0,3,0,41,0,0,0,
|
||||
20,0,0,0,65,0,5,0,22,0,0,0,42,0,0,0,40,0,0,0,21,0,0,0,61,0,4,0,18,0,
|
||||
0,0,43,0,0,0,42,0,0,0,65,0,5,0,44,0,0,0,45,0,0,0,15,0,0,0,43,0,0,0,
|
||||
61,0,4,0,2,0,0,0,46,0,0,0,45,0,0,0,62,0,3,0,38,0,0,0,46,0,0,0,61,0,
|
||||
4,0,2,0,0,0,47,0,0,0,38,0,0,0,80,0,6,0,27,0,0,0,48,0,0,0,47,0,0,0,
|
||||
34,0,0,0,10,0,0,0,65,0,5,0,50,0,0,0,49,0,0,0,39,0,0,0,33,0,0,0,62,0,
|
||||
3,0,49,0,0,0,48,0,0,0,61,0,4,0,2,0,0,0,51,0,0,0,38,0,0,0,142,0,5,0,
|
||||
2,0,0,0,52,0,0,0,51,0,0,0,35,0,0,0,80,0,5,0,2,0,0,0,53,0,0,0,35,0,
|
||||
0,0,35,0,0,0,129,0,5,0,2,0,0,0,54,0,0,0,52,0,0,0,53,0,0,0,65,0,5,0,
|
||||
31,0,0,0,55,0,0,0,39,0,0,0,21,0,0,0,62,0,3,0,55,0,0,0,54,0,0,0,61,0,
|
||||
4,0,30,0,0,0,56,0,0,0,39,0,0,0,81,0,5,0,2,0,0,0,57,0,0,0,56,0,0,0,
|
||||
0,0,0,0,0,63,44,0,5,0,2,0,0,0,36,0,0,0,35,0,0,0,35,0,0,0,32,0,4,0,
|
||||
45,0,0,0,6,0,0,0,2,0,0,0,32,0,4,0,51,0,0,0,7,0,0,0,27,0,0,0,59,0,
|
||||
5,0,6,0,0,0,15,0,0,0,6,0,0,0,14,0,0,0,59,0,4,0,19,0,0,0,20,0,0,0,
|
||||
1,0,0,0,59,0,4,0,25,0,0,0,26,0,0,0,3,0,0,0,59,0,4,0,28,0,0,0,29,0,
|
||||
0,0,3,0,0,0,54,0,5,0,16,0,0,0,37,0,0,0,0,0,0,0,17,0,0,0,248,0,2,0,
|
||||
38,0,0,0,59,0,4,0,31,0,0,0,39,0,0,0,7,0,0,0,59,0,4,0,32,0,0,0,40,0,
|
||||
0,0,7,0,0,0,59,0,4,0,24,0,0,0,41,0,0,0,7,0,0,0,65,0,5,0,22,0,0,0,
|
||||
42,0,0,0,41,0,0,0,21,0,0,0,63,0,3,0,42,0,0,0,20,0,0,0,65,0,5,0,22,0,
|
||||
0,0,43,0,0,0,41,0,0,0,21,0,0,0,61,0,4,0,18,0,0,0,44,0,0,0,43,0,0,0,
|
||||
65,0,5,0,45,0,0,0,46,0,0,0,15,0,0,0,44,0,0,0,61,0,4,0,2,0,0,0,47,0,
|
||||
0,0,46,0,0,0,62,0,3,0,39,0,0,0,47,0,0,0,61,0,4,0,2,0,0,0,48,0,0,0,
|
||||
39,0,0,0,80,0,6,0,27,0,0,0,49,0,0,0,48,0,0,0,34,0,0,0,10,0,0,0,65,0,
|
||||
5,0,51,0,0,0,50,0,0,0,40,0,0,0,33,0,0,0,62,0,3,0,50,0,0,0,49,0,0,0,
|
||||
61,0,4,0,2,0,0,0,52,0,0,0,39,0,0,0,142,0,5,0,2,0,0,0,53,0,0,0,52,0,
|
||||
0,0,35,0,0,0,129,0,5,0,2,0,0,0,54,0,0,0,53,0,0,0,36,0,0,0,65,0,5,0,
|
||||
31,0,0,0,55,0,0,0,40,0,0,0,21,0,0,0,62,0,3,0,55,0,0,0,54,0,0,0,61,0,
|
||||
4,0,30,0,0,0,56,0,0,0,40,0,0,0,81,0,5,0,2,0,0,0,57,0,0,0,56,0,0,0,
|
||||
0,0,0,0,62,0,3,0,26,0,0,0,57,0,0,0,81,0,5,0,27,0,0,0,58,0,0,0,56,0,
|
||||
0,0,1,0,0,0,62,0,3,0,29,0,0,0,58,0,0,0,253,0,1,0,56,0,1,0
|
||||
|
||||
@@ -14,15 +14,15 @@ namespace mlx
|
||||
friend class Render2DPass;
|
||||
|
||||
public:
|
||||
Sprite(NonOwningPtr<Texture> texture);
|
||||
Sprite(class Renderer& renderer, NonOwningPtr<Texture> texture);
|
||||
|
||||
inline void SetColor(Vec4f color) noexcept { m_color = color; }
|
||||
inline void SetPosition(Vec3f position) noexcept { m_position = position; }
|
||||
|
||||
[[nodiscard]] inline const Vec4f& GetColor() const noexcept { return m_color; }
|
||||
[[nodiscard]] inline const Vec3f& GetPosition() const noexcept { return m_position; }
|
||||
[[nodiscard]] inline std::shared_ptr<Mesh> GetMesh() const { return p_mesh; }
|
||||
[[nodiscard]] inline NonOwningPtr<Texture> GetTexture() const { return p_texture; }
|
||||
[[nodiscard]] MLX_FORCEINLINE const Vec4f& GetColor() const noexcept { return m_color; }
|
||||
[[nodiscard]] MLX_FORCEINLINE const Vec3f& GetPosition() const noexcept { return m_position; }
|
||||
[[nodiscard]] MLX_FORCEINLINE std::shared_ptr<Mesh> GetMesh() const { return p_mesh; }
|
||||
[[nodiscard]] MLX_FORCEINLINE NonOwningPtr<Texture> GetTexture() const { return p_texture; }
|
||||
|
||||
~Sprite() = default;
|
||||
|
||||
|
||||
@@ -17,31 +17,69 @@ namespace mlx
|
||||
std::uint32_t binding;
|
||||
};
|
||||
|
||||
class DescriptorPool
|
||||
{
|
||||
public:
|
||||
DescriptorPool() = default;
|
||||
|
||||
void Init() noexcept;
|
||||
void Destroy() noexcept;
|
||||
|
||||
VkDescriptorSet AllocateDescriptorSet(std::uint32_t frame_index, VkDescriptorSetLayout layout);
|
||||
|
||||
void ResetPoolFromFrameIndex(std::size_t frame_index);
|
||||
|
||||
[[nodiscard]] inline VkDescriptorPool Get(std::uint32_t index) const noexcept { return m_pools[index]; }
|
||||
[[nodiscard]] MLX_FORCEINLINE std::size_t GetNumberOfSetsAllocated() const noexcept { return m_allocation_count; }
|
||||
|
||||
~DescriptorPool() = default;
|
||||
|
||||
private:
|
||||
std::array<VkDescriptorPool, MAX_FRAMES_IN_FLIGHT> m_pools;
|
||||
std::size_t m_allocation_count = 0;
|
||||
};
|
||||
|
||||
class DescriptorPoolManager
|
||||
{
|
||||
public:
|
||||
DescriptorPoolManager() = default;
|
||||
|
||||
void ResetPoolsFromFrameIndex(std::size_t frame_index);
|
||||
DescriptorPool& GetAvailablePool();
|
||||
void Destroy();
|
||||
|
||||
~DescriptorPoolManager() = default;
|
||||
|
||||
private:
|
||||
std::list<DescriptorPool> m_pools;
|
||||
};
|
||||
|
||||
class DescriptorSet
|
||||
{
|
||||
public:
|
||||
DescriptorSet() { m_set.fill(VK_NULL_HANDLE); }
|
||||
DescriptorSet(const ShaderSetLayout& layout, VkDescriptorSetLayout vklayout, ShaderType shader_type);
|
||||
DescriptorSet(DescriptorPoolManager& pools_manager, const ShaderSetLayout& layout, VkDescriptorSetLayout vklayout, ShaderType shader_type);
|
||||
|
||||
void SetImage(std::size_t i, std::uint32_t binding, class Image& image);
|
||||
void SetStorageBuffer(std::size_t i, std::uint32_t binding, class GPUBuffer& buffer);
|
||||
void SetUniformBuffer(std::size_t i, std::uint32_t binding, class GPUBuffer& buffer);
|
||||
void Update(std::size_t i, VkCommandBuffer cmd = VK_NULL_HANDLE) noexcept;
|
||||
void Reallocate() noexcept;
|
||||
void Reallocate(std::size_t frame_index) noexcept;
|
||||
|
||||
[[nodiscard]] inline VkDescriptorSet GetSet(std::size_t i) const noexcept { return m_set[i]; }
|
||||
[[nodiscard]] inline DescriptorSet Duplicate() const { return DescriptorSet{ m_set_layout, m_descriptors }; }
|
||||
[[nodiscard]] inline DescriptorSet Duplicate() const { return DescriptorSet{ *p_pools_manager, m_set_layout, m_descriptors }; }
|
||||
[[nodiscard]] inline bool IsInit() const noexcept { return m_set[0] != VK_NULL_HANDLE; }
|
||||
|
||||
~DescriptorSet() = default;
|
||||
|
||||
private:
|
||||
DescriptorSet(VkDescriptorSetLayout layout, const std::vector<Descriptor>& descriptors);
|
||||
DescriptorSet(DescriptorPoolManager& pools_manager, VkDescriptorSetLayout layout, const std::vector<Descriptor>& descriptors);
|
||||
|
||||
private:
|
||||
std::vector<Descriptor> m_descriptors;
|
||||
std::array<VkDescriptorSet, MAX_FRAMES_IN_FLIGHT> m_set;
|
||||
VkDescriptorSetLayout m_set_layout;
|
||||
NonOwningPtr<DescriptorPoolManager> p_pools_manager;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace mlx
|
||||
MLX_PROFILE_FUNCTION();
|
||||
std::vector<VkFormat> candidates = { VK_FORMAT_D32_SFLOAT, VK_FORMAT_D32_SFLOAT_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT };
|
||||
VkFormat format = kvfFindSupportFormatInCandidates(RenderCore::Get().GetDevice(), candidates.data(), candidates.size(), VK_IMAGE_TILING_OPTIMAL, VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT);
|
||||
Image::Init(ImageType::Depth, width, height, format, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, is_multisampled, std::move(debug_name));
|
||||
Image::Init(ImageType::Depth, width, height, format, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, is_multisampled, std::move(debug_name));
|
||||
Image::CreateImageView(VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_DEPTH_BIT);
|
||||
Image::TransitionLayout(VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace mlx
|
||||
public:
|
||||
GraphicPipeline() = default;
|
||||
|
||||
void Init(const GraphicPipelineDescriptor& descriptor);
|
||||
void Init(const GraphicPipelineDescriptor& descriptor, std::string_view debug_name);
|
||||
bool BindPipeline(VkCommandBuffer command_buffer, std::size_t framebuffer_index, std::array<float, 4> clear) noexcept;
|
||||
void EndPipeline(VkCommandBuffer command_buffer) noexcept override;
|
||||
void Destroy() noexcept;
|
||||
@@ -46,6 +46,9 @@ namespace mlx
|
||||
std::vector<NonOwningPtr<Texture>> m_attachments;
|
||||
std::vector<VkFramebuffer> m_framebuffers;
|
||||
std::vector<VkClearValue> m_clears;
|
||||
#ifdef DEBUG
|
||||
std::string m_debug_name;
|
||||
#endif
|
||||
std::shared_ptr<Shader> p_vertex_shader;
|
||||
std::shared_ptr<Shader> p_fragment_shader;
|
||||
VkRenderPass m_renderpass = VK_NULL_HANDLE;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace mlx
|
||||
{
|
||||
public:
|
||||
Render2DPass() = default;
|
||||
void Init();
|
||||
void Init(class Renderer& renderer);
|
||||
void Pass(class Scene& scene, class Renderer& renderer, class Texture& render_target);
|
||||
void Destroy();
|
||||
~Render2DPass() = default;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace mlx
|
||||
{
|
||||
public:
|
||||
FinalPass() = default;
|
||||
void Init();
|
||||
void Init(class Renderer& renderer);
|
||||
void Pass(class Scene& scene, class Renderer& renderer, class Texture& render_target);
|
||||
void Destroy();
|
||||
~FinalPass() = default;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace mlx
|
||||
{
|
||||
public:
|
||||
RenderPasses() = default;
|
||||
void Init();
|
||||
void Init(class Renderer& renderer);
|
||||
void Pass(class Scene& scene, class Renderer& renderer);
|
||||
void Destroy();
|
||||
~RenderPasses() = default;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <Utils/NonOwningPtr.h>
|
||||
#include <Renderer/RenderCore.h>
|
||||
#include <Renderer/Image.h>
|
||||
#include <Renderer/Descriptor.h>
|
||||
#include <Core/EventBus.h>
|
||||
|
||||
namespace mlx
|
||||
@@ -31,6 +32,7 @@ namespace mlx
|
||||
[[nodiscard]] inline std::size_t GetSwapchainImageIndex() const noexcept { return m_swapchain_image_index; }
|
||||
[[nodiscard]] inline std::size_t GetCurrentFrameIndex() const noexcept { return m_current_frame_index; }
|
||||
[[nodiscard]] inline NonOwningPtr<Window> GetWindow() const noexcept { return p_window; }
|
||||
[[nodiscard]] inline DescriptorPoolManager& GetDescriptorPoolManager() noexcept { return m_descriptor_pool_manager; }
|
||||
|
||||
MLX_FORCEINLINE constexpr void RequireFramebufferResize() noexcept { m_framebuffers_resize = true; }
|
||||
|
||||
@@ -43,6 +45,7 @@ namespace mlx
|
||||
void DestroySwapchain();
|
||||
|
||||
private:
|
||||
DescriptorPoolManager m_descriptor_pool_manager;
|
||||
std::array<VkSemaphore, MAX_FRAMES_IN_FLIGHT> m_image_available_semaphores;
|
||||
std::array<VkSemaphore, MAX_FRAMES_IN_FLIGHT> m_render_finished_semaphores;
|
||||
std::array<VkCommandBuffer, MAX_FRAMES_IN_FLIGHT> m_cmd_buffers;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace mlx
|
||||
{
|
||||
public:
|
||||
SceneRenderer() = default;
|
||||
void Init();
|
||||
void Init(class Renderer& renderer);
|
||||
void Render(class Scene& scene, class Renderer& renderer); // TODO : add RTT support
|
||||
void Destroy();
|
||||
~SceneRenderer() = default;
|
||||
|
||||
Reference in New Issue
Block a user