Fix PrimBuild with non Fixed Function Pipeline.

This commit is contained in:
LuisAntonRebollo 2014-11-08 00:50:25 +01:00
parent c354f59b72
commit fa1b2d87b1
2 changed files with 13 additions and 0 deletions

View file

@ -180,7 +180,18 @@ void end( bool useGenericShaders )
}
if ( useGenericShaders )
{
GFXStateBlock *currentBlock = GFX->getStateBlock();
if (currentBlock && currentBlock->getDesc().samplersDefined)
{
if (currentBlock->getDesc().vertexColorEnable)
GFX->setupGenericShaders( GFXDevice::GSModColorTexture );
else
GFX->setupGenericShaders( GFXDevice::GSTexture );
}
else
GFX->setupGenericShaders( GFXDevice::GSColor );
}
const GFXVertexPCT *srcVerts = mTempVertBuff.address();
U32 numVerts = mCurVertIndex;