ReactOS 0.4.17-dev-966-gf06eace
vertexdeclaration.c
Go to the documentation of this file.
1/*
2 * IDirect3DVertexDeclaration9 implementation
3 *
4 * Copyright 2002-2003 Raphael Junqueira
5 * Jason Edmeades
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include "d3d9_private.h"
23
25
26static const struct
27{
29 unsigned int component_count;
30 unsigned int component_size;
31}
33{
34 /* D3DDECLTYPE_FLOAT1 */ {WINED3DFMT_R32_FLOAT, 1, sizeof(float)},
35 /* D3DDECLTYPE_FLOAT2 */ {WINED3DFMT_R32G32_FLOAT, 2, sizeof(float)},
36 /* D3DDECLTYPE_FLOAT3 */ {WINED3DFMT_R32G32B32_FLOAT, 3, sizeof(float)},
37 /* D3DDECLTYPE_FLOAT4 */ {WINED3DFMT_R32G32B32A32_FLOAT, 4, sizeof(float)},
38 /* D3DDECLTYPE_D3DCOLOR */ {WINED3DFMT_B8G8R8A8_UNORM, 4, sizeof(BYTE)},
39 /* D3DDECLTYPE_UBYTE4 */ {WINED3DFMT_R8G8B8A8_UINT, 4, sizeof(BYTE)},
40 /* D3DDECLTYPE_SHORT2 */ {WINED3DFMT_R16G16_SINT, 2, sizeof(short int)},
41 /* D3DDECLTYPE_SHORT4 */ {WINED3DFMT_R16G16B16A16_SINT, 4, sizeof(short int)},
42 /* D3DDECLTYPE_UBYTE4N */ {WINED3DFMT_R8G8B8A8_UNORM, 4, sizeof(BYTE)},
43 /* D3DDECLTYPE_SHORT2N */ {WINED3DFMT_R16G16_SNORM, 2, sizeof(short int)},
44 /* D3DDECLTYPE_SHORT4N */ {WINED3DFMT_R16G16B16A16_SNORM, 4, sizeof(short int)},
45 /* D3DDECLTYPE_USHORT2N */ {WINED3DFMT_R16G16_UNORM, 2, sizeof(short int)},
46 /* D3DDECLTYPE_USHORT4N */ {WINED3DFMT_R16G16B16A16_UNORM, 4, sizeof(short int)},
47 /* D3DDECLTYPE_UDEC3 */ {WINED3DFMT_R10G10B10X2_UINT, 3, sizeof(short int)},
48 /* D3DDECLTYPE_DEC3N */ {WINED3DFMT_R10G10B10X2_SNORM, 3, sizeof(short int)},
49 /* D3DDECLTYPE_FLOAT16_2 */ {WINED3DFMT_R16G16_FLOAT, 2, sizeof(short int)},
50 /* D3DDECLTYPE_FLOAT16_4 */ {WINED3DFMT_R16G16B16A16_FLOAT, 4, sizeof(short int)}
51};
52
53static inline struct d3d9_vertex_declaration *impl_from_IDirect3DVertexDeclaration9(IDirect3DVertexDeclaration9 *iface)
54{
56}
57
59 DWORD fvf,
60 D3DVERTEXELEMENT9** ppVertexElements) {
61
62 unsigned int idx, idx2;
63 unsigned int offset;
64 BOOL has_pos = (fvf & D3DFVF_POSITION_MASK) != 0;
65 BOOL has_blend = (fvf & D3DFVF_XYZB5) > D3DFVF_XYZRHW;
66 BOOL has_blend_idx = has_blend &&
67 (((fvf & D3DFVF_XYZB5) == D3DFVF_XYZB5) ||
70 BOOL has_normal = (fvf & D3DFVF_NORMAL) != 0;
71 BOOL has_psize = (fvf & D3DFVF_PSIZE) != 0;
72
73 BOOL has_diffuse = (fvf & D3DFVF_DIFFUSE) != 0;
74 BOOL has_specular = (fvf & D3DFVF_SPECULAR) !=0;
75
77 DWORD texcoords = (fvf & 0xFFFF0000) >> 16;
78
79 D3DVERTEXELEMENT9 end_element = D3DDECL_END();
81
82 unsigned int size;
83 DWORD num_blends = 1 + (((fvf & D3DFVF_XYZB5) - D3DFVF_XYZB1) >> 1);
84 if (has_blend_idx) num_blends--;
85
86 /* Compute declaration size */
87 size = has_pos + (has_blend && num_blends > 0) + has_blend_idx + has_normal +
88 has_psize + has_diffuse + has_specular + num_textures + 1;
89
90 /* convert the declaration */
91 if (!(elements = malloc(size * sizeof(*elements))))
93
94 elements[size-1] = end_element;
95 idx = 0;
96 if (has_pos) {
97 if (!has_blend && (fvf & D3DFVF_XYZRHW)) {
100 }
101 else if (!has_blend && (fvf & D3DFVF_XYZW) == D3DFVF_XYZW) {
104 }
105 else {
108 }
110 idx++;
111 }
112 if (has_blend && (num_blends > 0)) {
115 else {
116 switch(num_blends) {
117 case 1: elements[idx].Type = D3DDECLTYPE_FLOAT1; break;
118 case 2: elements[idx].Type = D3DDECLTYPE_FLOAT2; break;
119 case 3: elements[idx].Type = D3DDECLTYPE_FLOAT3; break;
120 case 4: elements[idx].Type = D3DDECLTYPE_FLOAT4; break;
121 default:
122 ERR("Unexpected amount of blend values: %lu\n", num_blends);
123 }
124 }
127 idx++;
128 }
129 if (has_blend_idx) {
133 else if (fvf & D3DFVF_LASTBETA_D3DCOLOR)
135 else
139 idx++;
140 }
141 if (has_normal) {
145 idx++;
146 }
147 if (has_psize) {
151 idx++;
152 }
153 if (has_diffuse) {
157 idx++;
158 }
159 if (has_specular) {
163 idx++;
164 }
165 for (idx2 = 0; idx2 < num_textures; idx2++) {
166 unsigned int numcoords = (texcoords >> (idx2*2)) & 0x03;
167 switch (numcoords) {
170 break;
173 break;
176 break;
179 break;
180 }
182 elements[idx].UsageIndex = idx2;
183 idx++;
184 }
185
186 /* Now compute offsets, and initialize the rest of the fields */
187 for (idx = 0, offset = 0; idx < size-1; idx++) {
188 elements[idx].Stream = 0;
191 offset += d3d_dtype_lookup[elements[idx].Type].component_count
192 * d3d_dtype_lookup[elements[idx].Type].component_size;
193 }
194
195 *ppVertexElements = elements;
196 return D3D_OK;
197}
198
199static HRESULT WINAPI d3d9_vertex_declaration_QueryInterface(IDirect3DVertexDeclaration9 *iface,
200 REFIID riid, void **out)
201{
202 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
203
204 if (IsEqualGUID(riid, &IID_IDirect3DVertexDeclaration9)
206 {
208 *out = iface;
209 return S_OK;
210 }
211
212 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
213
214 *out = NULL;
215 return E_NOINTERFACE;
216}
217
218static ULONG WINAPI d3d9_vertex_declaration_AddRef(IDirect3DVertexDeclaration9 *iface)
219{
222
223 TRACE("%p increasing refcount to %lu.\n", iface, refcount);
224
225 if (refcount == 1)
226 {
229 }
230
231 return refcount;
232}
233
234static ULONG WINAPI d3d9_vertex_declaration_Release(IDirect3DVertexDeclaration9 *iface)
235{
238
239 TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
240
241 if (!refcount)
242 {
245
246 /* Release the device last, as it may cause the device to be destroyed. */
248 }
249
250 return refcount;
251}
252
253static HRESULT WINAPI d3d9_vertex_declaration_GetDevice(IDirect3DVertexDeclaration9 *iface, IDirect3DDevice9 **device)
254{
256
257 TRACE("iface %p, device %p.\n", iface, device);
258
259 *device = (IDirect3DDevice9 *)declaration->parent_device;
261
262 TRACE("Returning device %p.\n", *device);
263
264 return D3D_OK;
265}
266
267static HRESULT WINAPI d3d9_vertex_declaration_GetDeclaration(IDirect3DVertexDeclaration9 *iface,
269{
271
272 TRACE("iface %p, elements %p, element_count %p.\n", iface, elements, element_count);
273
274 *element_count = declaration->element_count;
275
276 /* Passing a NULL elements is used to just retrieve the number of elements */
277 if (!elements)
278 return D3D_OK;
279
280 TRACE("Copying %p to %p.\n", declaration->elements, elements);
281 memcpy(elements, declaration->elements, sizeof(*declaration->elements) * declaration->element_count);
282
283 return D3D_OK;
284}
285
286static const struct IDirect3DVertexDeclaration9Vtbl d3d9_vertex_declaration_vtbl =
287{
288 /* IUnknown */
292 /* IDirect3DVertexDeclaration9 */
295};
296
298{
299 if (!iface)
300 return NULL;
301 assert(iface->lpVtbl == &d3d9_vertex_declaration_vtbl);
303}
304
306{
308 free(declaration->elements);
310}
311
313{
315};
316
318 struct wined3d_vertex_element **wined3d_elements, UINT *element_count, DWORD *stream_map)
319{
321 UINT count = 1;
322 UINT i;
323
324 TRACE("d3d9_elements %p, wined3d_elements %p, element_count %p\n", d3d9_elements, wined3d_elements, element_count);
325
326 *stream_map = 0;
327
328 element = d3d9_elements;
329 while (element++->Stream != 0xff && count++ < 128);
330
331 if (count == 128) return E_FAIL;
332
333 /* Skip the END element */
334 --count;
335
336 if (!(*wined3d_elements = malloc(count * sizeof(**wined3d_elements))))
337 {
338 FIXME("Memory allocation failed\n");
340 }
341
342 for (i = 0; i < count; ++i)
343 {
344 if (d3d9_elements[i].Type >= ARRAY_SIZE(d3d_dtype_lookup))
345 {
346 WARN("Invalid element type %#x.\n", d3d9_elements[i].Type);
347 free(*wined3d_elements);
348 return E_FAIL;
349 }
350 (*wined3d_elements)[i].format = d3d_dtype_lookup[d3d9_elements[i].Type].format;
351 (*wined3d_elements)[i].input_slot = d3d9_elements[i].Stream;
352 (*wined3d_elements)[i].offset = d3d9_elements[i].Offset;
353 (*wined3d_elements)[i].output_slot = WINED3D_OUTPUT_SLOT_SEMANTIC;
354 (*wined3d_elements)[i].input_slot_class = WINED3D_INPUT_PER_VERTEX_DATA;
355 (*wined3d_elements)[i].instance_data_step_rate = 0;
356 (*wined3d_elements)[i].method = d3d9_elements[i].Method;
357 (*wined3d_elements)[i].usage = d3d9_elements[i].Usage;
358 (*wined3d_elements)[i].usage_idx = d3d9_elements[i].UsageIndex;
359 *stream_map |= 1u << d3d9_elements[i].Stream;
360 }
361
363
364 return D3D_OK;
365}
366
368 struct d3d9_device *device, const D3DVERTEXELEMENT9 *elements)
369{
370 struct wined3d_vertex_element *wined3d_elements;
371 UINT wined3d_element_count;
373 HRESULT hr;
374
375 hr = convert_to_wined3d_declaration(elements, &wined3d_elements, &wined3d_element_count,
376 &declaration->stream_map);
377 if (FAILED(hr))
378 {
379 WARN("Failed to create wined3d vertex declaration elements, hr %#lx.\n", hr);
380 return hr;
381 }
382
383 declaration->IDirect3DVertexDeclaration9_iface.lpVtbl = &d3d9_vertex_declaration_vtbl;
384 declaration->refcount = 1;
385
386 element_count = wined3d_element_count + 1;
387 if (!(declaration->elements = malloc(element_count * sizeof(*declaration->elements))))
388 {
389 free(wined3d_elements);
390 ERR("Failed to allocate vertex declaration elements memory.\n");
392 }
393 memcpy(declaration->elements, elements, element_count * sizeof(*elements));
394 declaration->element_count = element_count;
395
397 hr = wined3d_vertex_declaration_create(device->wined3d_device, wined3d_elements, wined3d_element_count,
400 free(wined3d_elements);
401 if (FAILED(hr))
402 {
403 free(declaration->elements);
404 WARN("Failed to create wined3d vertex declaration, hr %#lx.\n", hr);
405 if (hr == E_INVALIDARG)
406 hr = E_FAIL;
407 return hr;
408 }
409
410 declaration->parent_device = &device->IDirect3DDevice9Ex_iface;
412
413 return D3D_OK;
414}
415
417 const D3DVERTEXELEMENT9 *elements, struct d3d9_vertex_declaration **declaration)
418{
420 HRESULT hr;
421
422 if (!(object = calloc(1, sizeof(*object))))
423 return E_OUTOFMEMORY;
424
426 if (FAILED(hr))
427 {
428 WARN("Failed to initialize vertex declaration, hr %#lx.\n", hr);
429 free(object);
430 return hr;
431 }
432
433 TRACE("Created vertex declaration %p.\n", object);
435
436 return D3D_OK;
437}
Type
Definition: Type.h:7
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, struct wined3d_vertex_element **wined3d_elements, DWORD *stream_map)
#define D3DFVF_DIFFUSE
Definition: d3d8types.h:122
#define D3DFVF_TEXCOUNT_SHIFT
Definition: d3d8types.h:125
#define D3DFVF_XYZB1
Definition: d3d8types.h:115
#define D3DFVF_LASTBETA_UBYTE4
Definition: d3d8types.h:135
#define D3DFVF_XYZB5
Definition: d3d8types.h:119
#define D3DFVF_XYZRHW
Definition: d3d8types.h:114
#define D3DFVF_NORMAL
Definition: d3d8types.h:120
#define D3DFVF_TEXTUREFORMAT4
Definition: d3d8types.h:63
#define D3DFVF_XYZB2
Definition: d3d8types.h:116
#define D3DFVF_TEXTUREFORMAT3
Definition: d3d8types.h:62
#define D3DFVF_TEXCOUNT_MASK
Definition: d3d8types.h:124
#define D3DFVF_TEXTUREFORMAT1
Definition: d3d8types.h:60
#define D3DFVF_PSIZE
Definition: d3d8types.h:121
#define D3DFVF_TEXTUREFORMAT2
Definition: d3d8types.h:61
#define D3DFVF_SPECULAR
Definition: d3d8types.h:123
#define D3DFVF_POSITION_MASK
Definition: d3d8types.h:112
static HRESULT WINAPI d3d9_vertex_declaration_GetDeclaration(IDirect3DVertexDeclaration9 *iface, D3DVERTEXELEMENT9 *elements, UINT *element_count)
unsigned int component_count
enum wined3d_format_id format
struct d3d9_vertex_declaration * unsafe_impl_from_IDirect3DVertexDeclaration9(IDirect3DVertexDeclaration9 *iface)
static const struct IDirect3DVertexDeclaration9Vtbl d3d9_vertex_declaration_vtbl
static const struct @268 d3d_dtype_lookup[]
static HRESULT vertexdeclaration_init(struct d3d9_vertex_declaration *declaration, struct d3d9_device *device, const D3DVERTEXELEMENT9 *elements)
static void STDMETHODCALLTYPE d3d9_vertexdeclaration_wined3d_object_destroyed(void *parent)
static struct d3d9_vertex_declaration * impl_from_IDirect3DVertexDeclaration9(IDirect3DVertexDeclaration9 *iface)
static const struct wined3d_parent_ops d3d9_vertexdeclaration_wined3d_parent_ops
static HRESULT WINAPI d3d9_vertex_declaration_GetDevice(IDirect3DVertexDeclaration9 *iface, IDirect3DDevice9 **device)
HRESULT d3d9_vertex_declaration_create(struct d3d9_device *device, const D3DVERTEXELEMENT9 *elements, struct d3d9_vertex_declaration **declaration)
static HRESULT WINAPI d3d9_vertex_declaration_QueryInterface(IDirect3DVertexDeclaration9 *iface, REFIID riid, void **out)
static ULONG WINAPI d3d9_vertex_declaration_AddRef(IDirect3DVertexDeclaration9 *iface)
HRESULT vdecl_convert_fvf(DWORD fvf, D3DVERTEXELEMENT9 **ppVertexElements)
static ULONG WINAPI d3d9_vertex_declaration_Release(IDirect3DVertexDeclaration9 *iface)
unsigned int component_size
#define IDirect3DDevice9Ex_Release(p)
Definition: d3d9.h:1930
#define IDirect3DVertexDeclaration9_AddRef(p)
Definition: d3d9.h:1012
#define IDirect3DDevice9Ex_AddRef(p)
Definition: d3d9.h:1929
#define IDirect3DDevice9_AddRef(p)
Definition: d3d9.h:1335
@ D3DDECLUSAGE_BLENDWEIGHT
Definition: d3d9types.h:237
@ D3DDECLUSAGE_BLENDINDICES
Definition: d3d9types.h:238
@ D3DDECLUSAGE_POSITIONT
Definition: d3d9types.h:245
@ D3DDECLUSAGE_NORMAL
Definition: d3d9types.h:239
@ D3DDECLUSAGE_TEXCOORD
Definition: d3d9types.h:241
@ D3DDECLUSAGE_POSITION
Definition: d3d9types.h:236
@ D3DDECLUSAGE_PSIZE
Definition: d3d9types.h:240
@ D3DDECLUSAGE_COLOR
Definition: d3d9types.h:246
#define D3DFVF_LASTBETA_D3DCOLOR
Definition: d3d9types.h:169
@ D3DDECLTYPE_UBYTE4
Definition: d3d9types.h:276
@ D3DDECLTYPE_FLOAT3
Definition: d3d9types.h:273
@ D3DDECLTYPE_FLOAT1
Definition: d3d9types.h:271
@ D3DDECLTYPE_D3DCOLOR
Definition: d3d9types.h:275
@ D3DDECLTYPE_FLOAT2
Definition: d3d9types.h:272
@ D3DDECLTYPE_FLOAT4
Definition: d3d9types.h:274
#define D3DDECL_END()
Definition: d3d9types.h:329
#define D3DFVF_XYZW
Definition: d3d9types.h:152
@ D3DDECLMETHOD_DEFAULT
Definition: d3d9types.h:258
#define D3D_OK
Definition: d3d.h:106
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:40
#define assert(_expr)
Definition: assert.h:32
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
r parent
Definition: btrfs.c:3010
DWORD IDirect3DDevice9
Definition: dxva2api.idl:22
DWORD IDirect3DDevice9Ex
Definition: dxvahd.idl:22
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
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
unsigned int UINT
Definition: sysinfo.c:13
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static IStream Stream
Definition: htmldoc.c:1115
static ULONG ** element_count
Definition: exception.c:124
static float(__cdecl *square_half_float)(float x
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define calloc
Definition: rosglue.h:14
#define D3DERR_OUTOFVIDEOMEMORY
Definition: d3d8.h:81
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3DVertexDeclaration9 IDirect3DVertexDeclaration9_iface
Definition: d3d9_private.h:260
IDirect3DDevice9Ex * parent_device
Definition: d3d9_private.h:267
D3DVERTEXELEMENT9 * elements
Definition: d3d9_private.h:262
Definition: devices.h:37
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define WINAPI
Definition: msvc.h:6
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_incref(struct wined3d_vertex_declaration *declaration)
ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration)
wined3d_format_id
Definition: wined3d.h:126
@ WINED3DFMT_R16G16_UNORM
Definition: wined3d.h:192
@ WINED3DFMT_R10G10B10X2_UINT
Definition: wined3d.h:145
@ WINED3DFMT_R32G32_FLOAT
Definition: wined3d.h:171
@ WINED3DFMT_R16G16_SNORM
Definition: wined3d.h:194
@ WINED3DFMT_B8G8R8A8_UNORM
Definition: wined3d.h:244
@ WINED3DFMT_R16G16B16A16_SINT
Definition: wined3d.h:169
@ WINED3DFMT_R32G32B32_FLOAT
Definition: wined3d.h:161
@ WINED3DFMT_R16G16B16A16_FLOAT
Definition: wined3d.h:165
@ WINED3DFMT_R8G8B8A8_UNORM
Definition: wined3d.h:185
@ WINED3DFMT_R16G16B16A16_UNORM
Definition: wined3d.h:166
@ WINED3DFMT_R32_FLOAT
Definition: wined3d.h:198
@ WINED3DFMT_R16G16_FLOAT
Definition: wined3d.h:191
@ WINED3DFMT_R8G8B8A8_UINT
Definition: wined3d.h:187
@ WINED3DFMT_R10G10B10X2_SNORM
Definition: wined3d.h:146
@ WINED3DFMT_R32G32B32A32_FLOAT
Definition: wined3d.h:157
@ WINED3DFMT_R16G16B16A16_SNORM
Definition: wined3d.h:168
@ WINED3DFMT_R16G16_SINT
Definition: wined3d.h:195
#define WINED3D_OUTPUT_SLOT_SEMANTIC
Definition: wined3d.h:1573
@ WINED3D_INPUT_PER_VERTEX_DATA
Definition: wined3d.h:1826
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:539
#define E_NOINTERFACE
Definition: winerror.h:3479
unsigned char BYTE
Definition: xxhash.c:193