Removed old fixed function code from GFX.

This commit is contained in:
rextimmy 2021-01-05 12:57:17 +10:00
parent 58d2e30af7
commit 5a933c00d3
53 changed files with 98 additions and 1646 deletions

View file

@ -40,18 +40,10 @@ FontRenderBatcher::FontRenderBatcher() : mStorage(8096)
f.blendSrc = GFXBlendSrcAlpha;
f.blendDest = GFXBlendInvSrcAlpha;
f.samplersDefined = true;
f.samplers[0].alphaOp = GFXTOPModulate;
f.samplers[0].magFilter = GFXTextureFilterPoint;
f.samplers[0].minFilter = GFXTextureFilterPoint;
f.samplers[0].addressModeU = GFXAddressClamp;
f.samplers[0].addressModeV = GFXAddressClamp;
f.samplers[0].alphaArg1 = GFXTATexture;
f.samplers[0].alphaArg2 = GFXTADiffuse;
// This is an add operation because in D3D, when a texture of format D3DFMT_A8
// is used, the RGB channels are all set to 0. Therefore a modulate would
// result in the text always being black. This may not be the case in OpenGL
// so it may have to change. -bramage
f.samplers[0].textureColorOp = GFXTOPAdd;
f.setColorWrites(true, true, true, false); // NOTE: comment this out if alpha write is needed
mFontSB = GFX->createStateBlock(f);