diff options
Diffstat (limited to 'libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h')
-rw-r--r-- | libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h new file mode 100644 index 0000000..b865f78 --- /dev/null +++ b/libraries/evas/src/modules/engines/direct3d/evas_direct3d_shader_pack.h | |||
@@ -0,0 +1,75 @@ | |||
1 | #ifndef __EVAS_DIRECT3D_SHADER_PACK_H__ | ||
2 | #define __EVAS_DIRECT3D_SHADER_PACK_H__ | ||
3 | |||
4 | #include "evas_engine.h" | ||
5 | |||
6 | #include "ref.h" | ||
7 | #include "array.h" | ||
8 | |||
9 | class D3DDevice; | ||
10 | |||
11 | class D3DShaderPack : virtual public Referenc | ||
12 | { | ||
13 | public: | ||
14 | ~D3DShaderPack(); | ||
15 | |||
16 | static D3DShaderPack *Current(); | ||
17 | static void SetCurrent(D3DShaderPack *obj); | ||
18 | |||
19 | bool Initialize(D3DDevice *d3d); | ||
20 | void Uninitialize(); | ||
21 | |||
22 | bool SetVDecl(D3DDevice *d3d, int id); | ||
23 | bool SetVS(D3DDevice *d3d, int id); | ||
24 | bool SetPS(D3DDevice *d3d, int id); | ||
25 | |||
26 | public: | ||
27 | enum VDECL | ||
28 | { | ||
29 | VDECL_XYC = 0, | ||
30 | VDECL_XYUV, | ||
31 | VDECL_XYUVC, | ||
32 | VDECL_XYZUVC, | ||
33 | |||
34 | VDECL_NUM | ||
35 | }; | ||
36 | |||
37 | enum VS | ||
38 | { | ||
39 | VS_COPY_COLOR = 0, | ||
40 | VS_COPY_UV, | ||
41 | VS_COPY_UV_COLOR, | ||
42 | VS_COPY_UV_COLOR_Z, | ||
43 | |||
44 | VS_NUM | ||
45 | }; | ||
46 | |||
47 | enum PS | ||
48 | { | ||
49 | PS_COLOR = 0, | ||
50 | PS_TEX, | ||
51 | PS_TEX_COLOR_FILTER, | ||
52 | PS_TEX_2, | ||
53 | |||
54 | PS_NUM | ||
55 | }; | ||
56 | |||
57 | private: | ||
58 | D3DShaderPack(); | ||
59 | |||
60 | bool InitVertexDeclarations(D3DDevice *d3d); | ||
61 | bool InitVertexShaders(D3DDevice *d3d); | ||
62 | bool InitPixelShaders(D3DDevice *d3d); | ||
63 | |||
64 | void *CompileShader(D3DDevice *d3d, bool make_vs, const char *name, | ||
65 | const char *buf, int size); | ||
66 | |||
67 | private: | ||
68 | TArray<LPDIRECT3DVERTEXDECLARATION9> _vdecl; | ||
69 | TArray<LPDIRECT3DVERTEXSHADER9> _vs; | ||
70 | TArray<LPDIRECT3DPIXELSHADER9> _ps; | ||
71 | |||
72 | static Ref<D3DShaderPack> _this; | ||
73 | }; | ||
74 | |||
75 | #endif // __EVAS_DIRECT3D_SHADER_PACK_H__ | ||