ReactOS 0.4.15-dev-5666-gc548b97
vertexdeclaration.c
Go to the documentation of this file.
1/*
2 * IDirect3DVertexDeclaration8 implementation
3 *
4 * Copyright 2007 Henri Verbeet
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21/* IDirect3DVertexDeclaration8 is internal to our implementation.
22 * It's not visible in the API. */
23
24#include "config.h"
25#include "d3d8_private.h"
26
28
29static const char *debug_d3dvsdt_type(D3DVSDT_TYPE d3dvsdt_type)
30{
31 switch (d3dvsdt_type)
32 {
33#define D3DVSDT_TYPE_TO_STR(u) case u: return #u
42#undef D3DVSDT_TYPE_TO_STR
43 default:
44 FIXME("Unrecognized D3DVSDT_TYPE %#x\n", d3dvsdt_type);
45 return "unrecognized";
46 }
47}
48
49static const char *debug_d3dvsde_register(D3DVSDE_REGISTER d3dvsde_register)
50{
51 switch (d3dvsde_register)
52 {
53#define D3DVSDE_REGISTER_TO_STR(u) case u: return #u
71#undef D3DVSDE_REGISTER_TO_STR
72 default:
73 FIXME("Unrecognized D3DVSDE_REGISTER %#x\n", d3dvsde_register);
74 return "unrecognized";
75 }
76}
77
78size_t parse_token(const DWORD* pToken)
79{
80 const DWORD token = *pToken;
81 size_t tokenlen = 1;
82
83 switch ((token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT) { /* maybe a macro to inverse ... */
85 TRACE(" 0x%08x NOP()\n", token);
86 break;
87
90 {
91 TRACE(" 0x%08x STREAM_TESS()\n", token);
92 } else {
93 TRACE(" 0x%08x STREAM(%u)\n", token, ((token & D3DVSD_STREAMNUMBERMASK) >> D3DVSD_STREAMNUMBERSHIFT));
94 }
95 break;
96
98 if (token & 0x10000000)
99 {
100 TRACE(" 0x%08x SKIP(%u)\n", token, ((token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
101 } else {
104 TRACE(" 0x%08x REG(%s, %s)\n", token, debug_d3dvsde_register(reg), debug_d3dvsdt_type(type));
105 }
106 break;
107
109 if (token & 0x10000000)
110 {
113 TRACE(" 0x%08x TESSUV(%s) as %s\n", token, debug_d3dvsde_register(reg), debug_d3dvsdt_type(type));
114 } else {
118 TRACE(" 0x%08x TESSNORMAL(%s, %s) as %s\n", token, debug_d3dvsde_register(regin),
120 }
121 break;
122
124 {
126 tokenlen = (4 * count) + 1;
127 }
128 break;
129
130 case D3DVSD_TOKEN_EXT:
131 {
134 TRACE(" 0x%08x EXT(%u, %u)\n", token, count, extinfo);
135 /* todo ... print extension */
136 tokenlen = count + 1;
137 }
138 break;
139
140 case D3DVSD_TOKEN_END:
141 TRACE(" 0x%08x END()\n", token);
142 break;
143
144 default:
145 TRACE(" 0x%08x UNKNOWN\n", token);
146 /* arg error */
147 }
148
149 return tokenlen;
150}
151
153{
154 const DWORD *token = d3d8_elements;
155
156 while (*token != D3DVSD_END())
157 {
159 {
162 HRESULT hr;
163
164 if (TRACE_ON(d3d8))
165 {
166 DWORD i;
167 for (i = 0; i < count; ++i)
168 {
169 TRACE("c[%u] = (%8f, %8f, %8f, %8f)\n",
170 constant_idx,
171 *(const float *)(token + i * 4 + 1),
172 *(const float *)(token + i * 4 + 2),
173 *(const float *)(token + i * 4 + 3),
174 *(const float *)(token + i * 4 + 4));
175 }
176 }
178 constant_idx, (const float *)token + 1, count);
179 if (FAILED(hr)) ERR("Failed setting shader constants\n");
180 }
181
183 }
184}
185
186/* NOTE: Make sure these are in the correct numerical order. (see /include/wined3d_types.h) */
187static const size_t wined3d_type_sizes[] =
188{
189 /*WINED3DDECLTYPE_FLOAT1*/ 1 * sizeof(float),
190 /*WINED3DDECLTYPE_FLOAT2*/ 2 * sizeof(float),
191 /*WINED3DDECLTYPE_FLOAT3*/ 3 * sizeof(float),
192 /*WINED3DDECLTYPE_FLOAT4*/ 4 * sizeof(float),
193 /*WINED3DDECLTYPE_D3DCOLOR*/ 4 * sizeof(BYTE),
194 /*WINED3DDECLTYPE_UBYTE4*/ 4 * sizeof(BYTE),
195 /*WINED3DDECLTYPE_SHORT2*/ 2 * sizeof(short int),
196 /*WINED3DDECLTYPE_SHORT4*/ 4 * sizeof(short int),
197 /*WINED3DDECLTYPE_UBYTE4N*/ 4 * sizeof(BYTE),
198 /*WINED3DDECLTYPE_SHORT2N*/ 2 * sizeof(short int),
199 /*WINED3DDECLTYPE_SHORT4N*/ 4 * sizeof(short int),
200 /*WINED3DDECLTYPE_USHORT2N*/ 2 * sizeof(short int),
201 /*WINED3DDECLTYPE_USHORT4N*/ 4 * sizeof(short int),
202 /*WINED3DDECLTYPE_UDEC3*/ 3 * sizeof(short int),
203 /*WINED3DDECLTYPE_DEC3N*/ 3 * sizeof(short int),
204 /*WINED3DDECLTYPE_FLOAT16_2*/ 2 * sizeof(short int),
205 /*WINED3DDECLTYPE_FLOAT16_4*/ 4 * sizeof(short int)
206};
207
209{
210 /*WINED3DDECLTYPE_FLOAT1*/ WINED3DFMT_R32_FLOAT,
211 /*WINED3DDECLTYPE_FLOAT2*/ WINED3DFMT_R32G32_FLOAT,
212 /*WINED3DDECLTYPE_FLOAT3*/ WINED3DFMT_R32G32B32_FLOAT,
213 /*WINED3DDECLTYPE_FLOAT4*/ WINED3DFMT_R32G32B32A32_FLOAT,
214 /*WINED3DDECLTYPE_D3DCOLOR*/ WINED3DFMT_B8G8R8A8_UNORM,
215 /*WINED3DDECLTYPE_UBYTE4*/ WINED3DFMT_R8G8B8A8_UINT,
216 /*WINED3DDECLTYPE_SHORT2*/ WINED3DFMT_R16G16_SINT,
217 /*WINED3DDECLTYPE_SHORT4*/ WINED3DFMT_R16G16B16A16_SINT,
218 /*WINED3DDECLTYPE_UBYTE4N*/ WINED3DFMT_R8G8B8A8_UNORM,
219 /*WINED3DDECLTYPE_SHORT2N*/ WINED3DFMT_R16G16_SNORM,
220 /*WINED3DDECLTYPE_SHORT4N*/ WINED3DFMT_R16G16B16A16_SNORM,
221 /*WINED3DDECLTYPE_USHORT2N*/ WINED3DFMT_R16G16_UNORM,
222 /*WINED3DDECLTYPE_USHORT4N*/ WINED3DFMT_R16G16B16A16_UNORM,
223 /*WINED3DDECLTYPE_UDEC3*/ WINED3DFMT_R10G10B10X2_UINT,
224 /*WINED3DDECLTYPE_DEC3N*/ WINED3DFMT_R10G10B10X2_SNORM,
225 /*WINED3DDECLTYPE_FLOAT16_2*/ WINED3DFMT_R16G16_FLOAT,
226 /*WINED3DDECLTYPE_FLOAT16_4*/ WINED3DFMT_R16G16B16A16_FLOAT,
227};
228
229static const struct
230{
233}
235{
236 /* D3DVSDE_POSITION */ {WINED3D_DECL_USAGE_POSITION, 0},
237 /* D3DVSDE_BLENDWEIGHT */ {WINED3D_DECL_USAGE_BLEND_WEIGHT, 0},
238 /* D3DVSDE_BLENDINDICES */ {WINED3D_DECL_USAGE_BLEND_INDICES, 0},
239 /* D3DVSDE_NORMAL */ {WINED3D_DECL_USAGE_NORMAL, 0},
240 /* D3DVSDE_PSIZE */ {WINED3D_DECL_USAGE_PSIZE, 0},
241 /* D3DVSDE_DIFFUSE */ {WINED3D_DECL_USAGE_COLOR, 0},
242 /* D3DVSDE_SPECULAR */ {WINED3D_DECL_USAGE_COLOR, 1},
243 /* D3DVSDE_TEXCOORD0 */ {WINED3D_DECL_USAGE_TEXCOORD, 0},
244 /* D3DVSDE_TEXCOORD1 */ {WINED3D_DECL_USAGE_TEXCOORD, 1},
245 /* D3DVSDE_TEXCOORD2 */ {WINED3D_DECL_USAGE_TEXCOORD, 2},
246 /* D3DVSDE_TEXCOORD3 */ {WINED3D_DECL_USAGE_TEXCOORD, 3},
247 /* D3DVSDE_TEXCOORD4 */ {WINED3D_DECL_USAGE_TEXCOORD, 4},
248 /* D3DVSDE_TEXCOORD5 */ {WINED3D_DECL_USAGE_TEXCOORD, 5},
249 /* D3DVSDE_TEXCOORD6 */ {WINED3D_DECL_USAGE_TEXCOORD, 6},
250 /* D3DVSDE_TEXCOORD7 */ {WINED3D_DECL_USAGE_TEXCOORD, 7},
251 /* D3DVSDE_POSITION2 */ {WINED3D_DECL_USAGE_POSITION, 1},
252 /* D3DVSDE_NORMAL2 */ {WINED3D_DECL_USAGE_NORMAL, 1},
254
255/* TODO: find out where rhw (or positionT) is for declaration8 */
256static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size,
257 struct wined3d_vertex_element **wined3d_elements)
258{
260 const DWORD *token = d3d8_elements;
261 D3DVSD_TOKENTYPE token_type;
262 unsigned int element_count = 0;
263 WORD stream = 0;
264 int offset = 0;
265
266 TRACE("d3d8_elements %p, d3d8_elements_size %p, wined3d_elements %p\n", d3d8_elements, d3d8_elements_size, wined3d_elements);
267
268 /* 128 should be enough for anyone... */
269 *wined3d_elements = heap_alloc_zero(128 * sizeof(**wined3d_elements));
270 while (D3DVSD_END() != *token)
271 {
272 token_type = ((*token & D3DVSD_TOKENTYPEMASK) >> D3DVSD_TOKENTYPESHIFT);
273
274 if (token_type == D3DVSD_TOKEN_STREAM && !(*token & D3DVSD_STREAMTESSMASK))
275 {
277 offset = 0;
278 } else if (token_type == D3DVSD_TOKEN_STREAMDATA && !(*token & D3DVSD_DATALOADTYPEMASK)) {
281
282 TRACE("Adding element %d:\n", element_count);
283
284 element = *wined3d_elements + element_count++;
286 element->input_slot = stream;
287 element->offset = offset;
288 element->output_slot = reg;
289 element->input_slot_class = WINED3D_INPUT_PER_VERTEX_DATA;
290 element->instance_data_step_rate = 0;
292 element->usage = wined3d_usage_lookup[reg].usage;
293 element->usage_idx = wined3d_usage_lookup[reg].usage_idx;
294
296 } else if (token_type == D3DVSD_TOKEN_STREAMDATA && (*token & D3DVSD_DATALOADTYPEMASK)) {
297 TRACE(" 0x%08x SKIP(%u)\n", token_type, ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
298 offset += sizeof(DWORD) * ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
299 }
300
301 if (element_count >= 127) {
302 ERR("More than 127 elements?\n");
303 break;
304 }
305
307 }
308
309 *d3d8_elements_size = (++token - d3d8_elements) * sizeof(DWORD);
310
311 return element_count;
312}
313
315{
317 heap_free(declaration->elements);
319}
320
322{
323 TRACE("declaration %p.\n", declaration);
324
326 wined3d_vertex_declaration_decref(declaration->wined3d_vertex_declaration);
328}
329
331{
333};
334
336 struct d3d8_device *device, const DWORD *elements, DWORD shader_handle)
337{
338 struct wined3d_vertex_element *wined3d_elements;
339 UINT wined3d_element_count;
340 HRESULT hr;
341
342 declaration->shader_handle = shader_handle;
343
344 wined3d_element_count = convert_to_wined3d_declaration(elements, &declaration->elements_size, &wined3d_elements);
345 if (!(declaration->elements = heap_alloc(declaration->elements_size)))
346 {
347 ERR("Failed to allocate vertex declaration elements memory.\n");
348 heap_free(wined3d_elements);
349 return E_OUTOFMEMORY;
350 }
351
352 memcpy(declaration->elements, elements, declaration->elements_size);
353
355 hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count,
358 heap_free(wined3d_elements);
359 if (FAILED(hr))
360 {
361 WARN("Failed to create wined3d vertex declaration, hr %#x.\n", hr);
362 heap_free(declaration->elements);
363 return hr;
364 }
365
366 return D3D_OK;
367}
368
370 struct d3d8_device *device, DWORD fvf)
371{
372 HRESULT hr;
373
374 declaration->elements = NULL;
375 declaration->elements_size = 0;
376 declaration->shader_handle = fvf;
377
379 &d3d8_vertexdeclaration_wined3d_parent_ops, &declaration->wined3d_vertex_declaration);
380 if (FAILED(hr))
381 {
382 WARN("Failed to create wined3d vertex declaration, hr %#x.\n", hr);
383 return hr;
384 }
385
386 return D3D_OK;
387}
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
static const char * debug_d3dvsde_register(D3DVSDE_REGISTER d3dvsde_register)
void d3d8_vertex_declaration_destroy(struct d3d8_vertex_declaration *declaration)
void load_local_constants(const DWORD *d3d8_elements, struct wined3d_shader *wined3d_vertex_shader)
size_t parse_token(const DWORD *pToken)
static const struct @224 wined3d_usage_lookup[]
HRESULT d3d8_vertex_declaration_init_fvf(struct d3d8_vertex_declaration *declaration, struct d3d8_device *device, DWORD fvf)
#define D3DVSDE_REGISTER_TO_STR(u)
static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, struct wined3d_vertex_element **wined3d_elements)
static const char * debug_d3dvsdt_type(D3DVSDT_TYPE d3dvsdt_type)
static const struct wined3d_parent_ops d3d8_vertexdeclaration_wined3d_parent_ops
static void STDMETHODCALLTYPE d3d8_vertexdeclaration_wined3d_object_destroyed(void *parent)
BYTE usage_idx
static const size_t wined3d_type_sizes[]
#define D3DVSDT_TYPE_TO_STR(u)
HRESULT d3d8_vertex_declaration_init(struct d3d8_vertex_declaration *declaration, struct d3d8_device *device, const DWORD *elements, DWORD shader_handle)
BYTE usage
static enum wined3d_format_id wined3d_format_lookup[]
#define D3DVSD_VERTEXREGMASK
Definition: d3d8types.h:257
#define D3DVSD_END()
Definition: d3d8types.h:275
#define D3DVSD_CONSTADDRESSSHIFT
Definition: d3d8types.h:240
#define D3DVSD_DATALOADTYPEMASK
Definition: d3d8types.h:264
enum _D3DVSDT_TYPE D3DVSDT_TYPE
#define D3DVSD_EXTINFOSHIFT
Definition: d3d8types.h:241
enum _D3DVSDE_REGISTER D3DVSDE_REGISTER
#define D3DVSD_SKIPCOUNTSHIFT
Definition: d3d8types.h:246
#define D3DVSD_DATATYPEMASK
Definition: d3d8types.h:259
#define D3DVSD_EXTINFOMASK
Definition: d3d8types.h:255
#define D3DVSD_VERTEXREGINSHIFT
Definition: d3d8types.h:247
@ D3DVSDE_TEXCOORD0
Definition: d3d8types.h:205
@ D3DVSDE_PSIZE
Definition: d3d8types.h:202
@ D3DVSDE_TEXCOORD2
Definition: d3d8types.h:207
@ D3DVSDE_TEXCOORD1
Definition: d3d8types.h:206
@ D3DVSDE_TEXCOORD7
Definition: d3d8types.h:212
@ D3DVSDE_POSITION
Definition: d3d8types.h:198
@ D3DVSDE_TEXCOORD4
Definition: d3d8types.h:209
@ D3DVSDE_DIFFUSE
Definition: d3d8types.h:203
@ D3DVSDE_NORMAL2
Definition: d3d8types.h:214
@ D3DVSDE_TEXCOORD5
Definition: d3d8types.h:210
@ D3DVSDE_POSITION2
Definition: d3d8types.h:213
@ D3DVSDE_BLENDWEIGHT
Definition: d3d8types.h:199
@ D3DVSDE_TEXCOORD3
Definition: d3d8types.h:208
@ D3DVSDE_BLENDINDICES
Definition: d3d8types.h:200
@ D3DVSDE_SPECULAR
Definition: d3d8types.h:204
@ D3DVSDE_TEXCOORD6
Definition: d3d8types.h:211
@ D3DVSDE_NORMAL
Definition: d3d8types.h:201
#define D3DVSD_CONSTCOUNTSHIFT
Definition: d3d8types.h:249
#define D3DVSD_VERTEXREGSHIFT
Definition: d3d8types.h:243
#define D3DVSD_SKIPCOUNTMASK
Definition: d3d8types.h:260
#define D3DVSD_CONSTCOUNTMASK
Definition: d3d8types.h:263
#define D3DVSD_VERTEXREGINMASK
Definition: d3d8types.h:262
#define D3DVSD_STREAMNUMBERMASK
Definition: d3d8types.h:256
#define D3DVSD_STREAMTESSMASK
Definition: d3d8types.h:265
#define D3DVSD_TOKENTYPEMASK
Definition: d3d8types.h:266
#define D3DVSD_CONSTADDRESSMASK
Definition: d3d8types.h:254
#define D3DVSD_DATATYPESHIFT
Definition: d3d8types.h:245
#define D3DVSD_TOKENTYPESHIFT
Definition: d3d8types.h:252
@ D3DVSD_TOKEN_STREAM
Definition: d3d8types.h:166
@ D3DVSD_TOKEN_TESSELLATOR
Definition: d3d8types.h:168
@ D3DVSD_TOKEN_EXT
Definition: d3d8types.h:170
@ D3DVSD_TOKEN_END
Definition: d3d8types.h:172
@ D3DVSD_TOKEN_STREAMDATA
Definition: d3d8types.h:167
@ D3DVSD_TOKEN_NOP
Definition: d3d8types.h:165
@ D3DVSD_TOKEN_CONSTMEM
Definition: d3d8types.h:169
enum _D3DVSD_TOKENTYPE D3DVSD_TOKENTYPE
@ D3DVSDT_FLOAT4
Definition: d3d8types.h:232
@ D3DVSDT_D3DCOLOR
Definition: d3d8types.h:233
@ D3DVSDT_FLOAT3
Definition: d3d8types.h:231
@ D3DVSDT_SHORT2
Definition: d3d8types.h:235
@ D3DVSDT_FLOAT1
Definition: d3d8types.h:229
@ D3DVSDT_UBYTE4
Definition: d3d8types.h:234
@ D3DVSDT_SHORT4
Definition: d3d8types.h:236
@ D3DVSDT_FLOAT2
Definition: d3d8types.h:230
#define D3DVSD_STREAMNUMBERSHIFT
Definition: d3d8types.h:242
#define D3D_OK
Definition: d3d.h:106
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *shader, UINT start_idx, const float *src_data, UINT count)
Definition: shader.c:3411
#define TRACE_ON(x)
Definition: compat.h:75
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLintptr offset
Definition: glext.h:5920
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
static int reg
Definition: i386-dis.c:1291
#define FAILED(hr)
Definition: intsafe.h:51
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static float(__cdecl *square_half_float)(float x
unsigned int UINT
Definition: ndis.h:50
#define DWORD
Definition: nt_native.h:44
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: devices.h:37
Definition: parse.h:23
HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration)
HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
@ WINED3D_DECL_USAGE_BLEND_INDICES
Definition: wined3d.h:788
@ WINED3D_DECL_USAGE_NORMAL
Definition: wined3d.h:789
@ WINED3D_DECL_USAGE_PSIZE
Definition: wined3d.h:790
@ WINED3D_DECL_USAGE_BLEND_WEIGHT
Definition: wined3d.h:787
@ WINED3D_DECL_USAGE_POSITION
Definition: wined3d.h:786
@ WINED3D_DECL_USAGE_COLOR
Definition: wined3d.h:796
@ WINED3D_DECL_USAGE_TEXCOORD
Definition: wined3d.h:791
@ WINED3D_DECL_METHOD_DEFAULT
Definition: wined3d.h:775
wined3d_format_id
Definition: wined3d.h:106
@ WINED3DFMT_R16G16_UNORM
Definition: wined3d.h:171
@ WINED3DFMT_R10G10B10X2_UINT
Definition: wined3d.h:124
@ WINED3DFMT_R32G32_FLOAT
Definition: wined3d.h:150
@ WINED3DFMT_R16G16_SNORM
Definition: wined3d.h:173
@ WINED3DFMT_B8G8R8A8_UNORM
Definition: wined3d.h:223
@ WINED3DFMT_R16G16B16A16_SINT
Definition: wined3d.h:148
@ WINED3DFMT_R32G32B32_FLOAT
Definition: wined3d.h:140
@ WINED3DFMT_R16G16B16A16_FLOAT
Definition: wined3d.h:144
@ WINED3DFMT_R8G8B8A8_UNORM
Definition: wined3d.h:164
@ WINED3DFMT_R16G16B16A16_UNORM
Definition: wined3d.h:145
@ WINED3DFMT_R32_FLOAT
Definition: wined3d.h:177
@ WINED3DFMT_R16G16_FLOAT
Definition: wined3d.h:170
@ WINED3DFMT_R8G8B8A8_UINT
Definition: wined3d.h:166
@ WINED3DFMT_R10G10B10X2_SNORM
Definition: wined3d.h:125
@ WINED3DFMT_R32G32B32A32_FLOAT
Definition: wined3d.h:136
@ WINED3DFMT_R16G16B16A16_SNORM
Definition: wined3d.h:147
@ WINED3DFMT_R16G16_SINT
Definition: wined3d.h:174
@ WINED3D_INPUT_PER_VERTEX_DATA
Definition: wined3d.h:1785
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
unsigned char BYTE
Definition: xxhash.c:193