MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / Draw

Method Draw

src/StaticMesh.cpp:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void RavEngine::StaticMesh::Draw(LLGL::CommandBuffer* commands)
75{
76 //skip draw if no material assigned
77 if (material.isNull()) {
78 return;
79 }
80 //apply transform and set it for the material
81 auto owner = Ref<Entity>(getOwner());
82 owner->transform()->Apply();
83 material->SetTransformMatrix(owner->transform()->GetCurrentWorldMatrix());
84 material->Draw(commands, vertexBuffer, indexBuffer);
85}
86
87void RavEngine::StaticMesh::AddHook(const WeakRef<RavEngine::Entity>& e)
88{

Callers

nothing calls this directly

Calls 6

getOwnerFunction · 0.85
SetTransformMatrixMethod · 0.80
GetCurrentWorldMatrixMethod · 0.80
isNullMethod · 0.45
ApplyMethod · 0.45
transformMethod · 0.45

Tested by

no test coverage detected