DirectX rendering path, AHHHHHH, please help.

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
dabeav
Posts: 47
Joined: Fri Jan 23, 2004 6:50 pm

DirectX rendering path, AHHHHHH, please help.

Post by dabeav »

Ok, I have being playing w/ this ALL ***BLEEPIN*** day. I cant seem to get the directX8 rendering path to work correctly w/ the tri_stripper routine I have been integrating. Currently things render fine w/ software mode and opengl mode, so i know its just directX giving me crap. I was wondering if anyone knew what I was doing wrong, here is my code.

When rendering just triangles I do this (This seems to work fine)

pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST, 0, vertexCount, (*strips).m_Indices.size()/3, &(*strips).m_Indices[0], D3DFMT_INDEX32, vertices,sizeof(S3DVertex));

In the above (*strips).m_Indices is just a triangle index 3 values for each triangle, each indice points to part of the array in vertices.


But, when I render w/triangle strips I have problems. It seems to render parts of the strips fine, but then it has pieces of the strip that all seem to streach off to one point (all strips seam to streach to just that point). Here is that code.

pID3DDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLESTRIP, 0, vertexCount, (*strips).m_Indices.size()-2, &(*strips).m_Indices[0], D3DFMT_INDEX32, vertices, sizeof(S3DVertex));

In the above, (*strips).m_Indices points to a strip array (meaning first 3 indices define a poly, then all consecutive indices create a poly each).

Any ideas? I am REALY not a big DX person.
dabeav
Posts: 47
Joined: Fri Jan 23, 2004 6:50 pm

Post by dabeav »

I FIXED IT, I FIXED IT. lol.
Post Reply