Open Inventor Reference
SoMaterialBundle Class Reference

Bundle that allows shapes to deal with materials more easily. More...

#include <Inventor/bundles/SoMaterialBundle.h>

Inheritance diagram for SoMaterialBundle:
SoBundle

List of all members.

Public Member Functions

 SoMaterialBundle (SoAction *action)
 Constructor - takes the action the bundle is used for.
 ~SoMaterialBundle ()
 Destructor.
void setUpMultiple ()
 This can be called by shapes to prepare for sending multiple materials later on.
void sendFirst ()
 Makes sure the first defined material in the state is sent to GL.
void send (int index, SbBool isBetweenBeginEnd)
 Sends indexed material to the GL if it's not already there.
void forceSend (int index)
 Sends indexed material to the GL even if it's already there.
SbBool isColorOnly () const
 Returns TRUE if only base color part of material is used.

Detailed Description

Since materials deal with several elements simultaneously, this bundle hides a lot of this work from shapes.

Much of the functionality of this bundle has been replaced by the SoLazyElement.

Definition at line 76 of file SoMaterialBundle.h.


Constructor & Destructor Documentation

SoMaterialBundle::SoMaterialBundle ( SoAction action)
SoMaterialBundle::~SoMaterialBundle ( )

Member Function Documentation

void SoMaterialBundle::forceSend ( int  index) [inline]

This method can be used by SoMaterial and related nodes to send the base material to the GL to avoid cache dependencies on materials.

Definition at line 110 of file SoMaterialBundle.h.

References FALSE, and TRUE.

SbBool SoMaterialBundle::isColorOnly ( ) const [inline]

Definition at line 114 of file SoMaterialBundle.h.

void SoMaterialBundle::send ( int  index,
SbBool  isBetweenBeginEnd 
) [inline]

The second paramater should be TRUE if this send is between a glBegin() and glEnd() call, in which case the stipple pattern commands for screen-door transparency won't be sent.

Definition at line 104 of file SoMaterialBundle.h.

References FALSE.

void SoMaterialBundle::sendFirst ( ) [inline]

This should never be called between calls to glBegin() and glEnd().

Definition at line 98 of file SoMaterialBundle.h.

References FALSE.

void SoMaterialBundle::setUpMultiple ( ) [inline]

It is not required, since all of the send methods call it if necessary. However, it allows the bundle to set up some optimizations that are not possible to do later on. This should never be called between calls to glBegin() and glEnd().

Definition at line 91 of file SoMaterialBundle.h.

References FALSE, and TRUE.


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