3
#include "Common/CommonWindows.h"
5
// Used on XBox to create a linear format
6
// TODO: Might actually want to use nonlinear on xbox?
7
#define D3DFMT(x) (D3DFORMAT)MAKELINFMT(x)
15
struct ID3DXConstantTable;
19
extern LPDIRECT3DDEVICE9 pD3Ddevice;
20
extern LPDIRECT3DDEVICE9EX pD3DdeviceEx;
21
extern LPDIRECT3D9 pD3D;
23
extern LPDIRECT3DVERTEXSHADER9 pFramebufferVertexShader; // Vertex Shader
24
extern LPDIRECT3DPIXELSHADER9 pFramebufferPixelShader; // Pixel Shader
26
extern IDirect3DVertexDeclaration9* pFramebufferVertexDecl;
27
extern IDirect3DVertexDeclaration9* pSoftVertexDecl;
29
bool CompileShaders(std::string &errorMessage);
30
bool CompilePixelShader(const char *code, LPDIRECT3DPIXELSHADER9 *pShader, ID3DXConstantTable **pShaderTable, std::string &errorMessage);
31
bool CompileVertexShader(const char *code, LPDIRECT3DVERTEXSHADER9 *pShader, ID3DXConstantTable **pShaderTable, std::string &errorMessage);
32
void DestroyShaders();
33
void DirectxInit(HWND window);
35
void DXSetViewport(float x, float y, float w, float h, float minZ = 0.0f, float maxZ = 1.0f);
37
#define D3DBLEND_UNK D3DBLEND_FORCE_DWORD