Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infer array length from custom array if no vertex array is provided #93549

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Adrian-Samoticha
Copy link

While the RenderingServer::mesh_create_surface_data_from_arrays method does support vertexless meshes (see #62046 and #83446), it enforces that the size of custom arrays is dependent on the size of the vertex array. This effectively means that custom arrays cannot be used in vertexless meshes.

This commit changes the way the array length is computed so that if no vertex array is provided, its length will be inferred from the custom arrays, if provided. It therefore adds support for custom arrays in vertexless meshes.

While the `RenderingServer::mesh_create_surface_data_from_arrays`
method does support vertexless meshes (see godotengine#62046 and godotengine#83446),
it enforces that the size of custom arrays is dependent on the size of
the vertex array. This effectively means  that custom arrays cannot be
used in vertexless meshes.

This commit changes the way the array length is computed so that if no
vertex array is provided, its length will be inferred from the custom
arrays, if provided. It therefore adds support for custom arrays in
vertexless meshes.
Adrian-Samoticha and others added 2 commits June 24, 2024 14:50
Co-authored-by: A Thousand Ships (she/her) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants