mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
GfxContext, render refactor
This commit is contained in:
parent
ea729760d4
commit
e3743b8463
12 changed files with 270 additions and 103 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "../window/input.h"
|
||||
#include "../graphics/Shader.h"
|
||||
#include "../graphics/Batch2D.h"
|
||||
#include "../graphics/GfxContext.h"
|
||||
#include "../assets/Assets.h"
|
||||
#include "../world/Level.h"
|
||||
#include "../world/World.h"
|
||||
|
|
@ -356,8 +357,11 @@ void LevelScreen::update(float delta) {
|
|||
void LevelScreen::draw(float delta) {
|
||||
Camera* camera = level->player->camera;
|
||||
|
||||
worldRenderer->draw(camera, occlusion);
|
||||
hud->draw();
|
||||
Viewport viewport(Window::width, Window::height);
|
||||
GfxContext ctx(nullptr, viewport, nullptr);
|
||||
|
||||
worldRenderer->draw(ctx, camera, occlusion);
|
||||
hud->draw(ctx);
|
||||
if (level->player->debug) {
|
||||
hud->drawDebug( 1 / delta, occlusion);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue