Base class for shader effects. More...
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
Effect () | |
Standard constructor. | |
virtual | ~Effect () |
Standard destructor. | |
virtual void | Release (Display *pDisplay) override |
Release the shaders. | |
D3DPixelShader * | GetPixelShader360 (void) const |
Get the pointer to the Xbox 360 Pixel shader instance. | |
D3DVertexShader * | GetVertexShader360 (void) const |
Get the pointer to the Xbox 360 Vertex shader instance. | |
D3DDevice * | GetDevice360 (void) const |
Get the pointer to the Xbox 360 device instance. | |
uint_t | GetProgramID (void) const |
Get the OpenGL program ID for the compiled effect. | |
IDirect3DPixelShader9 * | GetPixelShaderDX9 (void) const |
Get the pointer to the DirectX 9 Pixel shader instance. | |
IDirect3DVertexShader9 * | GetVertexShaderDX9 (void) const |
Get the pointer to the DirectX 9 Vertex shader instance. | |
IDirect3DDevice9 * | GetDeviceDX9 (void) const |
Get the pointer to the DirectX 9 device instance. | |
Public Member Functions inherited from Burger::DisplayObject | |
DisplayObject * | GetNext (void) const |
Get the next display object in the global linked list. | |
DisplayObject * | GetPrevious (void) const |
Get the previous display object in the global linked list. | |
virtual uint_t | CheckLoad (Display *pDisplay)=0 |
Load data onto the video display card. | |
Public Member Functions inherited from Burger::ReferenceCounter | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
ReferenceCounter () noexcept | |
Sets the reference count to zero. | |
virtual | ~ReferenceCounter () |
Destructor. | |
void | AddRef (void) noexcept |
Increase the reference count by 1. | |
void | Release (void) noexcept |
Decrease the reference count by 1. | |
Public Member Functions inherited from Burger::Base | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Static Public Attributes | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::DisplayObject | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::ReferenceCounter | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::Base | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Protected Member Functions | |
void | ReleaseGL (void) |
Release the OpenGL data. | |
void | ReleaseDX9 (void) |
Release the DirectX 9 data. | |
Protected Member Functions inherited from Burger::DisplayObject | |
DisplayObject (void) | |
Add this display object to the global linked list. | |
virtual | ~DisplayObject () |
Remove this display object from the global linked list. | |
Protected Attributes | ||
D3DPixelShader * | m_pPixelShader | |
(Xbox360 only) Pixel shader | ||
D3DVertexShader * | m_pVertexShader | |
(Xbox360 only) Vertex shader | ||
D3DDevice * | m_pDevice | |
(Xbox360 only) parent device | ||
union { | ||
struct { | ||
IDirect3DPixelShader9 * m_pPixelShader | ||
DirectX9 Pixel shader. More... | ||
IDirect3DVertexShader9 * m_pVertexShader | ||
DirectX9 Vertex shader. More... | ||
IDirect3DDevice9 * m_pDevice | ||
DirectX9 parent device. More... | ||
} m_DX9 | ||
DirectX 9 specific data. More... | ||
struct { | ||
uint_t m_uProgramID | ||
OpenGL Program ID for the compiled shader. More... | ||
} m_GL | ||
OpenGL specific data. More... | ||
} | m_ShaderData | |
Union of vertex/pixel shader data. | ||
Protected Attributes inherited from Burger::DisplayObject | ||
DisplayObject * | m_pNextDisplayObject | |
Pointer to the next DisplayObject. | ||
DisplayObject * | m_pPrevDisplayObject | |
Pointer to the previous DisplayObject. | ||
Private Member Functions | |
Effect (const Effect &)=delete | |
Effect & | operator= (const Effect &)=delete |
Effect (Effect &&)=delete | |
Effect & | operator= (Effect &&)=delete |
Additional Inherited Members | |
Static Public Member Functions inherited from Burger::DisplayObject | |
static DisplayObject * | GetFirstObject (void) |
Get the first display object in the global linked list. | |
static void | ReleaseAll (Display *pDisplay) |
Release all display objects. | |
Static Protected Attributes inherited from Burger::DisplayObject | |
static DisplayObject * | g_pHead = NULL |
Global pointer to the linked list of display objects. | |
Base class for shader effects.
This base class has default members and functions to connect a vertex and pixel shader using a cross platform API with this class performing the functions to implement the class using whatever is the native API.
|
privatedelete |
|
privatedelete |
Burger::Effect::Effect | ( | ) |
|
virtual |
|
overridevirtualnoexcept |
Get the description to the class.
This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.
Reimplemented from Burger::DisplayObject.
Reimplemented in Burger::Effect2D, Burger::Effect2DDX9, Burger::Effect2DOpenGL, Burger::EffectPositionColorTexture, Burger::EffectPositionColorTextureDX9, Burger::EffectPositionColorTextureOpenGL, Burger::EffectPositionTexture, Burger::EffectPositionTextureDX9, Burger::EffectPositionTextureOpenGL, Burger::Shader2DCColor, Burger::Shader2DCColorDX9, Burger::Shader2DCColorOpenGL, Burger::Shader2DColorVertex, Burger::Shader2DColorVertexDX9, and Burger::Shader2DColorVertexOpenGL.
|
inline |
Get the pointer to the Xbox 360 device instance.
|
inline |
Get the pointer to the DirectX 9 device instance.
|
inline |
Get the pointer to the Xbox 360 Pixel shader instance.
|
inline |
Get the pointer to the DirectX 9 Pixel shader instance.
|
inline |
Get the OpenGL program ID for the compiled effect.
|
inline |
Get the pointer to the Xbox 360 Vertex shader instance.
|
inline |
Get the pointer to the DirectX 9 Vertex shader instance.
|
overridevirtual |
Release the shaders.
On shutdown and Direct X reset, this function is called to release the shader resources.
pDisplay | Pointer to the Display instance |
Implements Burger::DisplayObject.
Reimplemented in Burger::Effect2DDX9, Burger::Effect2DOpenGL, Burger::EffectPositionColorTextureDX9, Burger::EffectPositionColorTextureOpenGL, Burger::EffectPositionTextureDX9, Burger::EffectPositionTextureOpenGL, Burger::Shader2DCColorDX9, Burger::Shader2DCColorOpenGL, Burger::Shader2DColorVertexDX9, and Burger::Shader2DColorVertexOpenGL.
|
protected |
Release the DirectX 9 data.
For DirectX 9 shaders, Release(Display *) calls this function to perform the actual work
|
protected |
Release the OpenGL data.
For OpenGL shaders, Release(Display *) calls this function to perform the actual work
|
static |
The global description of the class.
This record contains the name of this class and a reference to the parent
struct { ... } Burger::Effect::m_DX9 |
DirectX 9 specific data.
struct { ... } Burger::Effect::m_GL |
OpenGL specific data.
|
protected |
(Xbox360 only) parent device
IDirect3DDevice9* Burger::Effect::m_pDevice |
DirectX9 parent device.
|
protected |
(Xbox360 only) Pixel shader
IDirect3DPixelShader9* Burger::Effect::m_pPixelShader |
DirectX9 Pixel shader.
|
protected |
(Xbox360 only) Vertex shader
IDirect3DVertexShader9* Burger::Effect::m_pVertexShader |
DirectX9 Vertex shader.
union { ... } Burger::Effect::m_ShaderData |
Union of vertex/pixel shader data.
uint_t Burger::Effect::m_uProgramID |
OpenGL Program ID for the compiled shader.