hResult = p3DDevice->DrawPrimitive( D3DPT_LINELIST, iNumDone,
(int)(iNumMaxVerts/2) );
and
hResult = p3DDevice->DrawPrimitive( D3DPT_POINTLIST, iNumDone,
(int)(iNumMaxVerts) );
where iNumMaxVerts is gained by querying the capabilities of the Device
(1048575).
I am finding that after some time, after I do an EndScene ahd Present to the
sceen, I am not getting any rendering occurring. It is as if there is a
maximum number of primitives that can be rendered to a device on any one
rendering. Is this correct? If I call LINESTRIP rather than LINELIST for
example it seems to work OK, but then I am creating one long line then rather
than many short two point lines, which I is what am want in this case. Note
that I am not exceeding the MaxPrimitiveCount per DrawPrimitive call.
The DrawPrimitive calls are happening for many vertext buffers...
for (int i = 0; i < pCrossVBs.GetCount(); i++){
p3DDevice->SetStreamSource(0, pCrossVBs[i], 0, sizeof( CROSSVERTEX ));
p3DDevice->SetFVF( D3DFVF_CROSSVERTEX );
if (iNumLeftA > iNumMaxVerts ){
hResult = p3DDevice->DrawPrimitive( D3DPT_LINELIST, iNumDone,
(int)(iNumMaxVerts/2) );
iNumDone += iNumMaxVerts;
iNumLeftA -= iNumMaxVerts;
... etc
Standard questions apply:
- all HRESULTs checked?
- no messages from the debug runtime?
- works the same on REF?
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>
Legalize Adulthood! <http://legalizeadulthood.wordpress.com>