mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 04:45:31 +00:00
Use GFXDevice::setupGenericShaders for support non Fixed Fuction Pipelines.
OpenGL and DirectX11 not support FFP, and GFDevice::disableShaders has not the necessary information to decide the shader to be used. GFDevice::SetupGenericShaders is used instead of GFDevice::disableShaders. GFDevice::disableShaders will be deprecated on T3D 4.0
This commit is contained in:
parent
2142d452d4
commit
33742599b3
12 changed files with 14 additions and 16 deletions
|
|
@ -60,7 +60,6 @@ void FontRenderBatcher::render( F32 rot, const Point2F &offset )
|
|||
return;
|
||||
|
||||
GFX->setStateBlock(mFontSB);
|
||||
GFX->disableShaders();
|
||||
for(U32 i = 0; i < GFX->getNumSamplers(); i++)
|
||||
GFX->setTexture(i, NULL);
|
||||
|
||||
|
|
@ -177,6 +176,7 @@ void FontRenderBatcher::render( F32 rot, const Point2F &offset )
|
|||
AssertFatal(currentPt <= mLength * 6, "FontRenderBatcher::render - too many verts for length of string!");
|
||||
|
||||
GFX->setVertexBuffer(verts);
|
||||
GFX->setupGenericShaders( GFXDevice::GSAddColorTexture );
|
||||
|
||||
// Now do an optimal render!
|
||||
for( S32 i = 0; i < mSheets.size(); i++ )
|
||||
|
|
@ -186,8 +186,7 @@ void FontRenderBatcher::render( F32 rot, const Point2F &offset )
|
|||
|
||||
if(!mSheets[i]->numChars )
|
||||
continue;
|
||||
|
||||
GFX->setupGenericShaders( GFXDevice::GSAddColorTexture );
|
||||
|
||||
GFX->setTexture( 0, mFont->getTextureHandle(i) );
|
||||
GFX->drawPrimitive(GFXTriangleList, mSheets[i]->startVertex, mSheets[i]->numChars * 2);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue