From cf9fe8f329cee363439c90a3b86dc99e25377088 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Mon, 4 Nov 2013 19:21:07 +0000 Subject: BGE Rasterizer Cleanup: Removing RAS_IRenderTools and moving the functionality to RAS_IRasterizer. RAS_OpenGLRasterizer is a bit of a mess now with references to Ketsji and other modules it shouldn't be accessing. --- source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp') diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp index 8ea09029a35..726b9106340 100644 --- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp +++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp @@ -43,7 +43,6 @@ #include "RAS_Polygon.h" #include "RAS_TexVert.h" #include "RAS_IRasterizer.h" -#include "RAS_IRenderTools.h" #include "RAS_MeshObject.h" #include "RAS_Deformer.h" // __NLA @@ -581,8 +580,7 @@ list::iterator RAS_MaterialBucket::msEnd() return m_meshSlots.end(); } -bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools *rendertools) +bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_IRasterizer* rasty) { bool uselights; @@ -593,13 +591,12 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I return false; uselights= m_material->UsesLighting(rasty); - rendertools->ProcessLighting(rasty, uselights, cameratrans); + rasty->ProcessLighting(uselights, cameratrans); return true; } -void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, - RAS_IRenderTools* rendertools, RAS_MeshSlot &ms) +void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRasterizer* rasty, RAS_MeshSlot &ms) { m_material->ActivateMeshSlot(ms, rasty); @@ -613,10 +610,10 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa if (IsZSort() && rasty->GetDrawingMode() >= RAS_IRasterizer::KX_SOLID) ms.m_mesh->SortPolygons(ms, cameratrans*MT_Transform(ms.m_OpenGLMatrix)); - rendertools->PushMatrix(); + rasty->PushMatrix(); if (!ms.m_pDeformer || !ms.m_pDeformer->SkipVertexTransform()) { - rendertools->applyTransform(rasty,ms.m_OpenGLMatrix,m_material->GetDrawingMode()); + rasty->applyTransform(ms.m_OpenGLMatrix,m_material->GetDrawingMode()); } if (rasty->QueryLists()) @@ -641,7 +638,7 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa // for text drawing using faces if (m_material->GetDrawingMode() & RAS_IRasterizer::RAS_RENDER_3DPOLYGON_TEXT) - rasty->IndexPrimitives_3DText(ms, m_material, rendertools); + rasty->IndexPrimitives_3DText(ms, m_material); // for multitexturing else if ((m_material->GetFlag() & (RAS_MULTITEX|RAS_BLENDERGLSL))) rasty->IndexPrimitivesMulti(ms); @@ -649,7 +646,7 @@ void RAS_MaterialBucket::RenderMeshSlot(const MT_Transform& cameratrans, RAS_IRa else rasty->IndexPrimitives(ms); - rendertools->PopMatrix(); + rasty->PopMatrix(); } void RAS_MaterialBucket::Optimize(MT_Scalar distance) -- cgit v1.2.3