Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::graphics::materials::TechniqueLibrary Class Reference

A library which contains Technique objects for different TechniqueUsage types. More...

#include <omGraphicsTechniqueLibrary.h>

Inheritance diagram for om::graphics::materials::TechniqueLibrary:
om::graphics::devices::GraphicsContextObject

Public Member Functions

 TechniqueLibrary ()
 Create a new technique library that contains no techniques. More...
 
 TechniqueLibrary (const ShaderProgramLibrary *newPrograms)
 Create a new technique library that contains no techniques and uses the specified shader program library. More...
 
 ~TechniqueLibrary ()
 Destroy this technique library, releasing all associated resources. More...
 
const ShaderProgramLibrarygetProgramLibrary () const
 Return a pointer to the shader program library the technique library is using for shaders. More...
 
void setProgramLibrary (const ShaderProgramLibrary *newPrograms)
 Set a pointer to the shader program library the technique library is using for shaders. More...
 
Size getTechniqueCount () const
 Return the number of techniques that this technique library has. More...
 
TechniquegetTechnique (TechniqueUsage::Enum usage) const
 Return a pointer to a technique in this technique library with the specified usage. More...
 
TechniquegetTechnique (const TechniqueUsage &usage) const
 Return a pointer to a technique in this technique library with the specified usage. More...
 
void clearTechniques ()
 Clear all techniques from this technique library. More...
 
virtual void setContext (devices::GraphicsContext *newContext)
 Set a pointer to the graphics context this library and its techniques should use to do rendering. More...
 
virtual void upload (UploadRequest &request)
 Upload this library and its techniques' current CPU representation to the GPU device. More...
 
virtual void download (DownloadRequest &request)
 Download the library and its technique' GPU representation to CPU memory. More...
 
- Public Member Functions inherited from om::graphics::devices::GraphicsContextObject
virtual ~GraphicsContextObject ()
 Destory this graphics context object. More...
 
GraphicsContextgetContext () const
 Return a pointer to the graphics context this context object is using to do rendering. More...
 
void clearContext ()
 Clear the previous context from this object. More...
 
void upload ()
 Upload this resource's CPU representation to the GPU device. More...
 
void download ()
 Upload this resource's CPU representation to the GPU device. More...
 
virtual Bool isUploaded () const
 Return whether or not this graphics resource has been successfully created and uploaded to the device. More...
 
virtual Bool isDownloaded () const
 Return whether or not this graphics resource has a copy of its data stored in CPU-side memory. More...
 
virtual Bool isValid () const
 Return whether or not the state of this graphics resource is valid (either on CPU or GPU) and able to be used for rendering. More...
 

Additional Inherited Members

- Protected Member Functions inherited from om::graphics::devices::GraphicsContextObject
 GraphicsContextObject ()
 Create a new graphics context object that doesn't have an associated graphics context. More...
 
 GraphicsContextObject (GraphicsContext *newContext)
 Create a new graphics context object that uses the specified context for rendering. More...
 
- Protected Attributes inherited from om::graphics::devices::GraphicsContextObject
GraphicsContextcontext
 A pointer to the graphics context this object is using. More...
 

Detailed Description

A library which contains Technique objects for different TechniqueUsage types.

Constructor & Destructor Documentation

om::graphics::materials::TechniqueLibrary::TechniqueLibrary ( )

Create a new technique library that contains no techniques.

om::graphics::materials::TechniqueLibrary::TechniqueLibrary ( const ShaderProgramLibrary newPrograms)

Create a new technique library that contains no techniques and uses the specified shader program library.

om::graphics::materials::TechniqueLibrary::~TechniqueLibrary ( )

Destroy this technique library, releasing all associated resources.

Member Function Documentation

const ShaderProgramLibrary* om::graphics::materials::TechniqueLibrary::getProgramLibrary ( ) const
inline

Return a pointer to the shader program library the technique library is using for shaders.

If there is no program library, NULL is returned. In that case, the techniques use the default shader programs provided by the context.

void om::graphics::materials::TechniqueLibrary::setProgramLibrary ( const ShaderProgramLibrary newPrograms)
inline

Set a pointer to the shader program library the technique library is using for shaders.

Size om::graphics::materials::TechniqueLibrary::getTechniqueCount ( ) const
inline

Return the number of techniques that this technique library has.

Technique* om::graphics::materials::TechniqueLibrary::getTechnique ( TechniqueUsage::Enum  usage) const
inline

Return a pointer to a technique in this technique library with the specified usage.

If there is no technique with that usage, a NULL pointer is returned.

Technique* om::graphics::materials::TechniqueLibrary::getTechnique ( const TechniqueUsage usage) const

Return a pointer to a technique in this technique library with the specified usage.

If there is no technique with that usage, a NULL pointer is returned.

void om::graphics::materials::TechniqueLibrary::clearTechniques ( )

Clear all techniques from this technique library.

virtual void om::graphics::materials::TechniqueLibrary::setContext ( devices::GraphicsContext newContext)
virtual

Set a pointer to the graphics context this library and its techniques should use to do rendering.

The method propagates the context to the library's techniques and shaders and regenerates any context-specific data for the new context.

Reimplemented from om::graphics::devices::GraphicsContextObject.

virtual void om::graphics::materials::TechniqueLibrary::upload ( UploadRequest request)
virtual

Upload this library and its techniques' current CPU representation to the GPU device.

Reimplemented from om::graphics::devices::GraphicsContextObject.

virtual void om::graphics::materials::TechniqueLibrary::download ( DownloadRequest request)
virtual

Download the library and its technique' GPU representation to CPU memory.

Reimplemented from om::graphics::devices::GraphicsContextObject.


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