Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

How to update (parts of the) Dynamic Vertex Buffers?

$
0
0

@kosmonautgames wrote:

Hi guys,

I hope someone has experience with this.

How does vertexBuffer.SetData work?

To be more accurate: How do I update parts of the vertexBuffer only?

vertexBuffer.SetData(vertices) gives me no problem.

But let's say I want to change the 3 and 4th vertex element only.

vertexBuffer.SetData(2, vertices, 2, 2, stride);

somehow results in some broken mess. I am fairly certain my stride size is calculated correctly (sizeof(float)*6 for vector3, vector2, single).

Can anyone with experience enlighten me or provide examples of how he dealt with that?

thanks :slightly_smiling:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles