SpiecsEngine
 
Loading...
Searching...
No Matches

◆ SetMaterial()

void Spices::SkyBoxComponent::SetMaterial ( const std::string & materialPath)

Set SkyBox Material.

Parameters
[in]materialPathSkyBox Material Path.

Definition at line 44 of file SkyBoxComponent.cpp.

45 {
47
48 auto e = FrameInfo::Get().m_World->QueryEntitybyID((uint32_t)m_Owner);
49
50 m_Mesh->GetPacks().for_each([&](const auto& k, const auto& v) {
51 v->SetMaterial(materialPath);
52 v->GetMeshDesc().UpdatemodelAddress(e.GetComponent<TransformComponent>().GetModelBufferAddress());
53 v->GetMeshDesc().UpdateentityID((uint32_t)m_Owner);
54
55 return false;
56 });
57 }
#define SPICES_PROFILE_ZONE
entt::entity m_Owner
This component's Owner entity.
Definition Component.h:67
static FrameInfo & Get()
Get FrameInfo.
Definition FrameInfo.cpp:14
std::shared_ptr< World > m_World
The shared pointer of specific world.
Definition FrameInfo.h:94
std::shared_ptr< Mesh > m_Mesh
The Mesh this component handled.

Referenced by Spices::EditorWorld::OnPreActivate().