SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
SmTextureText2Collector Class Reference

The SmTextureText2Collector node is a group node which optimizes SmTextureText2 rendering. More...

#include <nodes/SmTextureText2Collector.h>

Inheritance diagram for SmTextureText2Collector:
SoSeparator

Public Member Functions

virtual void GLRenderBelowPath (SoGLRenderAction *action)
 
virtual void GLRenderInPath (SoGLRenderAction *action)
 

Static Public Member Functions

static void initClass (void)
 

Public Attributes

SoSFBool depthMask
 

Protected Member Functions

virtual void renderText (SoGLRenderAction *action, const std::vector< SmTextureText2CollectorElement::TextItem > &)
 

Detailed Description

The SmTextureText2Collector node is a group node which optimizes SmTextureText2 rendering.

Since SmTextureText2 has antialiased rendering, it needs to render the text in a separate blending pass in Coin. This makes rendering slow if you have lots of SmTextureText2 nodes in your scene graph, and you use the SORTED_OBJECT_BLEND or DELAYED_BLEND transparency modes.

SmTextureText2 will also invalidate render and bounding box caches every time the camera moves. In addition, you might get quite a lot of OpenGL state changes when rendering the SmTextureText2 nodes in between other geometry.

To solve these problem, it's possible to use this node to optimize text rendering. It will collect all strings from all SmTextureText2 nodes in its subgraph, and render all strings before exiting.

A typical scene graph might look like this:

...
}
}
Definition misc/SbList.h:69
The SmTextureText2Collector node is a group node which optimizes SmTextureText2 rendering.
Definition SmTextureText2Collector.h:68
The SmTextureText2 node is used for fast text rendering.
Definition SmTextureText2.h:53

Please note that this node will only be able to optimize SmTextureText2 nodes where the number of positions equals the number of strings.


The documentation for this class was generated from the following files: