Bunch of backend rendering reshuffling; getting rid of DrawAsset, adding convenience functions, renaming some things

This commit is contained in:
parax0
2015-11-27 16:28:35 -07:00
parent 4bad61acec
commit 9494d2276d
27 changed files with 134 additions and 200 deletions

View File

@@ -45,7 +45,7 @@ void CGraphics::Initialize()
mpPixelBlockBuffer = new CUniformBuffer(sizeof(sPixelBlock));
mpLightBlockBuffer = new CUniformBuffer(sizeof(sLightBlock));
sLightMode = WorldLighting;
sLightMode = eWorldLighting;
sNumLights = 0;
sWorldLightMultiplier = 1.f;
@@ -162,6 +162,14 @@ void CGraphics::SetDefaultLighting()
UpdateVertexBlock();
}
void CGraphics::SetupAmbientColor()
{
if (sLightMode == eWorldLighting)
sVertexBlock.COLOR0_Amb = sAreaAmbientColor.ToVector4f() * sWorldLightMultiplier;
else
sVertexBlock.COLOR0_Amb = skDefaultAmbientColor.ToVector4f();
}
void CGraphics::SetIdentityMVP()
{
sMVPBlock.ModelMatrix = CMatrix4f::skIdentity;