Jump to content
  • Advertisement

Archived

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

last-bastardo

Need help urgently

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

If I Lock and create my vertex buffer with Buf->Lock(0, 0, (BYTE **)&vtxs, D3DLOCK_DISCARD); memcpy(vtxs, Part.vtx, sizeof(Part.vtx)); Buf->Unlock(); Where Part.vtx is an array of 4 vectors (which are of format ZRHW i.e. they are proccessed, in screen space) everything is ok but when I use Buf->Lock(0, 0, (BYTE **)&vtxs, D3DLOCK_DISCARD); vtxs[0] = Part.getVtx[0]; vtxs[1] = Part.getVtx[1]; vtxs[2] = Part.getVtx[2]; vtxs[3] = Part.getVtx[3]; Buf->Unlock(); Where getVtx just returns a vertex from that array, then nothing renders. What am I doing wrong ? CVec4 getVtx(int num) { return vtx[num]; } (Code for getVtx). So all I need to figure out is why the second one doesn''t work. As that is the one I need to use. -=Last Bastardo=-

Share this post


Link to post
Share on other sites
Advertisement
Define "vtxs" as a pointer to whatever type you are defineing vertices with, ie "MYVERTEX* vtxs;", where MYVERTEX is the type that cooresponds with the FVF you created the VB with.

Z.

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.

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

Sign me up!