mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add skeleton:is_visible(...), skeleton:set_visible(...)
This commit is contained in:
parent
055781eeaf
commit
8bb736bef0
10 changed files with 130 additions and 43 deletions
|
|
@ -70,9 +70,16 @@ void SkeletonConfig::render(
|
|||
const glm::mat4& matrix) const
|
||||
{
|
||||
update(skeleton, matrix);
|
||||
|
||||
if (!skeleton.visible) {
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < nodes.size(); i++) {
|
||||
auto* node = nodes[i];
|
||||
node->refreshModel(assets);
|
||||
if (!skeleton.flags[i].visible) {
|
||||
continue;
|
||||
}
|
||||
if (auto model = node->getModel()) {
|
||||
batch.pushMatrix(skeleton.calculated.matrices[i]);
|
||||
batch.draw(model, &skeleton.textures);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue