You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.
The GeometricPrimitive is very useful for drawing planes or spheres but they would be a lot more powerful if we were able to change their size (through a property) without having to create another instance of the object.
The text was updated successfully, but these errors were encountered:
This is usually not done like this. GeometricPrimitives are immutable data because they better fit the way the GPU is optimized for them. Usually if you need dynamic scenario for modifying vertices, you can either implement the resize logic in a custom vertex shader with a World/Object Matrix that can scale the object (so that the initial vertex buffer doesn't change). You can do that basically with a BasicEffect with a specific World matrix.
For other dynamic requirements (list of vertices changing often...etc.), they are too specific to be generalized but the API provides a way to create your custom vertex/index dynamic buffer...etc.
So sorry, GeometricPrimitives should stay immutable.
This is usually not done like this. GeometricPrimitives are immutable data because they better fit the way the GPU is optimized for them. Usually if you need dynamic scenario for modifying vertices, you can either implement the resize logic in a custom vertex shader with a World/Object Matrix that can scale the object (so that the initial vertex buffer doesn't change). You can do that basically with a BasicEffect with a specific World matrix.
For other dynamic requirements (list of vertices changing often...etc.), they are too specific to be generalized but the API provides a way to create your custom vertex/index dynamic buffer...etc.
So sorry, GeometricPrimitives should stay immutable.
—
Reply to this email directly or view it on GitHub.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The GeometricPrimitive is very useful for drawing planes or spheres but they would be a lot more powerful if we were able to change their size (through a property) without having to create another instance of the object.
The text was updated successfully, but these errors were encountered: