mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 17:39:46 +00:00
Merge branch 'MihailRis:main' into main
This commit is contained in:
commit
a7f50c25f7
11 changed files with 177 additions and 55 deletions
|
|
@ -48,10 +48,14 @@ void gui::Frame::draw(const DrawContext& pctx, const Assets& assets) {
|
|||
void gui::Frame::updateOutput(Assets& assets) {
|
||||
if (fbo && (fbo->getWidth() != size.x || fbo->getHeight() != size.y)) {
|
||||
fbo->resize(size.x, size.y);
|
||||
assets.store(fbo->getSharedTexture(), outputTexture);
|
||||
if (!outputTexture.empty()) {
|
||||
assets.store(fbo->getSharedTexture(), outputTexture);
|
||||
}
|
||||
} else if (fbo == nullptr) {
|
||||
fbo = std::make_unique<Framebuffer>(size.x, size.y, true);
|
||||
assets.store(fbo->getSharedTexture(), outputTexture);
|
||||
if (!outputTexture.empty()) {
|
||||
assets.store(fbo->getSharedTexture(), outputTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ static util::TextureRegion determine_texture_region(
|
|||
const Assets& assets, const std::string& texture
|
||||
) {
|
||||
static std::array<std::string, 6> faces {
|
||||
"blocks:dbg_east",
|
||||
"blocks:dbg_west",
|
||||
"blocks:dbg_east",
|
||||
"blocks:dbg_bottom",
|
||||
"blocks:dbg_top",
|
||||
"blocks:dbg_south",
|
||||
"blocks:dbg_north",
|
||||
"blocks:dbg_south",
|
||||
};
|
||||
|
||||
if (texture.length() < 2 || texture.at(0) != '$') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue