diff --git a/Client/ClientSource/source/EterGrnLib/ModelInstanceRender.cpp b/Client/ClientSource/source/EterGrnLib/ModelInstanceRender.cpp
index e831414..f6cd21b 100644
--- a/Client/ClientSource/source/EterGrnLib/ModelInstanceRender.cpp
+++ b/Client/ClientSource/source/EterGrnLib/ModelInstanceRender.cpp
@@ -231,7 +231,7 @@ void CGrannyModelInstance::RenderMeshNodeListWithOneTexture (CGrannyMesh::EType
CGrannyMaterial& rkMtrl = m_kMtrlPal.GetMaterialRef (pTriGroupNode->mtrlIndex);
rkMtrl.ApplyRenderState();
- STATEMANAGER.DrawIndexedPrimitive (D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
+ STATEMANAGER.DrawIndexedPrimitive (D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount, vtxMeshBasePos);
rkMtrl.RestoreRenderState();
pTriGroupNode = pTriGroupNode->pNextTriGroupNode;
@@ -270,7 +270,7 @@ void CGrannyModelInstance::RenderMeshNodeListWithTwoTexture (CGrannyMesh::EType
const CGrannyMaterial& rkMtrl = m_kMtrlPal.GetMaterialRef (pTriGroupNode->mtrlIndex);
STATEMANAGER.SetTexture (0, rkMtrl.GetD3DTexture (0));
STATEMANAGER.SetTexture (1, rkMtrl.GetD3DTexture (1));
- STATEMANAGER.DrawIndexedPrimitive (D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
+ STATEMANAGER.DrawIndexedPrimitive (D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount, vtxMeshBasePos);
pTriGroupNode = pTriGroupNode->pNextTriGroupNode;
}
/////
@@ -304,7 +304,7 @@ void CGrannyModelInstance::RenderMeshNodeListWithoutTexture (CGrannyMesh::EType
while (pTriGroupNode)
{
ms_faceCount += pTriGroupNode->triCount;
- STATEMANAGER.DrawIndexedPrimitive (D3DPT_TRIANGLELIST, vtxMeshBasePos, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount);
+ STATEMANAGER.DrawIndexedPrimitive (D3DPT_TRIANGLELIST, 0, vtxCount, pTriGroupNode->idxPos, pTriGroupNode->triCount, vtxMeshBasePos);
pTriGroupNode = pTriGroupNode->pNextTriGroupNode;
}
/////
diff --git a/Client/ClientSource/source/EterLib/StateManager.cpp b/Client/ClientSource/source/EterLib/StateManager.cpp
index 09149ad..3fdbe28 100644
--- a/Client/ClientSource/source/EterLib/StateManager.cpp
+++ b/Client/ClientSource/source/EterLib/StateManager.cpp
@@ -895,9 +895,9 @@ HRESULT CStateManager::DrawPrimitiveUP (D3DPRIMITIVETYPE PrimitiveType, UINT Pri
return (m_lpD3DDev->DrawPrimitiveUP (PrimitiveType, PrimitiveCount, pVertexStreamZeroData, VertexStreamZeroStride));
}
-HRESULT CStateManager::DrawIndexedPrimitive (D3DPRIMITIVETYPE PrimitiveType, UINT minIndex, UINT NumVertices, UINT startIndex, UINT primCount)
+HRESULT CStateManager::DrawIndexedPrimitive (D3DPRIMITIVETYPE PrimitiveType, UINT minIndex, UINT NumVertices, UINT startIndex, UINT primCount, INT baseVertexIndex)
{
- return (m_lpD3DDev->DrawIndexedPrimitive (PrimitiveType, minIndex, 0, NumVertices, startIndex, primCount));
+ return (m_lpD3DDev->DrawIndexedPrimitive (PrimitiveType, baseVertexIndex, minIndex, NumVertices, startIndex, primCount));
}
HRESULT CStateManager::DrawIndexedPrimitiveUP (D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertexIndices, UINT PrimitiveCount, CONST void* pIndexData,
diff --git a/Client/ClientSource/source/EterLib/StateManager.h b/Client/ClientSource/source/EterLib/StateManager.h
index f0b9af7..b5cb639 100644
--- a/Client/ClientSource/source/EterLib/StateManager.h
+++ b/Client/ClientSource/source/EterLib/StateManager.h
@@ -358,7 +358,7 @@ class CStateManager : public CSingleton<CStateManager>
HRESULT DrawPrimitive (D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount);
HRESULT DrawPrimitiveUP (D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, const void* pVertexStreamZeroData, UINT VertexStreamZeroStride);
- HRESULT DrawIndexedPrimitive (D3DPRIMITIVETYPE PrimitiveType, UINT minIndex, UINT NumVertices, UINT startIndex, UINT primCount);
+ HRESULT DrawIndexedPrimitive (D3DPRIMITIVETYPE PrimitiveType, UINT minIndex, UINT NumVertices, UINT startIndex, UINT primCount, INT baseVertexIndex = 0);
HRESULT DrawIndexedPrimitiveUP (D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertexIndices, UINT PrimitiveCount, CONST void* pIndexData,
D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride);