Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SH::ShBackend Class Reference

Inheritance diagram for SH::ShBackend:

Inheritance graph
[legend]
Collaboration diagram for SH::ShBackend:

Collaboration graph
[legend]
List of all members.

Public Types

typedef lt_dlhandle_struct * LibraryHandle
typedef std::map< std::string,
LibraryHandle
LibraryMap
typedef std::map< std::string,
ShPointer< ShBackend > > 
BackendMap
typedef std::set< std::string > BackendSet

Public Member Functions

virtual ~ShBackend ()
virtual std::string name () const
 Short name of the backend (e.g.
virtual std::string version () const =0
 Backend-specific version number.
virtual ShBackendCodePtr generate_code (const std::string &target, const ShProgramNodeCPtr &shader)=0
 Generate the backend code for a particular shader.
virtual ShBackendSetPtr generate_set (const ShProgramSet &s)
virtual void execute (const ShProgramNodeCPtr &program, ShStream &dest)=0
 Execute a stream program, if supported.
virtual void unbind_all_programs ()
 Unbind all programs bound under the backend.

Static Public Member Functions

static void unbind_all_backends ()
 Unbind all programs bound under all backends.
static bool use_backend (const std::string &backend_name)
 Add a backend to the list of selected backends.
static bool have_backend (const std::string &backend_name)
 Checks whether the backend is available or not.
static void clear_backends ()
 Clear the list of selected backends.
static std::string target_handler (const std::string &target, bool restrict_to_selected)
 Find the name of the best backend that handles the given target.
static ShPointer< ShBackendget_backend (const std::string &target)
 Returns a backend that can run the specified target.
static std::list< std::string > derived_targets (const std::string &target)
 Returns a list of targets derived from a generic target name.

Protected Member Functions

 ShBackend ()

Detailed Description

Definition at line 99 of file ShBackend.hpp.


Member Function Documentation

static std::list<std::string> SH::ShBackend::derived_targets const std::string &  target  )  [static]
 

Returns a list of targets derived from a generic target name.

e.g. "arb:vertex, glsl:vertex" is returned when the generic target is "gpu:vertex".

Referenced by SH::ShContext::bound_program(), and SH::ShProgramNode::is_compiled().

virtual std::string SH::ShBackend::name void   )  const [inline, virtual]
 

Short name of the backend (e.g.

"arb", "cc", "glsl")

Reimplemented in ShCc::CcBackend, shgl::ArbBackend, shgl::GlslBackend, and ShSm::Backend.

Definition at line 105 of file ShBackend.hpp.

Referenced by ~ShBackend().


The documentation for this class was generated from the following files:
Generated on Thu Jul 28 17:35:07 2005 for Sh by  doxygen 1.4.3-20050530