Correct a problem with the way that FVF vertex arrays containing

blends or orthographic is calculated.
This commit is contained in:
Oliver Stieber 2005-07-21 11:01:19 +00:00 committed by Alexandre Julliard
parent d1b575e940
commit f8079b6947
1 changed files with 6 additions and 5 deletions

View File

@ -604,12 +604,13 @@ static void primitiveConvertToStridedData(IWineD3DDevice *iface, Direct3DVertexS
/* Blending is numBlends * FLOATs followed by a DWORD for UBYTE4 */
/** do we have to Check This->stateBlock->renderState[D3DRS_INDEXEDVERTEXBLENDENABLE] ? */
numBlends = ((thisFVF & D3DFVF_POSITION_MASK) >> 1) - 2 +
((FALSE == (thisFVF & D3DFVF_LASTBETA_UBYTE4)) ? 0 : -1); /* WARNING can be < 0 because -2 */
if (numBlends > 0) {
canDoViaGLPointers = FALSE;
numBlends = 1 + (((thisFVF & D3DFVF_XYZB5) - D3DFVF_XYZB1) >> 1);
if(thisFVF & D3DFVF_LASTBETA_UBYTE4) numBlends--;
if ((thisFVF & D3DFVF_XYZB5 ) > D3DFVF_XYZRHW) {
TRACE("Setting blend Weights to %p \n", data);
strided->u.s.blendWeights.lpData = data;
strided->u.s.blendWeights.dwType = D3DDECLTYPE_FLOAT1 + (numBlends - 1);
strided->u.s.blendWeights.dwType = D3DDECLTYPE_FLOAT1 + numBlends - 1;
strided->u.s.blendWeights.dwStride = stride;
data += numBlends * sizeof(FLOAT);