Skip to main content
gamedev.net
🔒 Locked

Meshes...

Started by Zoot Oct 26, 2002 at 5:32 PM 1 replies 600+ views
Original Post
Zoot
Zoot
I am creating all my meshes manualy and it works fine.. but it seems strange that i need to set all three position of the ploygon.. te.x: If a mesh is a box, it has 8 vertexs and if i set three vertexs per polygon it is 36 vertexs in memory.. wouldn´t it be better if i could set three indexs on each polygon? this is my code.. D3DVertex* pVertices; m_pMesh->LockVertexBuffer(D3DLOCK_DISCARD, (BYTE**)&pVertices); for (x = 0; x < numPolygons; x++) { ... } I hope there is a better way doing this then mine...
GSACP: GameDev Society Against Crap PostingTo join: Put these lines in your signature and don't post crap!
Bloodshot Eye
Bloodshot Eye
See the entries for

IDirect3DDevice8::DrawIndexedPrimitive
IDirect3DDevice8::SetIndices

in the directx documentation.
When things are dim give ''em VIM
Zoot
Zoot
I have looked at it, but the dx documentation isn´t very usefull for a beginner...
GSACP: GameDev Society Against Crap PostingTo join: Put these lines in your signature and don't post crap!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.