Jump to content
  • Advertisement

Archived

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

GeorgeV

Vertex buffer

This topic is 5870 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 want to change the vertices properties in the vertex buffer, but this work ONLY ONCE, then the "pVertices[j].p *= xVariable;" line do nothing. What's wrong? Thanks: George Varga The Code for create: -------------------- m_pXFileObject = new CD3DMesh(); m_pXFileObject->Create( m_pd3dDevice, strXFileBuffer ); m_pXFileObject->SetFVF( m_pd3dDevice, D3DFVF_MODELVERTEX ); The Code for manage: -------------------- m_pXFileObject->GetSysMemMesh()->GetVertexBuffer( &pVB ); dwNumVertices = m_pXFileObject[x]->GetSysMemMesh()->GetNumVertices(); pVB->Lock( 0, 0, (BYTE**)&pVertices, 0 ); for( DWORD j=0; j < dwNumVertices; j++ ) { pVertices[j].p *= xVariable; } pVB->Unlock(); pVB->Release(); [edited by - GeorgeV on August 30, 2002 3:10:43 PM]

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the answer.

The increment for "for" was correct, but the HTML list not show correct the for increment line. I changed.

George Varga


[edited by - GeorgeV on August 30, 2002 3:13:17 PM]

Share this post


Link to post
Share on other sites
Thanks for the answer.

I modified the code: must reinitialize the "DeviceObjects" with "m_pXFileObject" and "m_pd3dDevice", then I can modified the vertices in vertex buffer in every frame.

George Varga

Share this post


Link to post
Share on other sites

  • 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!