BRL-CAD
ShaderMaster Class Reference

#include <oslexec_pvt.h>

Inheritance diagram for ShaderMaster:
[legend]
Collaboration diagram for ShaderMaster:
[legend]

Public Types

typedef intrusive_ptr< ShaderMasterref
 

Public Member Functions

 ShaderMaster (ShadingSystemImpl &shadingsys)
 
 ~ShaderMaster ()
 
std::string print ()
 
ShadingSystemImplshadingsys () const
 
void resolve_syms ()
 
int findsymbol (ustring name) const
 
Symbol * symbol (int index)
 
const std::string & shadername () const
 

Friends

class OSOReaderToMaster
 
class ShaderInstance
 

Detailed Description

ShaderMaster is the full internal representation of a complete shader that would be a .oso file on disk: symbols, instructions, arguments, you name it. A master copy is shared by all the individual instances of the shader.

Definition at line 215 of file oslexec_pvt.h.

Member Typedef Documentation

typedef intrusive_ptr<ShaderMaster> ref

Definition at line 217 of file oslexec_pvt.h.

Constructor & Destructor Documentation

ShaderMaster ( ShadingSystemImpl shadingsys)
inline

Definition at line 218 of file oslexec_pvt.h.

Member Function Documentation

std::string print ( )
ShadingSystemImpl& shadingsys ( ) const
inline

Return a pointer to the shading system for this master.

Definition at line 225 of file oslexec_pvt.h.

void resolve_syms ( )

Run through the symbols and set up various things we can know with just the master: the size (including padding), and their data pointers if they are constants or params (to the defaults). As a side effect, also set this->m_firstparam/m_lastparam.

int findsymbol ( ustring  name) const

Find the named symbol, return its index in the symbol array, or -1 if not found.

Symbol* symbol ( int  index)
inline

Return a pointer to the symbol (specified by integer index), or NULL (if index was -1, as returned by 'findsymbol').

Definition at line 239 of file oslexec_pvt.h.

const std::string& shadername ( ) const
inline

Return the name of the shader.

Definition at line 243 of file oslexec_pvt.h.

Friends And Related Function Documentation

friend class OSOReaderToMaster
friend

Definition at line 263 of file oslexec_pvt.h.

friend class ShaderInstance
friend

Definition at line 264 of file oslexec_pvt.h.


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