include: Add PaletteFlags enumeration.
[wine/multimedia.git] / include / d3dx9shader.h
bloba15cab600d6a2a04713026331c7959736fb83e83
1 /*
2 * Copyright 2008 Luis Busquets
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "d3dx9.h"
21 #ifndef __D3DX9SHADER_H__
22 #define __D3DX9SHADER_H__
24 #define D3DXSHADER_DEBUG 0x1
25 #define D3DXSHADER_SKIPVALIDATION 0x2
26 #define D3DXSHADER_SKIPOPTIMIZATION 0x4
27 #define D3DXSHADER_PACKMATRIX_ROWMAJOR 0x8
28 #define D3DXSHADER_PACKMATRIX_COLUMNMAJOR 0x10
29 #define D3DXSHADER_PARTIALPRECISION 0x20
30 #define D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT 0x40
31 #define D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT 0x80
32 #define D3DXSHADER_NO_PRESHADER 0x100
33 #define D3DXSHADER_AVOID_FLOW_CONTROL 0x200
34 #define D3DXSHADER_PREFER_FLOW_CONTROL 0x400
35 #define D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
36 #define D3DXSHADER_IEEE_STRICTNESS 0x2000
38 #define D3DXSHADER_OPTIMIZATION_LEVEL0 0x4000
39 #define D3DXSHADER_OPTIMIZATION_LEVEL1 0x0
40 #define D3DXSHADER_OPTIMIZATION_LEVEL2 0xC000
41 #define D3DXSHADER_OPTIMIZATION_LEVEL3 0x8000
43 #define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
45 typedef LPCSTR D3DXHANDLE;
47 typedef enum D3DXPARAMETER_CLASS
49 D3DXPC_SCALAR,
50 D3DXPC_VECTOR,
51 D3DXPC_MATRIX_ROWS,
52 D3DXPC_MATRIX_COLUMNS,
53 D3DXPC_OBJECT,
54 D3DXPC_STRUCT,
55 D3DXPC_FORCE_DWORD = 0x7fffffff,
56 } D3DXPARAMETER_CLASS, *LPD3DXPARAMETER_CLASS;
58 typedef enum D3DXPARAMETER_TYPE
60 D3DXPT_VOID,
61 D3DXPT_BOOL,
62 D3DXPT_INT,
63 D3DXPT_FLOAT,
64 D3DXPT_STRING,
65 D3DXPT_TEXTURE,
66 D3DXPT_TEXTURE1D,
67 D3DXPT_TEXTURE2D,
68 D3DXPT_TEXTURE3D,
69 D3DXPT_TEXTURECUBE,
70 D3DXPT_SAMPLER,
71 D3DXPT_SAMPLER1D,
72 D3DXPT_SAMPLER2D,
73 D3DXPT_SAMPLER3D,
74 D3DXPT_SAMPLERCUBE,
75 D3DXPT_PIXELSHADER,
76 D3DXPT_VERTEXSHADER,
77 D3DXPT_PIXELFRAGMENT,
78 D3DXPT_VERTEXFRAGMENT,
79 D3DXPT_UNSUPPORTED,
80 D3DXPT_FORCE_DWORD = 0x7fffffff,
81 } D3DXPARAMETER_TYPE, *LPD3DXPARAMETER_TYPE;
83 typedef struct _D3DXMACRO {
84 LPCSTR Name;
85 LPCSTR Definition;
86 } D3DXMACRO, *LPD3DXMACRO;
88 typedef enum _D3DXINCLUDE_TYPE
90 D3DXINC_LOCAL,
91 D3DXINC_SYSTEM,
92 D3DXINC_FORCE_DWORD = 0x7fffffff,
93 } D3DXINCLUDE_TYPE, *LPD3DXINCLUDE_TYPE;
95 #undef INTERFACE
96 #define INTERFACE ID3DXInclude
98 DECLARE_INTERFACE(ID3DXInclude)
100 STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, LPCSTR filename, LPCVOID parent_data, LPCVOID *data, UINT *bytes) PURE;
101 STDMETHOD(Close)(THIS_ LPCVOID data) PURE;
104 #define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
105 #define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
107 typedef struct ID3DXInclude *LPD3DXINCLUDE;
109 #ifdef __cplusplus
110 extern "C" {
111 #endif
113 LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device);
114 UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
115 DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
116 LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device);
118 HRESULT WINAPI D3DXAssembleShaderFromFileA(LPCSTR filename,
119 CONST D3DXMACRO* defines,
120 LPD3DXINCLUDE include,
121 DWORD flags,
122 LPD3DXBUFFER* shader,
123 LPD3DXBUFFER* error_messages);
125 HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename,
126 CONST D3DXMACRO* defines,
127 LPD3DXINCLUDE include,
128 DWORD flags,
129 LPD3DXBUFFER* shader,
130 LPD3DXBUFFER* error_messages);
132 HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module,
133 LPCSTR resource,
134 CONST D3DXMACRO* defines,
135 LPD3DXINCLUDE include,
136 DWORD flags,
137 LPD3DXBUFFER* shader,
138 LPD3DXBUFFER* error_messages);
140 HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
141 LPCWSTR resource,
142 CONST D3DXMACRO* defines,
143 LPD3DXINCLUDE include,
144 DWORD flags,
145 LPD3DXBUFFER* shader,
146 LPD3DXBUFFER* error_messages);
148 HRESULT WINAPI D3DXAssembleShader(LPCSTR data,
149 UINT data_len,
150 CONST D3DXMACRO* defines,
151 LPD3DXINCLUDE include,
152 DWORD flags,
153 LPD3DXBUFFER* shader,
154 LPD3DXBUFFER* error_messages);
156 #ifdef __cplusplus
158 #endif
160 #endif /* __D3DX9SHADER_H__ */