70002103 Improve the performance with WebGL 3d render modes

Article 70002103
Type Wish
Product WebJS
Version 9002
Date Added 11/11/2021 12:00:00 AM
Fixed 9.9003.0.3 (11/14/2021 12:00:00 AM)
Submitted by VectorDraw Team


improve the performance with WebGL 3d render modes


In version 9003.0.3 the SetBlockSize method is modified so it can get positive and negative values with different meaning

New implemation with posotove BlockSize values makes the redraw, with WebGL 3d render modes, 5 to 8 times faster ,from previous versions, depend on the Graphics Card

Sets the number of primitives to be drawn as a block when using WebGL. The higher value the quicker the render will be.

blockSize:The number of triangles to be drawn all together. Default value is 100.Minimum value is 20

Caution! some devices may fail after a specific limit.
Used with EnableWebGL.
Set it to a positive value in order to render in 3d webgl modes, the entire model layout entities with in one(1) single list which is faster because it uses the GPU opengl driver.
If use positive value may you need to call the UpdateLayout if you have change properties of entities.
The control internally call UpdateLayout in most cases of adding new entities or with user actions that transform entities or changing grip positions
A positive value also uses more amount of memory
Alternative you can set the block size to a negative value in order not to use model layout single list
Osnaps are not working with WebGL
Note that when a 3D drawing is opening, by default WebGl is active for performance reasons.
User can change the view from RenderWebGl or ShadeWebGl to Render or Shade using the SetRenderMode

Send comments on this topic.