Urho3D
Public Member Functions | Private Attributes
Urho3D::ShaderVariation Class Reference

Vertex or pixel shader on the GPU. More...

#include <D3D9ShaderVariation.h>

Inheritance diagram for Urho3D::ShaderVariation:
Urho3D::RefCounted Urho3D::GPUObject

List of all members.

Public Member Functions

 ShaderVariation (Shader *owner, ShaderType type)
 Construct.
virtual ~ShaderVariation ()
 Destruct.
bool Create ()
 Create the shader program. Return true if successful.
virtual void Release ()
 Release shader.
void SetName (const String &name)
 Set name.
void SetByteCode (const SharedArrayPtr< unsigned char > &byteCode)
 Set bytecode.
void AddParameter (StringHash param, const ShaderParameter &definition)
 Add a parameter.
void AddTextureUnit (TextureUnit unit)
 Add a texture unit.
void ClearParameters ()
 Clear parameters and texture unit use flags.
void OptimizeParameters ()
 Optimize the parameter map for optimal query speed.
ShaderType GetShaderType () const
 Return shader type.
const StringGetName () const
 Return full shader name.
ShaderGetOwner () const
 Return parent shader resource.
bool IsCreated () const
 Return whether created successfully.
bool IsFailed () const
 Return whether compile failed.
bool HasParameter (StringHash param) const
 Return whether uses a parameter.
bool HasTextureUnit (TextureUnit unit) const
 Return whether uses a texture unit (only for pixel shaders.)
const HashMap< StringHash,
ShaderParameter > & 
GetParameters () const
 Return all parameter definitions.
- Public Member Functions inherited from Urho3D::RefCounted
 RefCounted ()
 Construct. Allocate the reference count structure and set an initial self weak reference.
virtual ~RefCounted ()
 Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
void AddRef ()
 Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting.
void ReleaseRef ()
 Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting.
int Refs () const
 Return reference count.
int WeakRefs () const
 Return weak reference count.
RefCountRefCountPtr ()
 Return pointer to the reference count structure.
- Public Member Functions inherited from Urho3D::GPUObject
 GPUObject (Graphics *graphics)
 Construct with graphics subsystem pointer.
virtual ~GPUObject ()
 Destruct. Remove from the graphics subsystem.
virtual void OnDeviceLost ()
 Release default pool resources.
virtual void OnDeviceReset ()
 Recreate default pool resources.
void ClearDataLost ()
 Clear the data lost flag.
GraphicsGetGraphics () const
 Return the graphics subsystem.
void * GetGPUObject () const
 Return Direct3D object.
bool IsDataLost () const
 Return whether data is lost due to device loss.
bool HasPendingData () const
 Return whether has pending data assigned while device was lost.

Private Attributes

WeakPtr< Shaderowner_
 Parent shader resource.
ShaderType shaderType_
 Shader type.
String name_
 Full shader name.
SharedArrayPtr< unsigned char > byteCode_
 Shader bytecode.
bool failed_
 Compile failed flag.
HashMap< StringHash,
ShaderParameter
parameters_
 Shader parameters.
bool useTextureUnit_ [MAX_TEXTURE_UNITS]
 Texture unit use flags.

Additional Inherited Members

- Protected Attributes inherited from Urho3D::GPUObject
WeakPtr< Graphicsgraphics_
 Graphics subsystem.
void * object_
 Direct3D object.
bool dataLost_
 Data lost flag.
bool dataPending_
 Data pending flag.

Detailed Description

Vertex or pixel shader on the GPU.


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