mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
frontend/gui refactor
This commit is contained in:
parent
49fdcdfb27
commit
8c722b146e
17 changed files with 331 additions and 332 deletions
|
|
@ -17,6 +17,7 @@
|
|||
#include "window/Camera.h"
|
||||
#include "window/input.h"
|
||||
#include "graphics/Batch2D.h"
|
||||
#include "graphics/GfxContext.h"
|
||||
#include "graphics/Shader.h"
|
||||
#include "graphics/ImageData.h"
|
||||
#include "frontend/gui/GUI.h"
|
||||
|
|
@ -113,7 +114,11 @@ void Engine::mainloop() {
|
|||
|
||||
if (!Window::isIconified()) {
|
||||
screen->draw(delta);
|
||||
gui->draw(&batch, assets.get());
|
||||
|
||||
Viewport viewport(Window::width, Window::height);
|
||||
GfxContext ctx(nullptr, viewport, &batch);
|
||||
gui->draw(&ctx, assets.get());
|
||||
|
||||
Window::swapInterval(settings.display.swapInterval);
|
||||
} else {
|
||||
Window::swapInterval(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue