winex11: Add IME functionality to winex11drv.
[wine.git] / dlls / ddraw / vertexbuffer.c
blob2469644c2b127a325e0d68a349d81c61fd400c86
1 /* Direct3D Vertex Buffer
2 * Copyright (c) 2002 Lionel ULMER
3 * Copyright (c) 2006 Stefan DÖSINGER
5 * This file contains the implementation of Direct3DVertexBuffer COM object
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.
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.
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
22 #include "config.h"
23 #include "wine/port.h"
24 #include "wine/debug.h"
26 #include <assert.h>
27 #include <stdarg.h>
28 #include <string.h>
29 #include <stdlib.h>
31 #define COBJMACROS
33 #include "windef.h"
34 #include "winbase.h"
35 #include "winerror.h"
36 #include "wingdi.h"
37 #include "wine/exception.h"
39 #include "ddraw.h"
40 #include "d3d.h"
42 #include "ddraw_private.h"
44 WINE_DEFAULT_DEBUG_CHANNEL(d3d7);
45 WINE_DECLARE_DEBUG_CHANNEL(ddraw_thunk);
48 /*****************************************************************************
49 * IUnknown Methods
50 *****************************************************************************/
52 /*****************************************************************************
53 * IDirect3DVertexBuffer7::QueryInterface
55 * The QueryInterface Method for Vertex Buffers
56 * For a link to QueryInterface rules, see IDirectDraw7::QueryInterface
58 * Params
59 * riid: Queryied Interface id
60 * obj: Address to return the interface pointer
62 * Returns:
63 * S_OK on success
64 * E_NOINTERFACE if the interface wasn't found
66 *****************************************************************************/
67 static HRESULT WINAPI
68 IDirect3DVertexBufferImpl_QueryInterface(IDirect3DVertexBuffer7 *iface,
69 REFIID riid,
70 void **obj)
72 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
73 TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), obj);
75 /* By default, set the object pointer to NULL */
76 *obj = NULL;
78 if ( IsEqualGUID( &IID_IUnknown, riid ) )
80 IDirect3DVertexBuffer7_AddRef(ICOM_INTERFACE(This,IDirect3DVertexBuffer7));
81 *obj = iface;
82 TRACE(" Creating IUnknown interface at %p.\n", *obj);
83 return S_OK;
85 if ( IsEqualGUID( &IID_IDirect3DVertexBuffer, riid ) )
87 IDirect3DVertexBuffer7_AddRef(ICOM_INTERFACE(This,IDirect3DVertexBuffer7));
88 *obj = ICOM_INTERFACE(This, IDirect3DVertexBuffer);
89 TRACE(" Creating IDirect3DVertexBuffer interface %p\n", *obj);
90 return S_OK;
92 if ( IsEqualGUID( &IID_IDirect3DVertexBuffer7, riid ) )
94 IDirect3DVertexBuffer7_AddRef(ICOM_INTERFACE(This,IDirect3DVertexBuffer7));
95 *obj = ICOM_INTERFACE(This, IDirect3DVertexBuffer7);
96 TRACE(" Creating IDirect3DVertexBuffer7 interface %p\n", *obj);
97 return S_OK;
99 FIXME("(%p): interface for IID %s NOT found!\n", This, debugstr_guid(riid));
100 return E_NOINTERFACE;
103 static HRESULT WINAPI
104 Thunk_IDirect3DVertexBufferImpl_1_QueryInterface(IDirect3DVertexBuffer *iface,
105 REFIID riid,
106 void **obj)
108 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
109 TRACE_(ddraw_thunk)("(%p)->(%s,%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, debugstr_guid(riid), obj);
111 return IDirect3DVertexBuffer7_QueryInterface(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
112 riid,
113 obj);
116 /*****************************************************************************
117 * IDirect3DVertexBuffer7::AddRef
119 * AddRef for Vertex Buffers
121 * Returns:
122 * The new refcount
124 *****************************************************************************/
125 static ULONG WINAPI
126 IDirect3DVertexBufferImpl_AddRef(IDirect3DVertexBuffer7 *iface)
128 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
129 ULONG ref = InterlockedIncrement(&This->ref);
131 TRACE("(%p/%p)->() incrementing from %u.\n", This, iface, ref - 1);
133 return ref;
136 static ULONG WINAPI
137 Thunk_IDirect3DVertexBufferImpl_1_AddRef(IDirect3DVertexBuffer *iface)
139 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
140 TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DVertexBuffer7 interface.\n", This);
142 return IDirect3DVertexBuffer7_AddRef(ICOM_INTERFACE(This, IDirect3DVertexBuffer7));
146 /*****************************************************************************
147 * IDirect3DVertexBuffer7::Release
149 * Release for Vertex Buffers
151 * Returns:
152 * The new refcount
154 *****************************************************************************/
155 static ULONG WINAPI
156 IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface)
158 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
159 ULONG ref = InterlockedDecrement(&This->ref);
161 TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
163 if (ref == 0)
165 IWineD3DVertexBuffer *curVB = NULL;
166 UINT offset, stride;
168 EnterCriticalSection(&ddraw_cs);
169 /* D3D7 Vertex buffers don't stay bound in the device, they are passed as a parameter
170 * to drawPrimitiveVB. DrawPrimitiveVB sets them as the stream source in wined3d,
171 * and they should get unset there before they are destroyed
173 IWineD3DDevice_GetStreamSource(This->ddraw->wineD3DDevice,
174 0 /* Stream number */,
175 &curVB,
176 &offset,
177 &stride);
178 if(curVB == This->wineD3DVertexBuffer)
180 IWineD3DDevice_SetStreamSource(This->ddraw->wineD3DDevice,
181 0 /* Steam number */,
182 NULL /* stream data */,
183 0 /* Offset */,
184 0 /* stride */);
186 if(curVB)
188 IWineD3DVertexBuffer_Release(curVB); /* For the GetStreamSource */
191 IWineD3DVertexDeclaration_Release(This->wineD3DVertexDeclaration);
192 IWineD3DVertexBuffer_Release(This->wineD3DVertexBuffer);
193 LeaveCriticalSection(&ddraw_cs);
194 HeapFree(GetProcessHeap(), 0, This);
196 return 0;
198 return ref;
201 static ULONG WINAPI
202 Thunk_IDirect3DVertexBufferImpl_1_Release(IDirect3DVertexBuffer *iface)
204 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
205 TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DVertexBuffer7 interface.\n", This);
207 return IDirect3DVertexBuffer7_Release(ICOM_INTERFACE(This, IDirect3DVertexBuffer7));
210 /*****************************************************************************
211 * IDirect3DVertexBuffer Methods
212 *****************************************************************************/
214 /*****************************************************************************
215 * IDirect3DVertexBuffer7::Lock
217 * Locks the vertex buffer and returns a pointer to the vertex data
218 * Locking vertex buffers is similar to locking surfaces, because Windows
219 * uses surfaces to store vertex data internally (According to the DX sdk)
221 * Params:
222 * Flags: Locking flags. Relevant here are DDLOCK_READONLY, DDLOCK_WRITEONLY,
223 * DDLOCK_DISCARDCONTENTS and DDLOCK_NOOVERWRITE.
224 * Data: Returns a pointer to the vertex data
225 * Size: Returns the size of the buffer if not NULL
227 * Returns:
228 * D3D_OK on success
229 * DDERR_INVALIDPARAMS if Data is NULL
230 * D3DERR_VERTEXBUFFEROPTIMIZED if called on an optimized buffer(WineD3D)
232 *****************************************************************************/
233 static HRESULT WINAPI
234 IDirect3DVertexBufferImpl_Lock(IDirect3DVertexBuffer7 *iface,
235 DWORD Flags,
236 void **Data,
237 DWORD *Size)
239 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
240 WINED3DVERTEXBUFFER_DESC Desc;
241 HRESULT hr;
242 TRACE("(%p)->(%08x,%p,%p)\n", This, Flags, Data, Size);
244 EnterCriticalSection(&ddraw_cs);
245 if(Size)
247 /* Get the size, for returning it, and for locking */
248 hr = IWineD3DVertexBuffer_GetDesc(This->wineD3DVertexBuffer,
249 &Desc);
250 if(hr != D3D_OK)
252 ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr=%08x\n", This, hr);
253 LeaveCriticalSection(&ddraw_cs);
254 return hr;
256 *Size = Desc.Size;
259 hr = IWineD3DVertexBuffer_Lock(This->wineD3DVertexBuffer,
260 0 /* OffsetToLock */,
261 0 /* SizeToLock, 0 == Full lock */,
262 (BYTE **) Data,
263 Flags);
264 LeaveCriticalSection(&ddraw_cs);
265 return hr;
268 static HRESULT WINAPI
269 Thunk_IDirect3DVertexBufferImpl_1_Lock(IDirect3DVertexBuffer *iface,
270 DWORD Flags,
271 void **Data,
272 DWORD *Size)
274 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
275 TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, Flags, Data, Size);
277 return IDirect3DVertexBuffer7_Lock(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
278 Flags,
279 Data,
280 Size);
283 /*****************************************************************************
284 * IDirect3DVertexBuffer7::Unlock
286 * Unlocks a vertex Buffer
288 * Returns:
289 * D3D_OK on success
291 *****************************************************************************/
292 static HRESULT WINAPI
293 IDirect3DVertexBufferImpl_Unlock(IDirect3DVertexBuffer7 *iface)
295 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
296 HRESULT hr;
297 TRACE("(%p)->()\n", This);
299 EnterCriticalSection(&ddraw_cs);
300 hr = IWineD3DVertexBuffer_Unlock(This->wineD3DVertexBuffer);
301 LeaveCriticalSection(&ddraw_cs);
303 return hr;
306 static HRESULT WINAPI
307 Thunk_IDirect3DVertexBufferImpl_1_Unlock(IDirect3DVertexBuffer *iface)
309 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
310 TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DVertexBuffer7 interface.\n", This);
312 return IDirect3DVertexBuffer7_Unlock(ICOM_INTERFACE(This, IDirect3DVertexBuffer7));
316 /*****************************************************************************
317 * IDirect3DVertexBuffer7::ProcessVertices
319 * Processes untransformed Vertices into a transformed or optimized vertex
320 * buffer. It can also perform other operations, such as lighting or clipping
322 * Params
323 * VertexOp: Operation(s) to perform: D3DVOP_CLIP, _EXTENTS, _LIGHT, _TRANSFORM
324 * DestIndex: Index in the destination buffer(This), where the vertices are
325 * placed
326 * Count: Number of Vertices in the Source buffer to process
327 * SrcBuffer: Source vertex buffer
328 * SrcIndex: Index of the first vertex in the src buffer to process
329 * D3DDevice: Device to use for transformation
330 * Flags: 0 for default, D3DPV_DONOTCOPYDATA to prevent copying
331 * unchaned vertices
333 * Returns:
334 * D3D_OK on success
335 * DDERR_INVALIDPARAMS If D3DVOP_TRANSFORM wasn't passed
337 *****************************************************************************/
338 static HRESULT WINAPI
339 IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
340 DWORD VertexOp,
341 DWORD DestIndex,
342 DWORD Count,
343 IDirect3DVertexBuffer7 *SrcBuffer,
344 DWORD SrcIndex,
345 IDirect3DDevice7 *D3DDevice,
346 DWORD Flags)
348 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
349 IDirect3DVertexBufferImpl *Src = ICOM_OBJECT(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, SrcBuffer);
350 IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice7, D3DDevice);
351 BOOL oldClip, doClip;
352 HRESULT hr;
353 WINED3DVERTEXBUFFER_DESC Desc;
355 TRACE("(%p)->(%08x,%d,%d,%p,%d,%p,%08x)\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
357 /* Vertex operations:
358 * D3DVOP_CLIP: Clips vertices outside the viewing frustrum. Needs clipping information
359 * in the vertex buffer (Buffer may not be created with D3DVBCAPS_DONOTCLIP)
360 * D3DVOP_EXTENTS: Causes the screen extents to be updated when rendering the vertices
361 * D3DVOP_LIGHT: Lights the vertices
362 * D3DVOP_TRANSFORM: Transform the vertices. This flag is necessary
364 * WineD3D only transforms and clips the vertices by now, so EXTENTS and LIGHT
365 * are not implemented. Clipping is disabled ATM, because of unsure conditions.
367 if( !(VertexOp & D3DVOP_TRANSFORM) ) return DDERR_INVALIDPARAMS;
369 EnterCriticalSection(&ddraw_cs);
370 /* WineD3D doesn't know d3d7 vertex operation, it uses
371 * render states instead. Set the render states according to
372 * the vertex ops
374 doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE;
375 IWineD3DDevice_GetRenderState(D3D->wineD3DDevice,
376 WINED3DRS_CLIPPING,
377 (DWORD *) &oldClip);
378 if(doClip != oldClip)
380 IWineD3DDevice_SetRenderState(D3D->wineD3DDevice,
381 WINED3DRS_CLIPPING,
382 doClip);
385 IWineD3DVertexBuffer_GetDesc(Src->wineD3DVertexBuffer,
386 &Desc);
387 IWineD3DDevice_SetStreamSource(D3D->wineD3DDevice,
388 0, /* Stream No */
389 Src->wineD3DVertexBuffer,
390 0, /* Offset */
391 get_flexible_vertex_size(Desc.FVF));
392 IWineD3DDevice_SetVertexDeclaration(D3D->wineD3DDevice,
393 Src->wineD3DVertexDeclaration);
394 hr = IWineD3DDevice_ProcessVertices(D3D->wineD3DDevice,
395 SrcIndex,
396 DestIndex,
397 Count,
398 This->wineD3DVertexBuffer,
399 NULL /* Output vdecl */,
400 Flags);
402 /* Restore the states if needed */
403 if(doClip != oldClip)
404 IWineD3DDevice_SetRenderState(D3D->wineD3DDevice,
405 WINED3DRS_CLIPPING,
406 oldClip);
407 LeaveCriticalSection(&ddraw_cs);
408 return hr;
411 static HRESULT WINAPI
412 Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVertexBuffer *iface,
413 DWORD VertexOp,
414 DWORD DestIndex,
415 DWORD Count,
416 IDirect3DVertexBuffer *SrcBuffer,
417 DWORD SrcIndex,
418 IDirect3DDevice3 *D3DDevice,
419 DWORD Flags)
421 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
422 IDirect3DVertexBufferImpl *Src = ICOM_OBJECT(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, SrcBuffer);
423 IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice3, D3DDevice);
425 TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%08x,%p,%08x,%p,%08x) thunking to IDirect3DVertexBuffer7 interface.\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
427 return IDirect3DVertexBuffer7_ProcessVertices(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
428 VertexOp,
429 DestIndex,
430 Count,
431 ICOM_INTERFACE(Src, IDirect3DVertexBuffer7),
432 SrcIndex,
433 ICOM_INTERFACE(D3D, IDirect3DDevice7),
434 Flags);
437 /*****************************************************************************
438 * IDirect3DVertexBuffer7::GetVertexBufferDesc
440 * Returns the description of a vertex buffer
442 * Params:
443 * Desc: Address to write the description to
445 * Returns
446 * DDERR_INVALIDPARAMS if Desc is NULL
447 * D3D_OK on success
449 *****************************************************************************/
450 static HRESULT WINAPI
451 IDirect3DVertexBufferImpl_GetVertexBufferDesc(IDirect3DVertexBuffer7 *iface,
452 D3DVERTEXBUFFERDESC *Desc)
454 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
455 WINED3DVERTEXBUFFER_DESC WDesc;
456 HRESULT hr;
457 TRACE("(%p)->(%p)\n", This, Desc);
459 if(!Desc) return DDERR_INVALIDPARAMS;
461 EnterCriticalSection(&ddraw_cs);
462 hr = IWineD3DVertexBuffer_GetDesc(This->wineD3DVertexBuffer,
463 &WDesc);
464 if(hr != D3D_OK)
466 ERR("(%p) IWineD3DVertexBuffer::GetDesc failed with hr=%08x\n", This, hr);
467 LeaveCriticalSection(&ddraw_cs);
468 return hr;
471 /* Now fill the Desc structure */
472 Desc->dwCaps = This->Caps;
473 Desc->dwFVF = WDesc.FVF;
474 Desc->dwNumVertices = WDesc.Size / get_flexible_vertex_size(WDesc.FVF);
475 LeaveCriticalSection(&ddraw_cs);
477 return D3D_OK;
480 static HRESULT WINAPI
481 Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc(IDirect3DVertexBuffer *iface,
482 D3DVERTEXBUFFERDESC *Desc)
484 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
485 TRACE_(ddraw_thunk)("(%p)->(%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, Desc);
487 return IDirect3DVertexBuffer7_GetVertexBufferDesc(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
488 Desc);
492 /*****************************************************************************
493 * IDirect3DVertexBuffer7::Optimize
495 * Converts an unoptimized vertex buffer into an optimized buffer
497 * Params:
498 * D3DDevice: Device for which this buffer is optimized
499 * Flags: Not used, should be set to 0
501 * Returns
502 * D3D_OK, because it's a stub
504 *****************************************************************************/
505 static HRESULT WINAPI
506 IDirect3DVertexBufferImpl_Optimize(IDirect3DVertexBuffer7 *iface,
507 IDirect3DDevice7 *D3DDevice,
508 DWORD Flags)
510 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
511 IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice7, D3DDevice);
512 FIXME("(%p)->(%p,%08x): stub!\n", This, D3D, Flags);
514 /* We could forward this call to WineD3D and take advantage
515 * of it once we use OpenGL vertex buffers
517 EnterCriticalSection(&ddraw_cs);
518 This->Caps |= D3DVBCAPS_OPTIMIZED;
519 LeaveCriticalSection(&ddraw_cs);
521 return DD_OK;
524 static HRESULT WINAPI
525 Thunk_IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer *iface,
526 IDirect3DDevice3 *D3DDevice,
527 DWORD Flags)
529 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface);
530 IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice3, D3DDevice);
531 TRACE_(ddraw_thunk)("(%p)->(%p,%08x) thunking to IDirect3DVertexBuffer7 interface.\n", This, D3D, Flags);
533 return IDirect3DVertexBuffer7_Optimize(ICOM_INTERFACE(This, IDirect3DVertexBuffer7),
534 ICOM_INTERFACE(D3D, IDirect3DDevice7),
535 Flags);
538 /*****************************************************************************
539 * IDirect3DVertexBuffer7::ProcessVerticesStrided
541 * This method processes untransformed strided vertices into a processed
542 * or optimized vertex buffer.
544 * For more details on the parameters, see
545 * IDirect3DVertexBuffer7::ProcessVertices
547 * Params:
548 * VertexOp: Operations to perform
549 * DestIndex: Destination index to write the vertices to
550 * Count: Number of input vertices
551 * StrideData: Array containing the input vertices
552 * VertexTypeDesc: Vertex Description or source index?????????
553 * D3DDevice: IDirect3DDevice7 to use for processing
554 * Flags: Can be D3DPV_DONOTCOPYDATA to avoid copying unmodified vertices
556 * Returns
557 * D3D_OK on success, or DDERR_*
559 *****************************************************************************/
560 static HRESULT WINAPI
561 IDirect3DVertexBufferImpl_ProcessVerticesStrided(IDirect3DVertexBuffer7 *iface,
562 DWORD VertexOp,
563 DWORD DestIndex,
564 DWORD Count,
565 D3DDRAWPRIMITIVESTRIDEDDATA *StrideData,
566 DWORD VertexTypeDesc,
567 IDirect3DDevice7 *D3DDevice,
568 DWORD Flags)
570 ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface);
571 IDirect3DDeviceImpl *D3D = ICOM_OBJECT(IDirect3DDeviceImpl, IDirect3DDevice7, D3DDevice);
572 FIXME("(%p)->(%08x,%08x,%08x,%p,%08x,%p,%08x): stub!\n", This, VertexOp, DestIndex, Count, StrideData, VertexTypeDesc, D3D, Flags);
573 return DD_OK;
576 /*****************************************************************************
577 * The VTables
578 *****************************************************************************/
580 const IDirect3DVertexBuffer7Vtbl IDirect3DVertexBuffer7_Vtbl =
582 /*** IUnknown Methods ***/
583 IDirect3DVertexBufferImpl_QueryInterface,
584 IDirect3DVertexBufferImpl_AddRef,
585 IDirect3DVertexBufferImpl_Release,
586 /*** IDirect3DVertexBuffer Methods ***/
587 IDirect3DVertexBufferImpl_Lock,
588 IDirect3DVertexBufferImpl_Unlock,
589 IDirect3DVertexBufferImpl_ProcessVertices,
590 IDirect3DVertexBufferImpl_GetVertexBufferDesc,
591 IDirect3DVertexBufferImpl_Optimize,
592 /*** IDirect3DVertexBuffer7 Methods ***/
593 IDirect3DVertexBufferImpl_ProcessVerticesStrided
596 const IDirect3DVertexBufferVtbl IDirect3DVertexBuffer1_Vtbl =
598 /*** IUnknown Methods ***/
599 Thunk_IDirect3DVertexBufferImpl_1_QueryInterface,
600 Thunk_IDirect3DVertexBufferImpl_1_AddRef,
601 Thunk_IDirect3DVertexBufferImpl_1_Release,
602 /*** IDirect3DVertexBuffer Methods ***/
603 Thunk_IDirect3DVertexBufferImpl_1_Lock,
604 Thunk_IDirect3DVertexBufferImpl_1_Unlock,
605 Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices,
606 Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc,
607 Thunk_IDirect3DVertexBufferImpl_1_Optimize