RenderLines implementation (missing CLineManager)

This commit is contained in:
Phillip Stephens 2016-02-25 19:45:36 -08:00
parent 425adaf2f3
commit 8dd023e0e8
2 changed files with 20 additions and 7 deletions

View File

@ -9,6 +9,11 @@ CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& desc)
{ {
} }
void CParticleElectric::SetupLineGXMaterial()
{
}
void CParticleElectric::RenderLines() void CParticleElectric::RenderLines()
{ {
CGraphics::DisableAllLights(); CGraphics::DisableAllLights();
@ -16,15 +21,22 @@ void CParticleElectric::RenderLines()
CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::One, ERglLogicOp::Clear); CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::One, ERglLogicOp::Clear);
Zeus::CTransform viewXfrm = CGraphics::g_ViewMatrix; Zeus::CTransform viewXfrm = CGraphics::g_ViewMatrix;
Zeus::CTransform scale; Zeus::CTransform localScale;
scale.Scale(xec_localScale); localScale.Scale(xec_localScale);
Zeus::CTransform globalScale; Zeus::CTransform globalScale;
globalScale.Scale(xe0_globalScale); globalScale.Scale(xe0_globalScale);
Zeus::CTransform localTranslate; Zeus::CTransform localTranslation;
localTranslate.Translate(x38_translation); localTranslation.Translate(x38_translation);
Zeus::CTransform globalTranslate; Zeus::CTransform globalTranslation;
globalTranslate.Translate(xa4_globalTranslation); globalTranslation.Translate(xa4_globalTranslation);
Zeus::CTransform global = globalTranslate * xb0_globalOrientation; CGraphics::SetModelMatrix(xb0_globalOrientation * globalTranslation * localTranslation * x44_orientation * globalScale);
CGraphics::SetCullMode(ERglCullMode::None);
SetupLineGXMaterial();
/* Iterate line managers */
CGraphics::SetCullMode(ERglCullMode::Front);
//CGraphics::SetLineWidth(1.f, ERglTexOffset);
CGraphics::SetViewPointMatrix(viewXfrm);
} }
void CParticleElectric::Update(double) void CParticleElectric::Update(double)

View File

@ -53,6 +53,7 @@ public:
CParticleElectric(const TToken<CElectricDescription>& desc); CParticleElectric(const TToken<CElectricDescription>& desc);
void SetupLineGXMaterial();
void RenderLines(); void RenderLines();
void Update(double); void Update(double);
void Render(); void Render();