This topic is now archived and is closed to further replies.

nvtristrip lib problem

This topic is 5711 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I all. I have a problem with nvtristrip lib. I have a model that must be rendered two sided, with many holes, and when I use GenerateStrips, it gives me unwanted triangles that can be seen over holes. The code I use is the following : // NB : m_pSolidIndices is an MFC CArray WORD iNumGroups = 0; PrimitiveGroup *pPrimGroups = NULL; GenerateStrips(m_pSolidIndices->GetData(), m_SolidIndexCount, &pPrimGroups, &iNumGroups); // always generates one group m_pSolidIndicesStrips = new WORD[pPrimGroups->numIndices]; memcpy(m_pSolidIndicesStrips, pPrimGroups->indices, pPrimGroups->numIndices * sizeof(WORD)); m_iNumIndicesStrip = pPrimGroups->numIndices; delete [] pPrimGroups; when I render I use the following code : pd3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE); pd3dDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLESTRIP, 0, m_SolidVertexCount, m_iNumIndicesStrip - 2, m_pSolidIndicesStrips, D3DFMT_INDEX16, m_pSolidVertices->GetData(), sizeof(CUSTOMVERTEXTEXTURE)); The same code works well with triangle lists (when not using nvtristrip). So what''s wrong ? Please help. Thanks in advance. ptl

Share this post

Link to post
Share on other sites