Commit f8079b69 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

Correct a problem with the way that FVF vertex arrays containing

blends or orthographic is calculated.
parent d1b575e9
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment