Jump to content
  • Advertisement


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


Vertex Buffer : I am back nearly there, just a bit more help

This topic is 6295 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 well I have finally located where my problem is now I just need to figure out what to do about it. Ok when 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 (whish are of format XYZRHW i.e. proccessed) 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 enders. 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. Also I was just wandering if anybody know how to set the alpha for a whole surface (so I can do fade in''s and outs) and also how to check the alpha of every pixel. But the vertex buffer is the most important somebody PLEASE help -=Last Bastardo=-

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!