Support glb in gfx::gltf_mesh
This commit is contained in:
parent
d7c9b484fe
commit
1cc2c23602
1 changed files with 9 additions and 2 deletions
|
|
@ -64,8 +64,15 @@ namespace psemek::gfx
|
||||||
|
|
||||||
for (auto const & buffer : asset.buffers)
|
for (auto const & buffer : asset.buffers)
|
||||||
{
|
{
|
||||||
auto data = uri_loader(buffer.uri);
|
if (buffer.data)
|
||||||
buffers_.emplace_back().load(data.data(), data.size(), gl::STATIC_DRAW);
|
{
|
||||||
|
buffers_.emplace_back().load(buffer.data->data(), buffer.data->size(), gl::STATIC_DRAW);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
auto data = uri_loader(buffer.uri);
|
||||||
|
buffers_.emplace_back().load(data.data(), data.size(), gl::STATIC_DRAW);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto const & texture : asset.textures)
|
for (auto const & texture : asset.textures)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue