add 'assets' library docs

This commit is contained in:
MihailRis
2025-08-13 23:59:05 +03:00
parent bef8e4b9d6
commit 2cdcebf9d9
7 changed files with 61 additions and 2 deletions
-1
View File
@@ -174,7 +174,6 @@ std::unique_ptr<model::Model> vcm::parse(
"'model' tag expected as root, got '" + root.getTag() + "'"
);
}
std::cout << xml::stringify(*doc) << std::endl;
return load_model(root);
} catch (const parsing_error& err) {
throw std::runtime_error(err.errorLog());
@@ -23,6 +23,9 @@ static void load_texture(
}
static int l_load_texture(lua::State* L) {
if (lua::isstring(L, 3) && lua::require_lstring(L, 3) != "png") {
throw std::runtime_error("unsupportd image format");
}
if (lua::istable(L, 1)) {
lua::pushvalue(L, 1);
size_t size = lua::objlen(L, 1);