• Advertisement

Archived

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

vbs and processvertices, how?

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

first, is this ok?:
if (SUCCEEDED(lpd3dvb->Lock(DDLOCK_WAIT,&lpdata,NULL)))
{
//list is any array of three D3DVERTEX,
//already filled in
memcpy(lpdata,list,sizeof(D3DVERTEX) * 3);
lpd3dvb->Unlock();
}
and, if i wanted to process the above vb, with D3DVERTEX format into transformed, clipped, but unlight, except ambient, what FVF format do i need to use for the dest vb? i got really confused here, or something else is wrong...

Share this post


Link to post
Share on other sites
Advertisement
DO NOT USE PROCESSVERTICES!!!!

Whenever you do a draw primitive call with an untransformed vb, it will do the transformations for you, in hardware if possible. You don't need to call ProcessVertices before rendering.

ProcessVertices() will always be done on the CPU, never in hardware. Even if you have a GeForce 256 or some other hardware TnL card, ProcessVertices() will not use it.


If you want to use ProcessVertices for some other reason, if you're using a D3DFVF_VERTEX format, your destination VB should have the format D3DFVF_TLVERTEX. Call ProcessVertices() with D3DVOP_CLIP | D3DVOP_LIGHT | D3DVOP_TRANSFORM.

Share this post


Link to post
Share on other sites

  • Advertisement