Reuse image data instead of fetching it every time off the GPU

This commit is contained in:
ShadelessFox
2025-02-22 17:49:36 +01:00
parent 8a8c1525fd
commit 0b6ba2faee
5 changed files with 29 additions and 16 deletions
+1 -1
View File
@@ -326,7 +326,7 @@ static int p_get_src(UINode* node, lua::State* L) {
static int p_get_data(UINode* node, lua::State* L) {
if (auto canvas = dynamic_cast<Canvas*>(node)) {
return lua::newuserdata<lua::LuaCanvas>(L, canvas->texture());
return lua::newuserdata<lua::LuaCanvas>(L, canvas->texture(), canvas->data());
}
return 0;
}