Shader Class Reference

Inheritance diagram for Shader:
Shader_Postprocess Shader_Unreal Shader_Dummy Shader_FinalPass Shader_FirstPass Shader_HDR Shader_ComplexSurface Shader_FogSurface Shader_GouraudPolygon Shader_Tile

List of all members.

Public Member Functions

 Shader (ID3D10Device *device)
virtual bool compile (const D3D10_SHADER_MACRO *macros, DWORD shaderFlags)=0
virtual bool createRenderTargetViews (ID3D10RenderTargetView *backbuffer, const DXGI_SWAP_CHAIN_DESC &swapChainDesc, int multiSampleCount)=0
virtual void releaseRenderTargetViews ()
virtual void bind ()
virtual void apply ()
GeometryBuffergetGeometryBuffer () const
ID3D10ShaderResourceView * getResourceView () const

Protected Member Functions

bool checkCompileResult (HRESULT hr) const
bool createRenderTargetViews (DXGI_FORMAT format, DXGI_FORMAT depthFormat, float scaleX, float scaleY, int samples, const DXGI_SWAP_CHAIN_DESC &swapChainDesc)

Protected Attributes

GeometryBuffergeometryBuffer
ID3D10RenderTargetView * renderTargetView
ID3D10DepthStencilView * depthStencilView
ID3D10InputLayout * vertexLayout
ID3D10ShaderResourceView * shaderResourceView
ID3D10Blob * blob
ID3D10Device * device
ID3D10Effect * effect
D3D10_PRIMITIVE_TOPOLOGY topology
HRESULT hr

Constructor & Destructor Documentation

Shader::Shader ( ID3D10Device *  device  ) 

Main shader class, offers housekeeping and helper functions.


Member Function Documentation

void Shader::apply (  )  [virtual]

Draw the shader's buffer contents.

Reimplemented in Shader_ComplexSurface, Shader_Dummy, and Shader_HDR.

bool Shader::checkCompileResult ( HRESULT  hr  )  const [protected]

Check shader compile result and show errors if applicable.

bool Shader::createRenderTargetViews ( DXGI_FORMAT  format,
DXGI_FORMAT  depthFormat,
float  scaleX,
float  scaleY,
int  samples,
const DXGI_SWAP_CHAIN_DESC &  swapChainDesc 
) [protected]

Create render target, depth and resource views.

Parameters:
samples Desired multisample amount for these buffers (can be different than what the game is using)
Note:
If a format is null the buffer/view will be skipped.

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

Generated by  doxygen 1.6.2