mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #926 from BeamNG/primbuild_for_non_ffp
Fix PrimBuild with non Fixed Function Pipeline.
This commit is contained in:
commit
60f4d4f282
2 changed files with 15 additions and 2 deletions
|
|
@ -868,6 +868,8 @@ public:
|
||||||
/// Sets the current stateblock (actually activated in ::updateStates)
|
/// Sets the current stateblock (actually activated in ::updateStates)
|
||||||
virtual void setStateBlock( GFXStateBlock *block );
|
virtual void setStateBlock( GFXStateBlock *block );
|
||||||
|
|
||||||
|
GFXStateBlock* getStateBlock() { return mNewStateBlock; }
|
||||||
|
|
||||||
/// This sets a stateblock directly from the description
|
/// This sets a stateblock directly from the description
|
||||||
/// structure. Its acceptable to use this for debug rendering
|
/// structure. Its acceptable to use this for debug rendering
|
||||||
/// and other low frequency rendering tasks.
|
/// and other low frequency rendering tasks.
|
||||||
|
|
|
||||||
|
|
@ -179,8 +179,19 @@ void end( bool useGenericShaders )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( useGenericShaders )
|
if ( useGenericShaders )
|
||||||
GFX->setupGenericShaders( GFXDevice::GSModColorTexture );
|
{
|
||||||
|
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();
|
const GFXVertexPCT *srcVerts = mTempVertBuff.address();
|
||||||
U32 numVerts = mCurVertIndex;
|
U32 numVerts = mCurVertIndex;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue