Jump to content
  • Advertisement
Sign in to follow this  
sipickles

vertexcaching

This topic is 4888 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!