Sign in to follow this  
sipickles

vertexcaching

Recommended Posts

Hi, I have been playing with vertex caching, found here. I am having a bit of trouble tho, when it comes to the 'draw' call. HRESULT Draw(LPDIRECT3DDEVICE9 lpDevice,UINT numVertices,UINT numIndices,const WORD *pIndexData, const void *pVertexStreamZeroData) I have been calling: terrainCache->Draw(_device, _numVertices, _numTriangles * 3,_ib, _vb); but get this error: error C2664: 'Draw' : cannot convert parameter 4 from 'struct IDirect3DIndexBuffer9 *' to 'const unsigned short *' Has anyone else used this source code? WHat pointer am I supposed to be sending for pIndexData and pVertexStreamZeroData? Thanks Simon

Share this post


Link to post
Share on other sites
The class contains its own D3D9 vertex and index buffer objects.. it seems you just feed it raw data to the Draw method (what you would feed to the objects between Lock and Unlock calls).

You appear to be feeding it supplemental vertex and index objects you've created yourself and already copied the vertex & index data to.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this