Skip to content

Conversation

@player-03
Copy link
Collaborator

Most users likely don't need "secondary UVs", for instance, and could save memory by omitting them. Others might want to add a custom 4-length attribute (not fully implemented; you can define them but they'll be ignored).

Sample usage:

final vertexDefinition:VertexDefinition = new VertexDefinition([
	new AttributeDefinition("position", 3),
	new AttributeDefinition("UV", 2)
]);
final geometry:CompactSubGeometry = new CompactSubGeometry(vertexDefinition);

//Add geometry containing positions and UVs...

view.scene.addChild(new Mesh(geometry));

This sub-geometry allocates only 5 floats per vertex, instead of 13, massively reducing buffer size.

…es `CompactSubGeometry` includes.

Most users likely don't need "secondary UVs", for instance, and could save memory by omitting them. Others might want to add a custom 4-length attribute.
@player-03
Copy link
Collaborator Author

Oh, and I wrote this for Haxe 4.3+, so that's another reason it's still a draft.

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