| 72 | } |
| 73 | |
| 74 | void 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 | |
| 87 | void RavEngine::StaticMesh::AddHook(const WeakRef<RavEngine::Entity>& e) |
| 88 | { |
nothing calls this directly
no test coverage detected