@@ -26,11 +26,9 @@ Renderer::Renderer(Window& window) : window {window}
26
26
27
27
if (instance == nullptr ) instance = this ;
28
28
29
- auto extent = window.GetExtent ();
29
+ auto extent = window.GetExtents ();
30
30
31
- context.Init ({extent.width , extent.height },
32
- Window::GetRequiredExtensions,
33
- Window::CreateWindowSurface);
31
+ context.Init (window);
34
32
35
33
DescriptorPool::AddPoolSize (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1024 );
36
34
DescriptorPool::AddPoolSize (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1024 );
@@ -63,11 +61,11 @@ void Renderer::DrawFrame()
63
61
void Renderer::RecreateSwapChain ()
64
62
{
65
63
ClearDeviceQueue ();
66
- auto extent = window.GetExtent ();
64
+ auto extent = window.GetExtents ();
67
65
68
66
while (!window.IsVisible () || extent.width == 0.0 || extent.height == 0.0 )
69
67
{
70
- extent = window.GetExtent ();
68
+ extent = window.GetExtents ();
71
69
window.WaitEvents ();
72
70
}
73
71
@@ -123,7 +121,7 @@ void Renderer::DrawQuad(const Vec2 position,
123
121
renderer2D.DrawQuad (position, scale, colour, rotation, zIndex, texture);
124
122
}
125
123
126
- void Renderer::DrawText2D (const char * const text,
124
+ void Renderer::DrawText2D (const char * text,
127
125
Vulkan::Font& font,
128
126
const Vec2 position,
129
127
const Vec2 scale,
0 commit comments