This experimental class provides a fast code path for rendering meshes with frequently updated geometry data. When the renderer encounters an instance of ImmediateRenderObject, it only takes care about the most primitive rendering operations (e.g. binding vertex attributes, determining correct shader program or perfoming the actual draw call). Features like view frustum culling, wireframe rendering or using multiple materials are not supported. Besides ImmediateRenderObject can only be used to render triangles.
ImmediateRenderObject does not work with instances of BufferGeometry or Geometry. The raw geometry data have to be maintained as properties of the ImmediateRenderObject.
Using ImmediateRenderObject makes only sense if you are updating your geometry data per frame. You can then benefit of a faster code path compared to the default mesh redering logic.
material — The material of the ImmediateRenderObject.
See the base Object3D class for common properties.
The material of the ImmediateRenderObject. Assigning multiple materials is not supported.
Whether position data are defined or not. Default is false.
Whether normal data are defined or not. Default is false.
Whether color data are defined or not. Default is false.
Whether texture coordinates are defined or not. Default is false.
The buffer holding position data. Default is null.
The buffer holding normal data. Default is null.
The buffer holding color data. Default is null.
The buffer holding texture coordinates. Default is null.
The number of primitives to be rendered. Default is 0. This property will be set to 0 after each rendering so you usually set it in the implementatio of .render().
See the base Object3D class for common methods.
renderCallback -- A function to render the generated geometry data.
This method needs to be implemented by the deriving class of ImmediateRenderObject. You normally want to implement the vertex buffer update logic and execute renderCallback at the end of your implementation.
For more info on how to obtain the source code of this module see this page.