source: trunk/ab5.0/ablib/src/directx9/d3dx9shader.sbp@ 560

Last change on this file since 560 was 497, checked in by イグトランス (egtra), 16 years ago

インクルードガードとその他不要な前処理定義などの削除

File size: 10.6 KB
Line 
1' d3dx9shader.sbp
2
3TypeDef D3DXHANDLE = BytePtr
4
5
6Type D3DXMACRO
7 Name As BytePtr
8 Definition As BytePtr
9End Type
10
11Type D3DXSEMANTIC
12 Usage As DWord
13 UsageIndex As DWord
14End Type
15
16Type D3DXFRAGMENT_DESC
17 Name As BytePtr
18 Target As DWord
19End Type
20
21Const Enum D3DXREGISTER_SET
22 D3DXRS_BOOL = 0
23 D3DXRS_INT4 = 1
24 D3DXRS_FLOAT4 = 2
25 D3DXRS_SAMPLER = 3
26 D3DXRS_FORCE_DWORD = &H7FFFFFFF
27End Enum
28
29Const Enum D3DXPARAMETER_CLASS
30 D3DXPC_SCALAR = 0
31 D3DXPC_VECTOR = 1
32 D3DXPC_MATRIX_ROWS = 2
33 D3DXPC_MATRIX_COLUMNS = 3
34 D3DXPC_OBJECT = 4
35 D3DXPC_STRUCT = 5
36 D3DXPC_FORCE_DWORD = &H7FFFFFFF
37End Enum
38
39Const Enum D3DXPARAMETER_TYPE
40 D3DXPT_VOID = 0
41 D3DXPT_BOOL = 1
42 D3DXPT_INT = 2
43 D3DXPT_FLOAT = 3
44 D3DXPT_STRING = 4
45 D3DXPT_TEXTURE = 5
46 D3DXPT_TEXTURE1D = 6
47 D3DXPT_TEXTURE2D = 7
48 D3DXPT_TEXTURE3D = 8
49 D3DXPT_TEXTURECUBE = 9
50 D3DXPT_SAMPLER = 10
51 D3DXPT_SAMPLER1D = 11
52 D3DXPT_SAMPLER2D = 12
53 D3DXPT_SAMPLER3D = 13
54 D3DXPT_SAMPLERCUBE = 14
55 D3DXPT_PIXELSHADER = 15
56 D3DXPT_VERTEXSHADER = 16
57 D3DXPT_PIXELFRAGMENT = 17
58 D3DXPT_VERTEXFRAGMENT = 18
59 D3DXPT_FORCE_DWORD = &H7FFFFFFF
60End Enum
61
62Type D3DXCONSTANTTABLE_DESC
63 Creator As BytePtr
64 Version As DWord
65 Constants As DWord
66End Type
67
68Type D3DXCONSTANT_DESC
69 Name As BytePtr
70 RegisterSet As D3DXREGISTER_SET
71 RegisterIndex As DWord
72 RegisterCount As DWord
73 Class_ As D3DXPARAMETER_CLASS
74 Type_ As D3DXPARAMETER_TYPE
75 Rows As DWord
76 Columns As DWord
77 Elements As DWord
78 StructMembers As DWord
79 Bytes As DWord
80 DefaultValue As VoidPtr
81End Type
82
83
84Class ID3DXConstantTable
85 Inherits IUnknown
86Public
87 'Buffer
88 Abstract Function GetBufferPointer() As VoidPtr
89 Abstract Function GetBufferSize() As DWord
90
91 'Descs
92 Abstract Function GetDesc(pDesc As *D3DXCONSTANTTABLE_DESC) As DWord
93 Abstract Function GetConstantDesc(hConstant As D3DXHANDLE, pConstantDesc As *D3DXCONSTANT_DESC, pCount As DWordPtr) As DWord
94 Abstract Function GetSamplerIndex(hConstant As D3DXHANDLE) As DWord
95
96 'Handle operations
97 Abstract Function GetConstant(hConstant As D3DXHANDLE, Index As DWord) As D3DXHANDLE
98 Abstract Function GetConstantByName(hConstant As D3DXHANDLE, pName As BytePtr) As D3DXHANDLE
99 Abstract Function GetConstantElement(hConstant As D3DXHANDLE, Index As DWord) As D3DXHANDLE
100
101 'Set Constants
102 Abstract Function SetDefaults(pDevice As LPDIRECT3DDEVICE9) As DWord
103 Abstract Function SetValue(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pData As VoidPtr, Bytes As DWord) As DWord
104 Abstract Function SetBool(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, b As Long) As DWord
105 Abstract Function SetBoolArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pb As *Long, Count As DWord) As DWord
106 Abstract Function SetInt(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, n As Long) As DWord
107 Abstract Function SetIntArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pn As *Long, Count As DWord) As DWord
108 Abstract Function SetFloat(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, f As Single) As DWord
109 Abstract Function SetFloatArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pf As SinglePtr, Count As DWord) As DWord
110 Abstract Function SetVector(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pVector As *D3DXVECTOR4) As DWord
111 Abstract Function SetVectorArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pVector As *D3DXVECTOR4, Count As DWord) As DWord
112 Abstract Function SetMatrix(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX) As DWord
113 Abstract Function SetMatrixArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX, Count As DWord) As DWord
114 Abstract Function SetMatrixPointerArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, ppMatrix As **D3DXMATRIX, Count As DWord) As DWord
115 Abstract Function SetMatrixTranspose(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX) As DWord
116 Abstract Function SetMatrixTransposeArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX, Count As DWord) As DWord
117 Abstract Function SetMatrixTransposePointerArray(pDevice As LPDIRECT3DDEVICE9, hConstant As D3DXHANDLE, ppMatrix As **D3DXMATRIX, Count As DWord) As DWord
118End Class
119TypeDef LPD3DXCONSTANTTABLE = *ID3DXConstantTable
120
121
122Class ID3DXTextureShader
123 Inherits IUnknown
124Public
125 'Gets
126 Abstract Function GetFunction(ppFunction As *LPD3DXBUFFER) As DWord
127 Abstract Function GetConstantBuffer(ppConstantBuffer As *LPD3DXBUFFER) As DWord
128
129 'Descs
130 Abstract Function GetDesc(pDesc As *D3DXCONSTANTTABLE_DESC) As DWord
131 Abstract Function GetConstantDesc(hConstant As D3DXHANDLE, pConstantDesc As *D3DXCONSTANT_DESC, pCount As DWordPtr) As DWord
132
133 'Handle operations
134 Abstract Function GetConstant(hConstant As D3DXHANDLE, Index As DWord) As D3DXHANDLE
135 Abstract Function GetConstantByName(hConstant As D3DXHANDLE, pName As BytePtr) As D3DXHANDLE
136 Abstract Function GetConstantElement(hConstant As D3DXHANDLE, Index As DWord) As D3DXHANDLE
137
138 'Set Constants
139 Abstract Function SetDefaults() As DWord
140 Abstract Function SetValue(hConstant As D3DXHANDLE, pData As VoidPtr, Bytes As DWord) As DWord
141 Abstract Function SetBool(hConstant As D3DXHANDLE, b As Long) As DWord
142 Abstract Function SetBoolArray(hConstant As D3DXHANDLE, pb As *Long, Count As DWord) As DWord
143 Abstract Function SetInt(hConstant As D3DXHANDLE, n As Long) As DWord
144 Abstract Function SetIntArray(hConstant As D3DXHANDLE, pn As *Long, Count As DWord) As DWord
145 Abstract Function SetFloat(hConstant As D3DXHANDLE, f As Single) As DWord
146 Abstract Function SetFloatArray(hConstant As D3DXHANDLE, pf As SinglePtr, Count As DWord) As DWord
147 Abstract Function SetVector(hConstant As D3DXHANDLE, pVector As *D3DXVECTOR4) As DWord
148 Abstract Function SetVectorArray(hConstant As D3DXHANDLE, pVector As *D3DXVECTOR4, Count As DWord) As DWord
149 Abstract Function SetMatrix(hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX) As DWord
150 Abstract Function SetMatrixArray(hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX, Count As DWord) As DWord
151 Abstract Function SetMatrixPointerArray(hConstant As D3DXHANDLE, ppMatrix As **D3DXMATRIX, Count As DWord) As DWord
152 Abstract Function SetMatrixTranspose(hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX) As DWord
153 Abstract Function SetMatrixTransposeArray(hConstant As D3DXHANDLE, pMatrix As *D3DXMATRIX, Count As DWord) As DWord
154 Abstract Function SetMatrixTransposePointerArray(hConstant As D3DXHANDLE, ppMatrix As **D3DXMATRIX, Count As DWord) As DWord
155End Class
156TypeDef LPD3DXTEXTURESHADER = *ID3DXTextureShader
157
158
159Class ID3DXFragmentLinker
160 Inherits IUnknown
161Public
162 'fragment access and information retrieval functions
163 Abstract Function GetDevice(ppDevice As *LPDIRECT3DDEVICE9) As DWord
164 Abstract Function GetNumberOfFragments() As DWord
165
166 Abstract Function GetFragmentHandleByIndex(Index As DWord) As D3DXHANDLE
167 Abstract Function GetFragmentHandleByName(Name As BytePtr) As D3DXHANDLE
168 Abstract Function GetFragmentDesc(Name As D3DXHANDLE, FragDesc As *D3DXFRAGMENT_DESC) As DWord
169
170 'add the fragments in the buffer to the linker
171 Abstract Function AddFragments(Fragments As DWordPtr) As DWord
172
173 'Create a buffer containing the fragments. Suitable for saving to disk
174 Abstract Function GetAllFragments(ppBuffer As *LPD3DXBUFFER) As DWord
175 Abstract Function GetFragment(Name As D3DXHANDLE, ppBuffer As *LPD3DXBUFFER) As DWord
176
177 Abstract Function LinkShader(pProfile As BytePtr, Flags As DWord, rgFragmentHandles As *D3DXHANDLE, cFragments As DWord, ppBuffer As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER) As DWord
178 Abstract Function LinkVertexShader(pProfile As BytePtr, Flags As DWord, rgFragmentHandles As *D3DXHANDLE, cFragments As DWord, pVShader As *LPDIRECT3DVERTEXSHADER9, ppErrorMsgs As *LPD3DXBUFFER) As DWord
179 Abstract Function LinkPixelShader(pProfile As BytePtr, Flags As DWord, rgFragmentHandles As *D3DXHANDLE, cFragments As DWord, pPShader As *LPDIRECT3DPIXELSHADER9, ppErrorMsgs As *LPD3DXBUFFER) As DWord
180
181 Abstract Function ClearCache() As DWord
182End Class
183TypeDef LPD3DXFRAGMENTLINKER = *ID3DXFragmentLinker
184
185
186Const Enum D3DXINCLUDE_TYPE
187 D3DXINC_LOCAL = 0
188 D3DXINC_SYSTEM = 1
189
190 D3DXINC_FORCE_DWORD = &H7FFFFFFF
191End Enum
192
193Class ID3DXInclude
194 Abstract Function Open(IncludeType As D3DXINCLUDE_TYPE, pFileName As BytePtr, pParentData As VoidPtr, ppData As DWordPtr, pBytes As DWordPtr) As DWord
195 Abstract Function Close(pData As VoidPtr) As DWord
196End Class
197TypeDef LPD3DXINCLUDE = *ID3DXInclude
198
199
200'--------------------
201' D3DXAssembleShader
202'--------------------
203Declare Function D3DXAssembleShaderFromFile Lib "dx9abm" Alias "D3DXAssembleShaderFromFile_abm" (pSrcFile As BytePtr, pDefines As *D3DXMACRO, pInclude As LPD3DXINCLUDE, Flags As DWord, ppShader As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER) As DWord
204Declare Function D3DXAssembleShaderFromResource Lib "dx9abm" Alias "D3DXAssembleShaderFromResource_abm" (hSrcModule As HINSTANCE, pSrcResource As BytePtr, pDefines As *D3DXMACRO, pInclude As LPD3DXINCLUDE, Flags As DWord, ppShader As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER) As DWord
205Declare Function D3DXAssembleShader Lib "dx9abm" Alias "D3DXAssembleShader_abm" (pSrcData As BytePtr, SrcDataLen As DWord, pDefines As *D3DXMACRO, pInclude As LPD3DXINCLUDE, Flags As DWord, ppShader As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER) As DWord
206
207
208'-------------------
209' D3DXCompileShader
210'-------------------
211Declare Function D3DXCompileShaderFromFile Lib "dx9abm" Alias "D3DXCompileShaderFromFile_abm" (pSrcFile As BytePtr, pDefines As *D3DXMACRO, pInclude As LPD3DXINCLUDE, pFunctionName As BytePtr, pProfile As BytePtr, Flags As DWord, ppShader As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER, ppConstantTable As *LPD3DXCONSTANTTABLE) As DWord
212Declare Function D3DXCompileShaderFromResource Lib "dx9abm" Alias "D3DXCompileShaderFromResource_abm" (hSrcModule As HINSTANCE, pSrcResource As BytePtr, pDefines As *D3DXMACRO, pInclude As LPD3DXINCLUDE, pFunctionName As BytePtr, pProfile As BytePtr, Flags As DWord, ppShader As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER, ppConstantTable As *LPD3DXCONSTANTTABLE) As DWord
213Declare Function D3DXCompileShader Lib "dx9abm" Alias "D3DXCompileShader_abm" (pSrcData As BytePtr, SrcDataLen As DWord, pDefines As *D3DXMACRO, pInclude As LPD3DXINCLUDE, pFunctionName As BytePtr, pProfile As BytePtr, Flags As DWord, ppShader As *LPD3DXBUFFER, ppErrorMsgs As *LPD3DXBUFFER, ppConstantTable As *LPD3DXCONSTANTTABLE) As DWord
Note: See TracBrowser for help on using the repository browser.