Hi.
Any idea why when primitive count > D3DCAPS8.MaxPrimitiveCount, and have to do many DrawPrimitive() calls, first call draw tris but subsequent no
if(_plCurDG->ulNumTriangles > _plEngine->xcDevCaps.MaxPrimitiveCount)
{
ULONG stari;
ULONG NumTris = 1000;
for(starti = 0; starti < _plCurDG->ulNumVertices ; starti += 3*NumTris)
{
ULONG RenderTris = 0;
if((_plCurDG->ulNumTriangles-(starti/3)) < NumTris)
RenderTris = _plCurDG->ulNumTriangles-(starti/3);
else
RenderTris = NumTris;
if(FAILED(_hr = IDirect3DDevice8_DrawPrimitive(_xDev,D3DPT_TRIANGLELIST,starti,RenderTris)))
{
assert(0);
return FALSE;
}
}
}
Any idea why when primitive count > D3DCAPS8.MaxPrimitiveCount, and have to do many DrawPrimitive() calls, first call draw tris but subsequent no
if(_plCurDG->ulNumTriangles > _plEngine->xcDevCaps.MaxPrimitiveCount)
{
ULONG stari;
ULONG NumTris = 1000;
for(starti = 0; starti < _plCurDG->ulNumVertices ; starti += 3*NumTris)
{
ULONG RenderTris = 0;
if((_plCurDG->ulNumTriangles-(starti/3)) < NumTris)
RenderTris = _plCurDG->ulNumTriangles-(starti/3);
else
RenderTris = NumTris;
if(FAILED(_hr = IDirect3DDevice8_DrawPrimitive(_xDev,D3DPT_TRIANGLELIST,starti,RenderTris)))
{
assert(0);
return FALSE;
}
}
}