Dynamic Mesh using VBO

In some cases, you may want to update the geometry of a Mesh entity very often (even at each frame).

Suppose we have a color Mesh whose vertices positions and colors change at each frame: after each data update, the Entity.RegenMode is set to RegenAndCompile and the ViewportLayout.Entities.Regen() needs to be called.

The Eyeshot Mesh class, that use static graphics data, is not designed to support this kind of "dynamic" entities and can give bad performances.

To improve processing speed:

  1. Set:
    Mesh.LightWeight = true;
    to avoid the computation of the mesh edges at each regeneration. 

  2. Use of a Mesh-derived class that uses Vertex Buffer Object (VBO), the best approach to draw a Mesh entity that changes so frequently, is shown in the attached "DynamicVBO Mesh - Eyeshot 12.zip" project.

Furthermore, it is possible to create a dynamic mesh with texture coordinates that change dynamically, check the VBO_WithTexture() method in the attached project.

Previous versions of this article: Eyeshot 9, Eyeshot 7

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.