H. Verbeet : wined3d: Add IWineD3DDevice_GetBaseVertexIndex to retrieve the base vertex index.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 7 07:20:18 CDT 2007


Module: wine
Branch: master
Commit: 262240adced015599e9a275b60590260781777f2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=262240adced015599e9a275b60590260781777f2

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Wed Jun  6 18:40:02 2007 +0200

wined3d: Add IWineD3DDevice_GetBaseVertexIndex to retrieve the base vertex index.

---

 dlls/wined3d/device.c            |   12 ++++++++++++
 include/wine/wined3d_interface.h |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index afa34c5..28116af 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2813,6 +2813,17 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetBaseVertexIndex(IWineD3DDevice *ifac
     return WINED3D_OK;
 }
 
+static HRESULT WINAPI IWineD3DDeviceImpl_GetBaseVertexIndex(IWineD3DDevice *iface, UINT* base_index) {
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    TRACE("(%p) : base_index %p\n", This, base_index);
+
+    *base_index = This->stateBlock->baseVertexIndex;
+
+    TRACE("Returning %u\n", *base_index);
+
+    return WINED3D_OK;
+}
+
 /*****
  * Get / Set Viewports
  *****/
@@ -6369,6 +6380,7 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
     IWineD3DDeviceImpl_SetIndices,
     IWineD3DDeviceImpl_GetIndices,
     IWineD3DDeviceImpl_SetBaseVertexIndex,
+    IWineD3DDeviceImpl_GetBaseVertexIndex,
     IWineD3DDeviceImpl_SetLight,
     IWineD3DDeviceImpl_GetLight,
     IWineD3DDeviceImpl_SetLightEnable,
diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h
index abefdaf..6402829 100644
--- a/include/wine/wined3d_interface.h
+++ b/include/wine/wined3d_interface.h
@@ -406,6 +406,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
     STDMETHOD(SetIndices)(THIS_ struct IWineD3DIndexBuffer * pIndexData) PURE;
     STDMETHOD(GetIndices)(THIS_ struct IWineD3DIndexBuffer ** ppIndexData,UINT * pBaseVertexIndex) PURE;
     STDMETHOD(SetBaseVertexIndex)(THIS_ UINT baseIndex);
+    STDMETHOD(GetBaseVertexIndex)(THIS_ UINT *baseIndex);
     STDMETHOD(SetLight)(THIS_ DWORD  Index,CONST WINED3DLIGHT * pLight) PURE;
     STDMETHOD(GetLight)(THIS_ DWORD  Index,WINED3DLIGHT * pLight) PURE;
     STDMETHOD(SetLightEnable)(THIS_ DWORD  Index,BOOL  Enable) PURE;
@@ -542,6 +543,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
 #define IWineD3DDevice_SetIndices(p,a)                          (p)->lpVtbl->SetIndices(p,a)
 #define IWineD3DDevice_GetIndices(p,a,b)                        (p)->lpVtbl->GetIndices(p,a,b)
 #define IWineD3DDevice_SetBaseVertexIndex(p, a)                 (p)->lpVtbl->SetBaseVertexIndex(p, a)
+#define IWineD3DDevice_GetBaseVertexIndex(p,a)                  (p)->lpVtbl->GetBaseVertexIndex(p,a)
 #define IWineD3DDevice_SetLight(p,a,b)                          (p)->lpVtbl->SetLight(p,a,b)
 #define IWineD3DDevice_GetLight(p,a,b)                          (p)->lpVtbl->GetLight(p,a,b)
 #define IWineD3DDevice_SetLightEnable(p,a,b)                    (p)->lpVtbl->SetLightEnable(p,a,b)




More information about the wine-cvs mailing list