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

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from SoBundle
 SoBundle (SoAction *action)
 Constructor takes action from whose state bundle is to access elements. More...
 
 ~SoBundle ()
 Destructor. More...
 
- Protected Attributes inherited from SoBundle
SoStatestate
 Stores state for any bundle. More...
 

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::SoMaterialBundle ( SoAction action)

◆ ~SoMaterialBundle()

SoMaterialBundle::~SoMaterialBundle ( )

Member Function Documentation

◆ forceSend()

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.

◆ isColorOnly()

bool SoMaterialBundle::isColorOnly ( ) const
inline

Definition at line 114 of file SoMaterialBundle.h.

◆ send()

void SoMaterialBundle::send ( int  index,
bool  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.

◆ sendFirst()

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.

◆ setUpMultiple()

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: