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:
LuisAntonRebollo 2014-04-13 17:55:02 +02:00
parent 2142d452d4
commit 33742599b3
12 changed files with 14 additions and 16 deletions

View file

@ -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);
}