Massive update to start work on asset loading.

This commit is contained in:
Hartmut Seichter 2022-01-20 17:58:12 +01:00
parent 8f58570b21
commit 2b312f3494
17 changed files with 346 additions and 58 deletions

View file

@ -231,6 +231,8 @@ void register_core_function(sol::state& lua,sol::table& ns)
auto image_type = ns.new_usertype<image>("image"
,sol::call_constructor,sol::constructors<image(),image(const size&,image::pixel_layout pl,const void*)>()
,"create",&image::create
,"release",&image::release
,"is_valid",sol::readonly_property(&image::is_valid)
,"size",sol::readonly_property(&image::size)
,"generate_noise",&image::generate_noise
,"change_count",sol::property(&image::change_count,&image::set_change_count)

View file

@ -9,6 +9,8 @@
#include "pw/core/debug.hpp"
#include <any>
namespace pw {
void register_system_function(sol::state&, sol::table &ns)
@ -45,8 +47,8 @@ void register_system_function(sol::state&, sol::table &ns)
,"new",sol::no_constructor
,"get",&path::get
,"separator",sol::readonly_property(&path::separator)
,"resource_paths",sol::readonly_property(&path::resource_paths)
,"executable_path",sol::readonly_property(&path::executable_path)
,"resource_paths",sol::readonly_property([](const path& p){return sol::as_table(p.resource_paths());})
);
}