Archived

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

last-bastardo

Vertex buffer troubles

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 (which are of format ZRHW 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, if anybody has any idea please help -=Last Bastardo=-

Share this post


Link to post
Share on other sites