BRL-CAD
ShadingSystemImpl Class Reference

#include <oslexec_pvt.h>

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

Public Member Functions

 ShadingSystemImpl (RendererServices *renderer=NULL, TextureSystem *texturesystem=NULL, ErrorHandler *err=NULL)
 
virtual ~ShadingSystemImpl ()
 
virtual bool attribute (const std::string &name, TypeDesc type, const void *val)
 
virtual bool getattribute (const std::string &name, TypeDesc type, void *val)
 
virtual bool Parameter (const char *name, TypeDesc t, const void *val)
 
virtual bool Shader (const char *shaderusage, const char *shadername=NULL, const char *layername=NULL)
 
virtual bool ShaderGroupBegin (void)
 
virtual bool ShaderGroupEnd (void)
 
virtual bool ConnectShaders (const char *srclayer, const char *srcparam, const char *dstlayer, const char *dstparam)
 
virtual ShadingAttribStateRef state () const
 
virtual void clear_state ()
 
void error (const char *message,...)
 
void warning (const char *message,...)
 
void info (const char *message,...)
 
void message (const char *message,...)
 
void error (const std::string &message)
 
void warning (const std::string &message)
 
void info (const std::string &message)
 
void message (const std::string &message)
 
virtual std::string getstats (int level=1) const
 
ErrorHandler & errhandler () const
 
ShaderMaster::ref loadshader (const char *name)
 
void * create_thread_info ()
 
void destroy_thread_info (void *thread_info)
 
ShadingContextget_context (void *thread_info=NULL)
 
void release_context (ShadingContext *sc, void *thread_info=NULL)
 
void operator delete (void *todel)
 
int global_heap_offset (ustring name)
 
bool debug () const
 
RendererServices * renderer () const
 
TextureSystem * texturesys () const
 
bool allow_rebind () const
 
bool debug_nan () const
 
bool lockgeom_default () const
 
int optimize () const
 
int llvm_debug () const
 
ustring commonspace_synonym () const
 
void optimize_group (ShadingAttribState &attribstate, ShaderGroup &group)
 
int * alloc_int_constants (size_t n)
 
float * alloc_float_constants (size_t n)
 
ustring * alloc_string_constants (size_t n)
 
llvm::LLVMContext * llvm_context ()
 
llvm::ExecutionEngine * ExecutionEngine ()
 
virtual void register_closure (const char *name, int id, const ClosureParam *params, int size, PrepareClosureFunc prepare, SetupClosureFunc setup, CompareClosureFunc compare)
 
const ClosureRegistry::ClosureEntryfind_closure (ustring name) const
 
const ClosureRegistry::ClosureEntryfind_closure (int id) const
 
Color3 to_rgb (ustring fromspace, float a, float b, float c)
 
int raytype_bit (ustring name)
 

Friends

class ShadingContext
 
class ShaderMaster
 
class ShaderInstance
 
class RuntimeOptimizer
 

Detailed Description

Definition at line 576 of file oslexec_pvt.h.

Constructor & Destructor Documentation

ShadingSystemImpl ( RendererServices *  renderer = NULL,
TextureSystem *  texturesystem = NULL,
ErrorHandler *  err = NULL 
)
virtual ~ShadingSystemImpl ( )
virtual

Member Function Documentation

virtual bool attribute ( const std::string &  name,
TypeDesc  type,
const void *  val 
)
virtual
virtual bool getattribute ( const std::string &  name,
TypeDesc  type,
void *  val 
)
virtual
virtual bool Parameter ( const char *  name,
TypeDesc  t,
const void *  val 
)
virtual
virtual bool Shader ( const char *  shaderusage,
const char *  shadername = NULL,
const char *  layername = NULL 
)
virtual
virtual bool ShaderGroupBegin ( void  )
virtual
virtual bool ShaderGroupEnd ( void  )
virtual
virtual bool ConnectShaders ( const char *  srclayer,
const char *  srcparam,
const char *  dstlayer,
const char *  dstparam 
)
virtual
virtual ShadingAttribStateRef state ( ) const
virtual
virtual void clear_state ( )
virtual
void error ( const char *  message,
  ... 
)

Internal error reporting routine, with printf-like arguments.

void warning ( const char *  message,
  ... 
)

Internal warning reporting routine, with printf-like arguments.

void info ( const char *  message,
  ... 
)

Internal info printing routine, with printf-like arguments.

void message ( const char *  message,
  ... 
)

Internal message printing routine, with printf-like arguments.

void error ( const std::string &  message)

Error reporting routines that take a pre-formatted string only.

void warning ( const std::string &  message)
void info ( const std::string &  message)
void message ( const std::string &  message)
virtual std::string getstats ( int  level = 1) const
virtual
ErrorHandler& errhandler ( ) const
inline

Definition at line 623 of file oslexec_pvt.h.

ShaderMaster::ref loadshader ( const char *  name)
void* create_thread_info ( )
void destroy_thread_info ( void *  thread_info)
ShadingContext* get_context ( void *  thread_info = NULL)

Get a ShadingContext that we can use.

void release_context ( ShadingContext sc,
void *  thread_info = NULL 
)

Return a ShadingContext to the pool.

void operator delete ( void *  todel)
inline

Definition at line 639 of file oslexec_pvt.h.

int global_heap_offset ( ustring  name)

Return the precomputed heap offset of the named global, or -1 if it's not precomputed.

bool debug ( ) const
inline

Is the shading system in debug mode?

Definition at line 647 of file oslexec_pvt.h.

RendererServices* renderer ( ) const
inline

Return a pointer to the renderer services object.

Definition at line 651 of file oslexec_pvt.h.

TextureSystem* texturesys ( ) const
inline

Return a pointer to the texture system.

Definition at line 655 of file oslexec_pvt.h.

bool allow_rebind ( ) const
inline

Definition at line 657 of file oslexec_pvt.h.

bool debug_nan ( ) const
inline

Definition at line 659 of file oslexec_pvt.h.

bool lockgeom_default ( ) const
inline

Definition at line 660 of file oslexec_pvt.h.

int optimize ( ) const
inline

Definition at line 661 of file oslexec_pvt.h.

int llvm_debug ( ) const
inline

Definition at line 662 of file oslexec_pvt.h.

ustring commonspace_synonym ( ) const
inline

Definition at line 664 of file oslexec_pvt.h.

void optimize_group ( ShadingAttribState attribstate,
ShaderGroup group 
)

The group is set and won't be changed again; take advantage of this by optimizing the code knowing all our instance parameters (at least the ones that can't be overridden by the geometry).

int* alloc_int_constants ( size_t  n)
inline

Definition at line 671 of file oslexec_pvt.h.

float* alloc_float_constants ( size_t  n)
inline

Definition at line 672 of file oslexec_pvt.h.

ustring* alloc_string_constants ( size_t  n)
inline

Definition at line 673 of file oslexec_pvt.h.

llvm::LLVMContext* llvm_context ( )
inline

Definition at line 675 of file oslexec_pvt.h.

llvm::ExecutionEngine* ExecutionEngine ( )
inline

Definition at line 676 of file oslexec_pvt.h.

virtual void register_closure ( const char *  name,
int  id,
const ClosureParam *  params,
int  size,
PrepareClosureFunc  prepare,
SetupClosureFunc  setup,
CompareClosureFunc  compare 
)
virtual
const ClosureRegistry::ClosureEntry* find_closure ( ustring  name) const
inline

Definition at line 680 of file oslexec_pvt.h.

const ClosureRegistry::ClosureEntry* find_closure ( int  id) const
inline

Definition at line 683 of file oslexec_pvt.h.

Color3 to_rgb ( ustring  fromspace,
float  a,
float  b,
float  c 
)

Convert a color in the named space to RGB.

int raytype_bit ( ustring  name)

For the proposed raytype name, return the bit pattern that describes it, or 0 for an unrecognized name.

Friends And Related Function Documentation

friend class ShadingContext
friend

Definition at line 825 of file oslexec_pvt.h.

friend class ShaderMaster
friend

Definition at line 826 of file oslexec_pvt.h.

friend class ShaderInstance
friend

Definition at line 827 of file oslexec_pvt.h.

friend class RuntimeOptimizer
friend

Definition at line 828 of file oslexec_pvt.h.


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