From 8dd023e0e8763002b95188c80b4b62f4bf9d0ced Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 25 Feb 2016 19:45:36 -0800 Subject: [PATCH] RenderLines implementation (missing CLineManager) --- Runtime/Particle/CParticleElectric.cpp | 26 +++++++++++++++++++------- Runtime/Particle/CParticleElectric.hpp | 1 + 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Runtime/Particle/CParticleElectric.cpp b/Runtime/Particle/CParticleElectric.cpp index c8325b109..bf834bac5 100644 --- a/Runtime/Particle/CParticleElectric.cpp +++ b/Runtime/Particle/CParticleElectric.cpp @@ -9,6 +9,11 @@ CParticleElectric::CParticleElectric(const TToken& desc) { } +void CParticleElectric::SetupLineGXMaterial() +{ + +} + void CParticleElectric::RenderLines() { CGraphics::DisableAllLights(); @@ -16,15 +21,22 @@ void CParticleElectric::RenderLines() CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::One, ERglLogicOp::Clear); Zeus::CTransform viewXfrm = CGraphics::g_ViewMatrix; - Zeus::CTransform scale; - scale.Scale(xec_localScale); + Zeus::CTransform localScale; + localScale.Scale(xec_localScale); Zeus::CTransform globalScale; globalScale.Scale(xe0_globalScale); - Zeus::CTransform localTranslate; - localTranslate.Translate(x38_translation); - Zeus::CTransform globalTranslate; - globalTranslate.Translate(xa4_globalTranslation); - Zeus::CTransform global = globalTranslate * xb0_globalOrientation; + Zeus::CTransform localTranslation; + localTranslation.Translate(x38_translation); + Zeus::CTransform globalTranslation; + globalTranslation.Translate(xa4_globalTranslation); + 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) diff --git a/Runtime/Particle/CParticleElectric.hpp b/Runtime/Particle/CParticleElectric.hpp index 833f30536..001442f34 100644 --- a/Runtime/Particle/CParticleElectric.hpp +++ b/Runtime/Particle/CParticleElectric.hpp @@ -53,6 +53,7 @@ public: CParticleElectric(const TToken& desc); + void SetupLineGXMaterial(); void RenderLines(); void Update(double); void Render();