mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
refactor
This commit is contained in:
parent
d189bdc107
commit
e06350915e
9 changed files with 284 additions and 236 deletions
|
|
@ -83,7 +83,7 @@ void Container::draw(const GfxContext* pctx, Assets* assets) {
|
|||
|
||||
auto batch = pctx->getBatch2D();
|
||||
batch->texture(nullptr);
|
||||
batch->render();
|
||||
batch->flush();
|
||||
{
|
||||
GfxContext ctx = pctx->sub();
|
||||
ctx.scissors(glm::vec4(coord.x, coord.y, size.x, size.y));
|
||||
|
|
@ -91,7 +91,7 @@ void Container::draw(const GfxContext* pctx, Assets* assets) {
|
|||
if (node->isVisible())
|
||||
node->draw(pctx, assets);
|
||||
}
|
||||
batch->render();
|
||||
batch->flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ void Container::drawBackground(const GfxContext* pctx, Assets* assets) {
|
|||
|
||||
auto batch = pctx->getBatch2D();
|
||||
batch->texture(nullptr);
|
||||
batch->color = color;
|
||||
batch->setColor(color);
|
||||
batch->rect(coord.x, coord.y, size.x, size.y);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue