Dynamic mesh using VBO

Requires Eyeshot 9.0.254 or greater.

 

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.

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 these kind of "dynamic" entities and can give bad performances.

To improve processing speed, set first:

Mesh.LightWeight = true;

to avoid the computation of the mesh edges at each regeneration. 

Then 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 9.zip" project.

 

Update 1:

From build 9.0.365 it is possible to create a dynamic mesh with texture coordinates that change dynamically. See attached file "VBOMesh_WithTexture_Eyeshot9.txt" for details.

 

 

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

Comments

0 comments

Please sign in to leave a comment.