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


How to use DrawIndexedPrimitives

Recommended Posts

DirectX 8 SDK example: // This code example assumes the IB is a variable of type // LPDIRECT3DINDEXBUFFER8 and that g_Indices has been properly // initialized with indices // To fill the index buffer, you must lock the buffer to gain // access to the indices. This mechanism is required because index // buffers may be in device memory. VOID* pIndices; if( FAILED( IB->Lock( 0, // Fill from start of the buffer. sizeof(g_Indices), // Size of the data to load. (BYTE**)&pIndices, // Returned index data. 0 ) ) ) // Send default flags to the lock. return E_FAIL; memcpy( pIndices, g_Indices, sizeof(g_Vertices) ); IB->Unlock(); What the hell is g_Indices? What format?

Share this post

Link to post
Share on other sites