forward reference More...
#include <W3DShaderManager.h>
Public Member Functions | |
| W3DShaderManager (void) | |
| constructor | |
Static Public Member Functions | |
| static void | init (void) |
| determine optimal shaders for current device. | |
| static void | shutdown (void) |
| release resources used by shaders | |
| static ChipsetType | getChipset (void) |
| return current device chipset. | |
| static GraphicsVenderID | getCurrentVendor (void) |
| return current card vendor. | |
| static | getCurrentDriverVersion (void) |
| return current driver version. | |
| static Int | getShaderPasses (ShaderTypes shader) |
| rendering passes required for shader | |
| static Int | setShader (ShaderTypes shader, Int pass) |
| enable specific shader pass. | |
| static Int | setShroudTex (Int stage) |
| Set shroud in a texture stage. | |
| static void | resetShader (ShaderTypes shader) |
| static void | setTexture (Int stage, TextureClass *texture) |
| Specify all textures (up to 8) which can be accessed by the shaders. | |
| static TextureClass * | getShaderTexture (Int stage) |
| Return current texture available to shaders. | |
| static ShaderTypes | getCurrentShader (void) |
| Return last activated shader. | |
| static HRESULT | LoadAndCreateD3DShader (char *strFilePath, const DWORD *pDeclaration, DWORD Usage, Bool ShaderType, DWORD *pHandle) |
| Loads a .vso file and creates a vertex shader for it. | |
| static Bool | testMinimumRequirements (ChipsetType *videoChipType, CpuType *cpuType, Int *cpuFreq, Int *numRAM, Real *intBenchIndex, Real *floatBenchIndex, Real *memBenchIndex) |
| static StaticGameLODLevel | getGPUPerformanceIndex (void) |
| static Real | GetCPUBenchTime (void) |
| static Bool | filterPreRender (FilterTypes filter, Bool &skipRender, CustomScenePassModes &scenePassMode) |
| Set up at start of render. Only applies to screen filter shaders. | |
| static Bool | filterPostRender (FilterTypes filter, enum FilterModes mode, Coord2D &scrollDelta, Bool &doExtraRender) |
| Called after render. Only applies to screen filter shaders. | |
| static Bool | filterSetup (FilterTypes filter, enum FilterModes mode) |
| static Bool | canRenderToTexture (void) |
| static void | startRenderToTexture (void) |
| Sets render target to texture. | |
| static IDirect3DTexture8 * | endRenderToTexture (void) |
| Ends render to texture, & returns texture. | |
| static IDirect3DTexture8 * | getRenderTexture (void) |
| returns last used render target texture | |
| static Bool | isRenderingToTexture (void) |
| static void | drawViewport (Int color) |
| draws 2 triangles covering the current tactical viewport | |
Static Protected Attributes | |
| static TextureClass * | m_Textures [8] |
| static ChipsetType | m_currentChipset |
| textures assigned to each of the possible stages | |
| static GraphicsVenderID | m_currentVendor |
| last video card vendor | |
| static __int64 | m_driverVersion |
| driver version of last chipset. | |
| static ShaderTypes | m_currentShader |
| last shader that was set. | |
| static Int | m_currentShaderPass |
| pass of last shader that was set. | |
| static FilterTypes | m_currentFilter =FT_NULL_FILTER |
| Last filter that was set. | |
| static Bool | m_renderingToTexture = false |
| static IDirect3DSurface8 * | m_oldRenderSurface =NULL |
| previous render target | |
| static IDirect3DTexture8 * | m_renderTexture =NULL |
| texture into which rendering will be redirected. | |
| static IDirect3DSurface8 * | m_newRenderSurface =NULL |
| new render target inside m_renderTexture | |
| static IDirect3DSurface8 * | m_oldDepthSurface =NULL |
| previous depth buffer surface | |
forward reference
System for managing complex rendering settings which are either not handled by WW3D2 or need custom paths depending on the video card. This system will determine the proper shader given video card limitations and also allow the app to query the hardware for specific features.
Definition at line 53 of file W3DShaderManager.h.
Definition at line 58 of file W3DShaderManager.h.
| W3DShaderManager::W3DShaderManager | ( | void | ) |
constructor
Constructor - just clears some variables
Definition at line 2582 of file W3DShaderManager.cpp.
|
inlinestatic |
Definition at line 109 of file W3DShaderManager.h.
|
static |
draws 2 triangles covering the current tactical viewport
Definition at line 2794 of file W3DShaderManager.cpp.
|
static |
Ends render to texture, & returns texture.
Ends rendering to a texture.
Definition at line 2876 of file W3DShaderManager.cpp.
|
static |
Called after render. Only applies to screen filter shaders.
Call to view filter shaders after rendering is complete.
Definition at line 2772 of file W3DShaderManager.cpp.
|
static |
Set up at start of render. Only applies to screen filter shaders.
Call to view filter shaders before rendering starts.
Definition at line 2757 of file W3DShaderManager.cpp.
|
static |
Definition at line 2786 of file W3DShaderManager.cpp.
|
static |
return current device chipset.
Returns the chipset used by the currently active rendering device. Can be useful for coding around specific driver bugs.
Definition at line 2918 of file W3DShaderManager.cpp.
|
static |
Returns seconds needed to run the test
Definition at line 3152 of file W3DShaderManager.cpp.
|
inlinestatic |
return current driver version.
Definition at line 85 of file W3DShaderManager.h.
|
inlinestatic |
Return last activated shader.
Definition at line 95 of file W3DShaderManager.h.
|
inlinestatic |
return current card vendor.
Definition at line 84 of file W3DShaderManager.h.
|
static |
Try to guess how well the video card will handle the game assuming very fast CPU
Definition at line 3126 of file W3DShaderManager.cpp.
|
static |
returns last used render target texture
Returns texture containing the image that was last rendered using any of the effects requiring render target textures. Used mostly for cross-fading effects that need an unmodified version of the view before the effect was applied. NOTE: This texture does not survive device reset.. so quit effect on reset!
Definition at line 2901 of file W3DShaderManager.cpp.
|
static |
rendering passes required for shader
Return number of renderig passes required in perform the desired shader on current hardware. App will need to re-render the polygons this many times to complete the effect.
Definition at line 2718 of file W3DShaderManager.cpp.
|
inlinestatic |
Return current texture available to shaders.
returns currently selected texture for given stage
Definition at line 93 of file W3DShaderManager.h.
|
static |
determine optimal shaders for current device.
Walk through all shaders and find versions suitable for current hardware
Definition at line 2609 of file W3DShaderManager.cpp.
|
inlinestatic |
Definition at line 113 of file W3DShaderManager.h.
|
static |
Loads a .vso file and creates a vertex shader for it.
Loads and creates a D3D pixel or vertex shader.
Definition at line 3011 of file W3DShaderManager.cpp.
|
static |
make sure W3D2 gets restored to normal
Must call this method after all polygons and rendering passes have been submitted. This method allows D3D to reset itself to a default state that doesn't conflict with the WW3D2 Shader system.
Definition at line 2745 of file W3DShaderManager.cpp.
|
static |
enable specific shader pass.
Must call this method before each rendering pass in order to perform proper D3D setup for each shader.
Definition at line 2728 of file W3DShaderManager.cpp.
Set shroud in a texture stage.
Puts the shroud texture into a texture stage.
Definition at line 3195 of file W3DShaderManager.cpp.
|
inlinestatic |
Specify all textures (up to 8) which can be accessed by the shaders.
Definition at line 91 of file W3DShaderManager.h.
|
static |
release resources used by shaders
Any shaders which allocate resources will be allowed to free them
Definition at line 2683 of file W3DShaderManager.cpp.
|
static |
Sets render target to texture.
Starts rendering to a texture.
Definition at line 2839 of file W3DShaderManager.cpp.
|
static |
Definition at line 3083 of file W3DShaderManager.cpp.
|
staticprotected |
textures assigned to each of the possible stages
last video card chipset that was detected.
Definition at line 119 of file W3DShaderManager.h.
|
staticprotected |
Last filter that was set.
Definition at line 125 of file W3DShaderManager.h.
|
staticprotected |
last shader that was set.
Definition at line 122 of file W3DShaderManager.h.
|
staticprotected |
pass of last shader that was set.
Definition at line 123 of file W3DShaderManager.h.
|
staticprotected |
last video card vendor
Definition at line 120 of file W3DShaderManager.h.
|
staticprotected |
driver version of last chipset.
Definition at line 121 of file W3DShaderManager.h.
|
staticprotected |
new render target inside m_renderTexture
Definition at line 130 of file W3DShaderManager.h.
|
staticprotected |
previous depth buffer surface
Definition at line 131 of file W3DShaderManager.h.
|
staticprotected |
previous render target
Definition at line 128 of file W3DShaderManager.h.
Definition at line 127 of file W3DShaderManager.h.
|
staticprotected |
texture into which rendering will be redirected.
Definition at line 129 of file W3DShaderManager.h.
|
staticprotected |
Definition at line 118 of file W3DShaderManager.h.