#include <d3d10.h>#include <d3dx10.h>#include <hash_map>#include "d3d10drv.h"#include "polyflags.h"#include "d3d.h"Defines | |
| #define | PF_Transient PF_Highlighted |
Variables | |
| struct { | |
| IDXGIOutput * output | |
| ID3D10Device * device | |
| IDXGISwapChain * swapChain | |
| ID3D10RenderTargetView * renderTargetView | |
| ID3D10InputLayout * vertexLayout | |
| ID3D10Buffer * vertexBuffer | |
| ID3D10Buffer * indexBuffer | |
| ID3D10Effect * effect | |
| struct { | |
| ID3D10DepthStencilView * renderTargetView | |
| } depthStencil | |
| } | D3DObjects |
| struct { | |
| ID3D10EffectMatrixVariable * projection | |
| ID3D10EffectScalarVariable * useProjection | |
| ID3D10EffectScalarVariable * useTexturePass | |
| ID3D10EffectShaderResourceVariable * shaderTextures | |
| ID3D10EffectVectorVariable * flashColor | |
| ID3D10EffectScalarVariable * flashEnable | |
| ID3D10EffectScalarVariable * time | |
| } | shaderVars |
| struct { | |
| ID3D10EffectDepthStencilVariable * dstate_Enable | |
| ID3D10EffectDepthStencilVariable * dstate_Disable | |
| ID3D10EffectBlendVariable * bstate_Translucent | |
| ID3D10EffectBlendVariable * bstate_Modulate | |
| ID3D10EffectBlendVariable * bstate_NoBlend | |
| ID3D10EffectSamplerVariable * sam | |
| } | states |
| struct { | |
| DWORD64 boundTextureID [D3D::DUMMY_NUM_PASSES] | |
| BOOL enabled [D3D::DUMMY_NUM_PASSES] | |
| } | texturePasses |
| stdext::hash_map< unsigned __int64, D3D::CachedTexture > | textureCache |
| const unsigned int | I_BUFFER_SIZE = 20000 |
| const unsigned int | V_BUFFER_SIZE = I_BUFFER_SIZE |
| static unsigned int | numVerts |
| static unsigned int | numIndices |
| static unsigned int | numUndrawnIndices |
| static D3D::Vertex * | mappedVBuffer |
| static int * | mappedIBuffer |
| static const DXGI_FORMAT | BACKBUFFER_FORMAT = DXGI_FORMAT_R8G8B8A8_UNORM |
| static const float | TIME_STEP = (1/60.0f) |
| static D3D::Options | options |
| DWORD64 boundTextureID[D3D::DUMMY_NUM_PASSES] |
CPU side bound texture IDs for the various passes as defined in the shader
struct { ... } D3DObjects [static] |
D3D Objects
| BOOL enabled[D3D::DUMMY_NUM_PASSES] |
Bool whether to use each texture pass (CPU side, used to set shaderVars.useTexturePass)
| ID3D10EffectVectorVariable* flashColor |
Flash color
| ID3D10EffectScalarVariable* flashEnable |
Flash enabled?
| const unsigned int I_BUFFER_SIZE = 20000 |
Triangle fans are drawn indexed. Their vertices and draw indexes are stored in mapped buffers. At the start of a frame or when the buffer is full, it gets emptied. Otherwise, the buffer is reused over multiple draw() calls.
| ID3D10EffectMatrixVariable* projection |
projection matrix
| ID3D10EffectShaderResourceVariable* shaderTextures |
GPU side currently bound textures
struct { ... } shaderVars [static] |
Shader side variables
struct { ... } states [static] |
States (defined in fx file)
| stdext::hash_map<unsigned __int64,D3D::CachedTexture> textureCache |
The texture cache
struct { ... } texturePasses [static] |
Texture cache variables
| ID3D10EffectScalarVariable* time |
Time for sin() etc
| ID3D10EffectScalarVariable* useProjection |
Use projection transform
| ID3D10EffectScalarVariable* useTexturePass |
Bool whether to use each texture pass (shader side)
1.5.9