mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-13 15:16:28 +00:00
A model's surfaces are now depth sorted together (except on world geometry)
This commit is contained in:
@@ -234,7 +234,7 @@ void CDamageableTriggerExtra::AddToRenderer(CRenderer *pRenderer, const SViewInf
|
||||
}
|
||||
}
|
||||
|
||||
void CDamageableTriggerExtra::Draw(FRenderOptions Options, int /*ComponentIndex*/, const SViewInfo& rkViewInfo)
|
||||
void CDamageableTriggerExtra::Draw(FRenderOptions Options, int /*ComponentIndex*/, ERenderCommand /*Command*/, const SViewInfo& rkViewInfo)
|
||||
{
|
||||
LoadModelMatrix();
|
||||
CGraphics::sPixelBlock.TintColor = mpParent->TintColor(rkViewInfo);
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
void PropertyModified(IProperty *pProperty);
|
||||
bool ShouldDrawNormalAssets();
|
||||
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo);
|
||||
void DrawSelection();
|
||||
void RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& rkViewInfo);
|
||||
SRayIntersection RayNodeIntersectTest(const CRay& rkRay, u32 ComponentIndex, const SViewInfo& rkViewInfo);
|
||||
|
||||
@@ -64,17 +64,14 @@ void CDoorExtra::AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo
|
||||
|
||||
if (mpParent->IsVisible() && rkViewInfo.ViewFrustum.BoxInFrustum(AABox()))
|
||||
{
|
||||
if (mpShieldModel->HasTransparency(0))
|
||||
AddSurfacesToRenderer(pRenderer, mpShieldModel, 0, rkViewInfo);
|
||||
else
|
||||
pRenderer->AddMesh(this, -1, AABox(), false, eDrawMesh);
|
||||
AddModelToRenderer(pRenderer, mpShieldModel, 0);
|
||||
|
||||
if (mpParent->IsSelected() && !rkViewInfo.GameMode)
|
||||
pRenderer->AddMesh(this, -1, AABox(), false, eDrawSelection);
|
||||
}
|
||||
}
|
||||
|
||||
void CDoorExtra::Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo)
|
||||
void CDoorExtra::Draw(FRenderOptions Options, int /*ComponentIndex*/, ERenderCommand Command, const SViewInfo& rkViewInfo)
|
||||
{
|
||||
LoadModelMatrix();
|
||||
mpParent->LoadLights(rkViewInfo);
|
||||
@@ -87,11 +84,7 @@ void CDoorExtra::Draw(FRenderOptions Options, int ComponentIndex, const SViewInf
|
||||
CGraphics::sPixelBlock.TintColor = Tint;
|
||||
CGraphics::sPixelBlock.TevColor = CColor::skWhite;
|
||||
CGraphics::UpdatePixelBlock();
|
||||
|
||||
if (ComponentIndex < 0)
|
||||
mpShieldModel->Draw(Options, 0);
|
||||
else
|
||||
mpShieldModel->DrawSurface(Options, ComponentIndex, 0);
|
||||
DrawModelParts(mpShieldModel, Options, 0, Command);
|
||||
}
|
||||
|
||||
void CDoorExtra::DrawSelection()
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
explicit CDoorExtra(CScriptObject *pInstance, CScene *pScene, CScriptNode *pParent = 0);
|
||||
void PropertyModified(IProperty *pProperty);
|
||||
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo);
|
||||
void DrawSelection();
|
||||
void RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& rkViewInfo);
|
||||
SRayIntersection RayNodeIntersectTest(const CRay& rkRay, u32 AssetID, const SViewInfo& rkViewInfo);
|
||||
|
||||
@@ -36,7 +36,7 @@ void CRadiusSphereExtra::AddToRenderer(CRenderer *pRenderer, const SViewInfo& rk
|
||||
}
|
||||
}
|
||||
|
||||
void CRadiusSphereExtra::Draw(FRenderOptions /*Options*/, int /*ComponentIndex*/, const SViewInfo& /*rkViewInfo*/)
|
||||
void CRadiusSphereExtra::Draw(FRenderOptions /*Options*/, int /*ComponentIndex*/, ERenderCommand /*Command*/, const SViewInfo& /*rkViewInfo*/)
|
||||
{
|
||||
glBlendFunc(GL_ONE, GL_ZERO);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
||||
@@ -12,7 +12,7 @@ class CRadiusSphereExtra : public CScriptExtra
|
||||
public:
|
||||
explicit CRadiusSphereExtra(CScriptObject *pInstance, CScene *pScene, CScriptNode *pParent = 0);
|
||||
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo);
|
||||
CColor Color() const;
|
||||
CAABox Bounds() const;
|
||||
};
|
||||
|
||||
@@ -172,7 +172,7 @@ void CWaypointExtra::AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkView
|
||||
}
|
||||
}
|
||||
|
||||
void CWaypointExtra::Draw(FRenderOptions /*Options*/, int ComponentIndex, const SViewInfo& /*rkViewInfo*/)
|
||||
void CWaypointExtra::Draw(FRenderOptions /*Options*/, int ComponentIndex, ERenderCommand /*Command*/, const SViewInfo& /*rkViewInfo*/)
|
||||
{
|
||||
glBlendFunc(GL_ONE, GL_ZERO);
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
void OnTransformed();
|
||||
void LinksModified();
|
||||
void AddToRenderer(CRenderer *pRenderer, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, const SViewInfo& rkViewInfo);
|
||||
void Draw(FRenderOptions Options, int ComponentIndex, ERenderCommand Command, const SViewInfo& rkViewInfo);
|
||||
CColor TevColor();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user