diff --git a/doc/todo.txt b/doc/todo.txt index e5dd31f..c78b562 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -25,3 +25,4 @@ Buildat TODO - Automatically fetch and build and patch Urho3D when building buildat - Handle module load order properly in reloads (unload by popping from top, then reload everything until top) +- Try out dynamic geometry diff --git a/extensions/urho3d/safe_classes.lua b/extensions/urho3d/safe_classes.lua index 1371295..f019522 100644 --- a/extensions/urho3d/safe_classes.lua +++ b/extensions/urho3d/safe_classes.lua @@ -6,9 +6,18 @@ local log = buildat.Logger("safe_classes") local M = {} function M.define(dst, util) + util.wc("Variant", { + unsafe_constructor = util.wrap_function({{"Color"}}, + function(value) + return util.wrap_instance("Variant", Variant(value)) + end), + instance = { + } + }) + util.wc("VariantMap", { unsafe_constructor = util.wrap_function({}, - function(x, y, z) + function() return util.wrap_instance("VariantMap", VariantMap()) end), instance = { @@ -149,6 +158,8 @@ function M.define(dst, util) -- log:info("Material:SetTexture("..dump(index)..", "..dump(texture)..")") -- self:SetTexture(index, texture) --end), + SetShaderParameter = util.self_function( + "SetShaderParameter", {}, {"Material", "string", "Variant"}), SetTexture = util.self_function( "SetTexture", {}, {"Material", "number", "Texture"}), SetTechnique = util.self_function(