ddraw: Use a less offensive handle table implementation for matrices.
[wine/hramrach.git] / dlls / ddraw / vertexbuffer.c
blobf16cf1243927af0c7fd161e5d04df62ddcab6ac8
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);
47 /*****************************************************************************
48 * IUnknown Methods
49 *****************************************************************************/
51 /*****************************************************************************
52 * IDirect3DVertexBuffer7::QueryInterface
54 * The QueryInterface Method for Vertex Buffers
55 * For a link to QueryInterface rules, see IDirectDraw7::QueryInterface
57 * Params
58 * riid: Queryied Interface id
59 * obj: Address to return the interface pointer
61 * Returns:
62 * S_OK on success
63 * E_NOINTERFACE if the interface wasn't found
65 *****************************************************************************/
66 static HRESULT WINAPI
67 IDirect3DVertexBufferImpl_QueryInterface(IDirect3DVertexBuffer7 *iface,
68 REFIID riid,
69 void **obj)
71 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
72 TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), obj);
74 /* By default, set the object pointer to NULL */
75 *obj = NULL;
77 if ( IsEqualGUID( &IID_IUnknown, riid ) )
79 IUnknown_AddRef(iface);
80 *obj = iface;
81 TRACE(" Creating IUnknown interface at %p.\n", *obj);
82 return S_OK;
84 if ( IsEqualGUID( &IID_IDirect3DVertexBuffer, riid ) )
86 IUnknown_AddRef(iface);
87 *obj = &This->IDirect3DVertexBuffer_vtbl;
88 TRACE(" Creating IDirect3DVertexBuffer interface %p\n", *obj);
89 return S_OK;
91 if ( IsEqualGUID( &IID_IDirect3DVertexBuffer7, riid ) )
93 IUnknown_AddRef(iface);
94 *obj = iface;
95 TRACE(" Creating IDirect3DVertexBuffer7 interface %p\n", *obj);
96 return S_OK;
98 FIXME("(%p): interface for IID %s NOT found!\n", This, debugstr_guid(riid));
99 return E_NOINTERFACE;
102 static HRESULT WINAPI
103 Thunk_IDirect3DVertexBufferImpl_1_QueryInterface(IDirect3DVertexBuffer *iface,
104 REFIID riid,
105 void **obj)
107 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
108 TRACE_(ddraw_thunk)("(%p)->(%s,%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, debugstr_guid(riid), obj);
110 return IDirect3DVertexBuffer7_QueryInterface((IDirect3DVertexBuffer7 *)This, riid, obj);
113 /*****************************************************************************
114 * IDirect3DVertexBuffer7::AddRef
116 * AddRef for Vertex Buffers
118 * Returns:
119 * The new refcount
121 *****************************************************************************/
122 static ULONG WINAPI
123 IDirect3DVertexBufferImpl_AddRef(IDirect3DVertexBuffer7 *iface)
125 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
126 ULONG ref = InterlockedIncrement(&This->ref);
128 TRACE("(%p/%p)->() incrementing from %u.\n", This, iface, ref - 1);
130 return ref;
133 static ULONG WINAPI
134 Thunk_IDirect3DVertexBufferImpl_1_AddRef(IDirect3DVertexBuffer *iface)
136 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
137 TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DVertexBuffer7 interface.\n", This);
139 return IDirect3DVertexBuffer7_AddRef((IDirect3DVertexBuffer7 *)This);
143 /*****************************************************************************
144 * IDirect3DVertexBuffer7::Release
146 * Release for Vertex Buffers
148 * Returns:
149 * The new refcount
151 *****************************************************************************/
152 static ULONG WINAPI
153 IDirect3DVertexBufferImpl_Release(IDirect3DVertexBuffer7 *iface)
155 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
156 ULONG ref = InterlockedDecrement(&This->ref);
158 TRACE("(%p)->() decrementing from %u.\n", This, ref + 1);
160 if (ref == 0)
162 IWineD3DBuffer *curVB = NULL;
163 UINT offset, stride;
165 EnterCriticalSection(&ddraw_cs);
166 /* D3D7 Vertex buffers don't stay bound in the device, they are passed as a parameter
167 * to drawPrimitiveVB. DrawPrimitiveVB sets them as the stream source in wined3d,
168 * and they should get unset there before they are destroyed
170 IWineD3DDevice_GetStreamSource(This->ddraw->wineD3DDevice,
171 0 /* Stream number */,
172 &curVB,
173 &offset,
174 &stride);
175 if(curVB == This->wineD3DVertexBuffer)
177 IWineD3DDevice_SetStreamSource(This->ddraw->wineD3DDevice,
178 0 /* Steam number */,
179 NULL /* stream data */,
180 0 /* Offset */,
181 0 /* stride */);
183 if(curVB)
185 IWineD3DBuffer_Release(curVB); /* For the GetStreamSource */
188 IWineD3DVertexDeclaration_Release(This->wineD3DVertexDeclaration);
189 IWineD3DBuffer_Release(This->wineD3DVertexBuffer);
190 LeaveCriticalSection(&ddraw_cs);
191 HeapFree(GetProcessHeap(), 0, This);
193 return 0;
195 return ref;
198 static ULONG WINAPI
199 Thunk_IDirect3DVertexBufferImpl_1_Release(IDirect3DVertexBuffer *iface)
201 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
202 TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DVertexBuffer7 interface.\n", This);
204 return IDirect3DVertexBuffer7_Release((IDirect3DVertexBuffer7 *)This);
207 /*****************************************************************************
208 * IDirect3DVertexBuffer Methods
209 *****************************************************************************/
211 /*****************************************************************************
212 * IDirect3DVertexBuffer7::Lock
214 * Locks the vertex buffer and returns a pointer to the vertex data
215 * Locking vertex buffers is similar to locking surfaces, because Windows
216 * uses surfaces to store vertex data internally (According to the DX sdk)
218 * Params:
219 * Flags: Locking flags. Relevant here are DDLOCK_READONLY, DDLOCK_WRITEONLY,
220 * DDLOCK_DISCARDCONTENTS and DDLOCK_NOOVERWRITE.
221 * Data: Returns a pointer to the vertex data
222 * Size: Returns the size of the buffer if not NULL
224 * Returns:
225 * D3D_OK on success
226 * DDERR_INVALIDPARAMS if Data is NULL
227 * D3DERR_VERTEXBUFFEROPTIMIZED if called on an optimized buffer(WineD3D)
229 *****************************************************************************/
230 static HRESULT WINAPI
231 IDirect3DVertexBufferImpl_Lock(IDirect3DVertexBuffer7 *iface,
232 DWORD Flags,
233 void **Data,
234 DWORD *Size)
236 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
237 WINED3DBUFFER_DESC Desc;
238 HRESULT hr;
239 DWORD wined3d_flags = 0;
240 TRACE("(%p)->(%08x,%p,%p)\n", This, Flags, Data, Size);
242 /* Writeonly: Pointless. Event: Unsupported by native according to the sdk
243 * nosyslock: Not applicable
245 if(!(Flags & DDLOCK_WAIT)) wined3d_flags |= WINED3DLOCK_DONOTWAIT;
246 if(Flags & DDLOCK_READONLY) wined3d_flags |= WINED3DLOCK_READONLY;
247 if(Flags & DDLOCK_NOOVERWRITE) wined3d_flags |= WINED3DLOCK_NOOVERWRITE;
248 if(Flags & DDLOCK_DISCARDCONTENTS) wined3d_flags |= WINED3DLOCK_DISCARD;
250 EnterCriticalSection(&ddraw_cs);
251 if(Size)
253 /* Get the size, for returning it, and for locking */
254 hr = IWineD3DBuffer_GetDesc(This->wineD3DVertexBuffer, &Desc);
255 if(hr != D3D_OK)
257 ERR("(%p) IWineD3DBuffer::GetDesc failed with hr=%08x\n", This, hr);
258 LeaveCriticalSection(&ddraw_cs);
259 return hr;
261 *Size = Desc.Size;
264 hr = IWineD3DBuffer_Map(This->wineD3DVertexBuffer, 0 /* OffsetToLock */,
265 0 /* SizeToLock, 0 == Full lock */, (BYTE **)Data, wined3d_flags);
266 LeaveCriticalSection(&ddraw_cs);
267 return hr;
270 static HRESULT WINAPI
271 Thunk_IDirect3DVertexBufferImpl_1_Lock(IDirect3DVertexBuffer *iface,
272 DWORD Flags,
273 void **Data,
274 DWORD *Size)
276 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
277 TRACE_(ddraw_thunk)("(%p)->(%08x,%p,%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, Flags, Data, Size);
279 return IDirect3DVertexBuffer7_Lock((IDirect3DVertexBuffer7 *)This, Flags, Data, Size);
282 /*****************************************************************************
283 * IDirect3DVertexBuffer7::Unlock
285 * Unlocks a vertex Buffer
287 * Returns:
288 * D3D_OK on success
290 *****************************************************************************/
291 static HRESULT WINAPI
292 IDirect3DVertexBufferImpl_Unlock(IDirect3DVertexBuffer7 *iface)
294 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
295 HRESULT hr;
296 TRACE("(%p)->()\n", This);
298 EnterCriticalSection(&ddraw_cs);
299 hr = IWineD3DBuffer_Unmap(This->wineD3DVertexBuffer);
300 LeaveCriticalSection(&ddraw_cs);
302 return hr;
305 static HRESULT WINAPI
306 Thunk_IDirect3DVertexBufferImpl_1_Unlock(IDirect3DVertexBuffer *iface)
308 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
309 TRACE_(ddraw_thunk)("(%p)->() thunking to IDirect3DVertexBuffer7 interface.\n", This);
311 return IDirect3DVertexBuffer7_Unlock((IDirect3DVertexBuffer7 *)This);
315 /*****************************************************************************
316 * IDirect3DVertexBuffer7::ProcessVertices
318 * Processes untransformed Vertices into a transformed or optimized vertex
319 * buffer. It can also perform other operations, such as lighting or clipping
321 * Params
322 * VertexOp: Operation(s) to perform: D3DVOP_CLIP, _EXTENTS, _LIGHT, _TRANSFORM
323 * DestIndex: Index in the destination buffer(This), where the vertices are
324 * placed
325 * Count: Number of Vertices in the Source buffer to process
326 * SrcBuffer: Source vertex buffer
327 * SrcIndex: Index of the first vertex in the src buffer to process
328 * D3DDevice: Device to use for transformation
329 * Flags: 0 for default, D3DPV_DONOTCOPYDATA to prevent copying
330 * unchaned vertices
332 * Returns:
333 * D3D_OK on success
334 * DDERR_INVALIDPARAMS If D3DVOP_TRANSFORM wasn't passed
336 *****************************************************************************/
337 static HRESULT WINAPI
338 IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexBuffer7 *iface,
339 DWORD VertexOp,
340 DWORD DestIndex,
341 DWORD Count,
342 IDirect3DVertexBuffer7 *SrcBuffer,
343 DWORD SrcIndex,
344 IDirect3DDevice7 *D3DDevice,
345 DWORD Flags)
347 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
348 IDirect3DVertexBufferImpl *Src = (IDirect3DVertexBufferImpl *)SrcBuffer;
349 IDirect3DDeviceImpl *D3D = (IDirect3DDeviceImpl *)D3DDevice;
350 BOOL oldClip, doClip;
351 HRESULT hr;
353 TRACE("(%p)->(%08x,%d,%d,%p,%d,%p,%08x)\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
355 /* Vertex operations:
356 * D3DVOP_CLIP: Clips vertices outside the viewing frustrum. Needs clipping information
357 * in the vertex buffer (Buffer may not be created with D3DVBCAPS_DONOTCLIP)
358 * D3DVOP_EXTENTS: Causes the screen extents to be updated when rendering the vertices
359 * D3DVOP_LIGHT: Lights the vertices
360 * D3DVOP_TRANSFORM: Transform the vertices. This flag is necessary
362 * WineD3D only transforms and clips the vertices by now, so EXTENTS and LIGHT
363 * are not implemented. Clipping is disabled ATM, because of unsure conditions.
365 if( !(VertexOp & D3DVOP_TRANSFORM) ) return DDERR_INVALIDPARAMS;
367 EnterCriticalSection(&ddraw_cs);
368 /* WineD3D doesn't know d3d7 vertex operation, it uses
369 * render states instead. Set the render states according to
370 * the vertex ops
372 doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE;
373 IWineD3DDevice_GetRenderState(D3D->wineD3DDevice,
374 WINED3DRS_CLIPPING,
375 (DWORD *) &oldClip);
376 if(doClip != oldClip)
378 IWineD3DDevice_SetRenderState(D3D->wineD3DDevice,
379 WINED3DRS_CLIPPING,
380 doClip);
383 IWineD3DDevice_SetStreamSource(D3D->wineD3DDevice,
384 0, /* Stream No */
385 Src->wineD3DVertexBuffer,
386 0, /* Offset */
387 get_flexible_vertex_size(Src->fvf));
388 IWineD3DDevice_SetVertexDeclaration(D3D->wineD3DDevice,
389 Src->wineD3DVertexDeclaration);
390 hr = IWineD3DDevice_ProcessVertices(D3D->wineD3DDevice,
391 SrcIndex,
392 DestIndex,
393 Count,
394 This->wineD3DVertexBuffer,
395 NULL /* Output vdecl */,
396 Flags,
397 This->fvf);
399 /* Restore the states if needed */
400 if(doClip != oldClip)
401 IWineD3DDevice_SetRenderState(D3D->wineD3DDevice,
402 WINED3DRS_CLIPPING,
403 oldClip);
404 LeaveCriticalSection(&ddraw_cs);
405 return hr;
408 static HRESULT WINAPI
409 Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices(IDirect3DVertexBuffer *iface,
410 DWORD VertexOp,
411 DWORD DestIndex,
412 DWORD Count,
413 IDirect3DVertexBuffer *SrcBuffer,
414 DWORD SrcIndex,
415 IDirect3DDevice3 *D3DDevice,
416 DWORD Flags)
418 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
419 IDirect3DVertexBufferImpl *Src = SrcBuffer ? vb_from_vb1(SrcBuffer) : NULL;
420 IDirect3DDeviceImpl *D3D = D3DDevice ? device_from_device3(D3DDevice) : NULL;
422 TRACE_(ddraw_thunk)("(%p)->(%08x,%08x,%08x,%p,%08x,%p,%08x) thunking to IDirect3DVertexBuffer7 interface.\n", This, VertexOp, DestIndex, Count, Src, SrcIndex, D3D, Flags);
424 return IDirect3DVertexBuffer7_ProcessVertices((IDirect3DVertexBuffer7 *)This, VertexOp, DestIndex,
425 Count, (IDirect3DVertexBuffer7 *)Src, SrcIndex, (IDirect3DDevice7 *)D3D, Flags);
428 /*****************************************************************************
429 * IDirect3DVertexBuffer7::GetVertexBufferDesc
431 * Returns the description of a vertex buffer
433 * Params:
434 * Desc: Address to write the description to
436 * Returns
437 * DDERR_INVALIDPARAMS if Desc is NULL
438 * D3D_OK on success
440 *****************************************************************************/
441 static HRESULT WINAPI
442 IDirect3DVertexBufferImpl_GetVertexBufferDesc(IDirect3DVertexBuffer7 *iface,
443 D3DVERTEXBUFFERDESC *Desc)
445 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
446 WINED3DBUFFER_DESC WDesc;
447 HRESULT hr;
448 TRACE("(%p)->(%p)\n", This, Desc);
450 if(!Desc) return DDERR_INVALIDPARAMS;
452 EnterCriticalSection(&ddraw_cs);
453 hr = IWineD3DBuffer_GetDesc(This->wineD3DVertexBuffer, &WDesc);
454 if(hr != D3D_OK)
456 ERR("(%p) IWineD3DBuffer::GetDesc failed with hr=%08x\n", This, hr);
457 LeaveCriticalSection(&ddraw_cs);
458 return hr;
461 /* Now fill the Desc structure */
462 Desc->dwCaps = This->Caps;
463 Desc->dwFVF = This->fvf;
464 Desc->dwNumVertices = WDesc.Size / get_flexible_vertex_size(This->fvf);
465 LeaveCriticalSection(&ddraw_cs);
467 return D3D_OK;
470 static HRESULT WINAPI
471 Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc(IDirect3DVertexBuffer *iface,
472 D3DVERTEXBUFFERDESC *Desc)
474 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
475 TRACE_(ddraw_thunk)("(%p)->(%p) thunking to IDirect3DVertexBuffer7 interface.\n", This, Desc);
477 return IDirect3DVertexBuffer7_GetVertexBufferDesc((IDirect3DVertexBuffer7 *)This, Desc);
481 /*****************************************************************************
482 * IDirect3DVertexBuffer7::Optimize
484 * Converts an unoptimized vertex buffer into an optimized buffer
486 * Params:
487 * D3DDevice: Device for which this buffer is optimized
488 * Flags: Not used, should be set to 0
490 * Returns
491 * D3D_OK, because it's a stub
493 *****************************************************************************/
494 static HRESULT WINAPI
495 IDirect3DVertexBufferImpl_Optimize(IDirect3DVertexBuffer7 *iface,
496 IDirect3DDevice7 *D3DDevice,
497 DWORD Flags)
499 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
500 IDirect3DDeviceImpl *D3D = (IDirect3DDeviceImpl *)D3DDevice;
501 static BOOL hide = FALSE;
503 if (!hide)
505 FIXME("(%p)->(%p,%08x): stub!\n", This, D3D, Flags);
506 hide = TRUE;
509 /* We could forward this call to WineD3D and take advantage
510 * of it once we use OpenGL vertex buffers
512 EnterCriticalSection(&ddraw_cs);
513 This->Caps |= D3DVBCAPS_OPTIMIZED;
514 LeaveCriticalSection(&ddraw_cs);
516 return DD_OK;
519 static HRESULT WINAPI
520 Thunk_IDirect3DVertexBufferImpl_1_Optimize(IDirect3DVertexBuffer *iface,
521 IDirect3DDevice3 *D3DDevice,
522 DWORD Flags)
524 IDirect3DVertexBufferImpl *This = vb_from_vb1(iface);
525 IDirect3DDeviceImpl *D3D = D3DDevice ? device_from_device3(D3DDevice) : NULL;
526 TRACE_(ddraw_thunk)("(%p)->(%p,%08x) thunking to IDirect3DVertexBuffer7 interface.\n", This, D3D, Flags);
528 return IDirect3DVertexBuffer7_Optimize((IDirect3DVertexBuffer7 *)This, (IDirect3DDevice7 *)D3D, Flags);
531 /*****************************************************************************
532 * IDirect3DVertexBuffer7::ProcessVerticesStrided
534 * This method processes untransformed strided vertices into a processed
535 * or optimized vertex buffer.
537 * For more details on the parameters, see
538 * IDirect3DVertexBuffer7::ProcessVertices
540 * Params:
541 * VertexOp: Operations to perform
542 * DestIndex: Destination index to write the vertices to
543 * Count: Number of input vertices
544 * StrideData: Array containing the input vertices
545 * VertexTypeDesc: Vertex Description or source index?????????
546 * D3DDevice: IDirect3DDevice7 to use for processing
547 * Flags: Can be D3DPV_DONOTCOPYDATA to avoid copying unmodified vertices
549 * Returns
550 * D3D_OK on success, or DDERR_*
552 *****************************************************************************/
553 static HRESULT WINAPI
554 IDirect3DVertexBufferImpl_ProcessVerticesStrided(IDirect3DVertexBuffer7 *iface,
555 DWORD VertexOp,
556 DWORD DestIndex,
557 DWORD Count,
558 D3DDRAWPRIMITIVESTRIDEDDATA *StrideData,
559 DWORD VertexTypeDesc,
560 IDirect3DDevice7 *D3DDevice,
561 DWORD Flags)
563 IDirect3DVertexBufferImpl *This = (IDirect3DVertexBufferImpl *)iface;
564 IDirect3DDeviceImpl *D3D = (IDirect3DDeviceImpl *)D3DDevice;
565 FIXME("(%p)->(%08x,%08x,%08x,%p,%08x,%p,%08x): stub!\n", This, VertexOp, DestIndex, Count, StrideData, VertexTypeDesc, D3D, Flags);
566 return DD_OK;
569 /*****************************************************************************
570 * The VTables
571 *****************************************************************************/
573 const IDirect3DVertexBuffer7Vtbl IDirect3DVertexBuffer7_Vtbl =
575 /*** IUnknown Methods ***/
576 IDirect3DVertexBufferImpl_QueryInterface,
577 IDirect3DVertexBufferImpl_AddRef,
578 IDirect3DVertexBufferImpl_Release,
579 /*** IDirect3DVertexBuffer Methods ***/
580 IDirect3DVertexBufferImpl_Lock,
581 IDirect3DVertexBufferImpl_Unlock,
582 IDirect3DVertexBufferImpl_ProcessVertices,
583 IDirect3DVertexBufferImpl_GetVertexBufferDesc,
584 IDirect3DVertexBufferImpl_Optimize,
585 /*** IDirect3DVertexBuffer7 Methods ***/
586 IDirect3DVertexBufferImpl_ProcessVerticesStrided
589 const IDirect3DVertexBufferVtbl IDirect3DVertexBuffer1_Vtbl =
591 /*** IUnknown Methods ***/
592 Thunk_IDirect3DVertexBufferImpl_1_QueryInterface,
593 Thunk_IDirect3DVertexBufferImpl_1_AddRef,
594 Thunk_IDirect3DVertexBufferImpl_1_Release,
595 /*** IDirect3DVertexBuffer Methods ***/
596 Thunk_IDirect3DVertexBufferImpl_1_Lock,
597 Thunk_IDirect3DVertexBufferImpl_1_Unlock,
598 Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices,
599 Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc,
600 Thunk_IDirect3DVertexBufferImpl_1_Optimize