From f5e966303fccb254fa76f41fb876b5136182350a Mon Sep 17 00:00:00 2001 From: "D. Quan" <60545346+sudoker0@users.noreply.github.com> Date: Wed, 25 Mar 2026 07:17:10 +0700 Subject: [PATCH] bump tgui to commit 9adfba, remove temp fix for VRAM issue (has been fixed on tgui side) --- src/editor/views/worldView.cpp | 33 +-------------------------------- xmake.lua | 1 + 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/editor/views/worldView.cpp b/src/editor/views/worldView.cpp index d74cee3..b79ede4 100644 --- a/src/editor/views/worldView.cpp +++ b/src/editor/views/worldView.cpp @@ -50,38 +50,7 @@ tgui::Widget::Ptr WorldView::clone() const { } void WorldView::setSize(const tgui::Layout2d &size) { - CanvasBase::setSize(size); - const tgui::Vector2f newSize = getSize(); - - if ((newSize.x > 0) && (newSize.y > 0)) - { - const tgui::Vector2u newTextureSize{newSize}; - // if ((m_textureSize.x < newTextureSize.x) || (m_textureSize.y < newTextureSize.y)) - { - if (m_textureTarget.id > 0) - { - // The m_backendTexture is using the exact same texture as our render target (due to the call to replaceInternalTexture). - // To prevent the texture from being freed twice, we shouldn't let UnloadRenderTexture delete the texture. - m_textureTarget.texture.id = 0; - UnloadRenderTexture(m_textureTarget); - } - TGUI_ASSERT(tgui::isBackendSet() && tgui::getBackend()->hasRenderer() - && std::dynamic_pointer_cast(tgui::getBackend()->getRenderer()), - "CanvasRaylib can only be used when using the Raylib backend renderer"); - - m_textureTarget = LoadRenderTexture(static_cast(newTextureSize.x), static_cast(newTextureSize.y)); - - // Move the ownership of the texture to our backend texture - m_backendTexture->replaceInternalTexture(m_textureTarget.texture); - - if (m_textureTarget.id) - m_textureSize = newTextureSize; - else - m_textureSize = {}; - } - - m_usedTextureSize = newTextureSize; - } + tgui::CanvasRaylib::setSize(size); } bool WorldView::isMouseOnWidget(tgui::Vector2f pos) const { diff --git a/xmake.lua b/xmake.lua index e9d8176..a089dfa 100644 --- a/xmake.lua +++ b/xmake.lua @@ -55,6 +55,7 @@ package("tgui") -- set_sourcedir(path.join(os.scriptdir(), "libs/tgui/")) add_urls("https://github.com/texus/TGUI.git") add_versions("1.12.99", "c6d138509f2aae33cbabb09a91c5857eba990657") +add_versions("1.12.100", "9adfbabe2615a7617d86594a37bfb956ad907670") add_deps("cmake", "raylib") set_license("Zlib") add_extsources("raylib")