Re: Introduction into RenderNode for very begginer:

#3
thx, now I have some pity experience with RenderNodes :)

Code: Select all

void ISelectable::Initialize()
{
uint32 flags = ENTITY_SLOT_RENDER;


m_pEntity->LoadGeometry(1, "Assets\\Objects\\selection.cgf");

m_pEntity->SetSlotFlags(1, flags);
m_pEntity->SetViewDistRatio(255);
auto *pMaterial = gEnv->p3DEngine->GetMaterialManager()->LoadMaterial("Assets\\Objects\\selection.mtl");

m_pEntity->SetSlotMaterial(1, pMaterial);

if (IRenderNode* pRenderNode = m_pEntity->GetRenderNode(1))
{
pRenderNode->SetRndFlags(ERF_RENDER_ALWAYS, true);
pRenderNode->SetRndFlags(ERF_HUD, true);
pRenderNode->SetRndFlags(ERF_DISABLE_MOTION_BLUR, true);
}
}

Who is online

Users browsing this forum: No registered users and 1 guest