VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/d3dx9shader.h@ 27512

Last change on this file since 27512 was 25949, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.36 and disable unnecessary fbo state poll

  • Property svn:eol-style set to native
File size: 6.2 KB
Line 
1/*
2 * Copyright 2008 Luis Busquets
3 *
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.
8 *
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.
13 *
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
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#include "d3dx9.h"
29
30#ifndef __D3DX9SHADER_H__
31#define __D3DX9SHADER_H__
32
33#define D3DXSHADER_DEBUG 0x1
34#define D3DXSHADER_SKIPVALIDATION 0x2
35#define D3DXSHADER_SKIPOPTIMIZATION 0x4
36#define D3DXSHADER_PACKMATRIX_ROWMAJOR 0x8
37#define D3DXSHADER_PACKMATRIX_COLUMNMAJOR 0x10
38#define D3DXSHADER_PARTIALPRECISION 0x20
39#define D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT 0x40
40#define D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT 0x80
41#define D3DXSHADER_NO_PRESHADER 0x100
42#define D3DXSHADER_AVOID_FLOW_CONTROL 0x200
43#define D3DXSHADER_PREFER_FLOW_CONTROL 0x400
44#define D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY 0x1000
45#define D3DXSHADER_IEEE_STRICTNESS 0x2000
46
47#define D3DXSHADER_OPTIMIZATION_LEVEL0 0x4000
48#define D3DXSHADER_OPTIMIZATION_LEVEL1 0x0
49#define D3DXSHADER_OPTIMIZATION_LEVEL2 0xC000
50#define D3DXSHADER_OPTIMIZATION_LEVEL3 0x8000
51
52#define D3DXSHADER_USE_LEGACY_D3DX9_31_DLL 0x10000
53
54typedef LPCSTR D3DXHANDLE;
55
56typedef enum D3DXPARAMETER_CLASS
57{
58 D3DXPC_SCALAR,
59 D3DXPC_VECTOR,
60 D3DXPC_MATRIX_ROWS,
61 D3DXPC_MATRIX_COLUMNS,
62 D3DXPC_OBJECT,
63 D3DXPC_STRUCT,
64 D3DXPC_FORCE_DWORD = 0x7fffffff,
65} D3DXPARAMETER_CLASS, *LPD3DXPARAMETER_CLASS;
66
67typedef enum D3DXPARAMETER_TYPE
68{
69 D3DXPT_VOID,
70 D3DXPT_BOOL,
71 D3DXPT_INT,
72 D3DXPT_FLOAT,
73 D3DXPT_STRING,
74 D3DXPT_TEXTURE,
75 D3DXPT_TEXTURE1D,
76 D3DXPT_TEXTURE2D,
77 D3DXPT_TEXTURE3D,
78 D3DXPT_TEXTURECUBE,
79 D3DXPT_SAMPLER,
80 D3DXPT_SAMPLER1D,
81 D3DXPT_SAMPLER2D,
82 D3DXPT_SAMPLER3D,
83 D3DXPT_SAMPLERCUBE,
84 D3DXPT_PIXELSHADER,
85 D3DXPT_VERTEXSHADER,
86 D3DXPT_PIXELFRAGMENT,
87 D3DXPT_VERTEXFRAGMENT,
88 D3DXPT_UNSUPPORTED,
89 D3DXPT_FORCE_DWORD = 0x7fffffff,
90} D3DXPARAMETER_TYPE, *LPD3DXPARAMETER_TYPE;
91
92typedef struct _D3DXMACRO {
93 LPCSTR Name;
94 LPCSTR Definition;
95} D3DXMACRO, *LPD3DXMACRO;
96
97typedef enum _D3DXINCLUDE_TYPE
98{
99 D3DXINC_LOCAL,
100 D3DXINC_SYSTEM,
101 D3DXINC_FORCE_DWORD = 0x7fffffff,
102} D3DXINCLUDE_TYPE, *LPD3DXINCLUDE_TYPE;
103
104#undef INTERFACE
105#define INTERFACE ID3DXInclude
106
107DECLARE_INTERFACE(ID3DXInclude)
108{
109 STDMETHOD(Open)(THIS_ D3DXINCLUDE_TYPE include_type, LPCSTR filename, LPCVOID parent_data, LPCVOID *data, UINT *bytes) PURE;
110 STDMETHOD(Close)(THIS_ LPCVOID data) PURE;
111};
112
113#define ID3DXInclude_Open(p,a,b,c,d,e) (p)->lpVtbl->Open(p,a,b,c,d,e)
114#define ID3DXInclude_Close(p,a) (p)->lpVtbl->Close(p,a)
115
116typedef struct ID3DXInclude *LPD3DXINCLUDE;
117
118#ifdef __cplusplus
119extern "C" {
120#endif
121
122LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device);
123UINT WINAPI D3DXGetShaderSize(const DWORD *byte_code);
124DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code);
125LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device);
126
127HRESULT WINAPI D3DXAssembleShaderFromFileA(LPCSTR filename,
128 CONST D3DXMACRO* defines,
129 LPD3DXINCLUDE include,
130 DWORD flags,
131 LPD3DXBUFFER* shader,
132 LPD3DXBUFFER* error_messages);
133
134HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename,
135 CONST D3DXMACRO* defines,
136 LPD3DXINCLUDE include,
137 DWORD flags,
138 LPD3DXBUFFER* shader,
139 LPD3DXBUFFER* error_messages);
140
141HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module,
142 LPCSTR resource,
143 CONST D3DXMACRO* defines,
144 LPD3DXINCLUDE include,
145 DWORD flags,
146 LPD3DXBUFFER* shader,
147 LPD3DXBUFFER* error_messages);
148
149HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module,
150 LPCWSTR resource,
151 CONST D3DXMACRO* defines,
152 LPD3DXINCLUDE include,
153 DWORD flags,
154 LPD3DXBUFFER* shader,
155 LPD3DXBUFFER* error_messages);
156
157HRESULT WINAPI D3DXAssembleShader(LPCSTR data,
158 UINT data_len,
159 CONST D3DXMACRO* defines,
160 LPD3DXINCLUDE include,
161 DWORD flags,
162 LPD3DXBUFFER* shader,
163 LPD3DXBUFFER* error_messages);
164
165#ifdef __cplusplus
166}
167#endif
168
169#endif /* __D3DX9SHADER_H__ */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette