Skip to content

Implement support for KHR_node_visibility#294

Open
pablode wants to merge 1 commit into
jkuhlmann:masterfrom
pablode:KHR_node_visibility
Open

Implement support for KHR_node_visibility#294
pablode wants to merge 1 commit into
jkuhlmann:masterfrom
pablode:KHR_node_visibility

Conversation

@pablode

@pablode pablode commented May 23, 2026

Copy link
Copy Markdown

Comment thread cgltf.h
Comment on lines +714 to +715
cgltf_bool has_visibility;
cgltf_node_visibility visibility;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've followed the extension pattern but cgltf_bool visible; could be simpler.

Comment thread cgltf_write.h
cgltf_write_line(context, "}");
}

if (node->has_visibility && !node->visibility.visible)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an optimization like for node->mesh_gpu_instancing.attributes_count below. Otherwise, if visible matches the default value true, we would just author an empty extension struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant