Jump to content
  • Advertisement
Sign in to follow this  
Aragon

X file ... only 1 short question this time )

This topic is 5025 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 again ... last time i asked how i can accsess vertices of an mesh, i got accsess..but a bit other that i want ;) i got some piece of my code here: when nr==0 then it manipulating the correct vertices..but when nr==1 it does not change position of vertices 1..it change the textur coords of 0 ... when nr==2 it changes color of vertices 2 ... it drives me mad... what code is missing to get the right things... (nr==12 : position change of vertice #12) //------------------------------------- struct Vertex { D3DXVECTOR3 position; D3DXVECTOR3 normal; DWORD color; FLOAT tu , tv; FLOAT tu2, tv2; FLOAT tu3, tv3; enum FVF { FVF_Flags = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE |D3DFVF_TEX3 }; }; Vertex* pVertices; // -------------------------------------- g_pd3dDevice->SetFVF( Vertex::FVF_Flags ); LPDIRECT3DVERTEXBUFFER9 ppVB_edit = NULL; g_pMesh[55]->GetVertexBuffer (&ppVB_edit); int nr=12; ppVB_edit->Lock( 0, 1000*sizeof(Vertex), (void**)&pVertices, D3DLOCK_DISCARD ); //simple test pVertices[nr].position = D3DXVECTOR3(0,0,2*sin((water_offset*10)*3.141593/180)); ppVB_edit->Unlock(); ... g_pMesh[55]->DrawSubset(0);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!