Om
1.0.0
A universal framework for multimedia simulation
|
A library which contains Technique objects for different TechniqueUsage types. More...
#include <omGraphicsTechniqueLibrary.h>
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 ShaderProgramLibrary * | getProgramLibrary () 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... | |
Technique * | getTechnique (TechniqueUsage::Enum usage) const |
Return a pointer to a technique in this technique library with the specified usage. More... | |
Technique * | getTechnique (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... | |
GraphicsContext * | getContext () 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 | |
GraphicsContext * | context |
A pointer to the graphics context this object is using. More... | |
A library which contains Technique objects for different TechniqueUsage types.
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.
|
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.
|
inline |
Set a pointer to the shader program library the technique library is using for shaders.
|
inline |
Return the number of techniques that this technique library has.
|
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 |
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 |
Upload this library and its techniques' current CPU representation to the GPU device.
Reimplemented from om::graphics::devices::GraphicsContextObject.
|
virtual |
Download the library and its technique' GPU representation to CPU memory.
Reimplemented from om::graphics::devices::GraphicsContextObject.