This commit is contained in:
2025-05-13 02:03:18 +03:00
parent 72860c7968
commit 90ef6120fd
463 changed files with 380758 additions and 2 deletions
+11
View File
@@ -0,0 +1,11 @@
#include "Graphics.h"
void DrawMesh(BlockRasterizer* rasterizer, IMesh* mesh){
rasterizer->SetVertexBuffer(mesh->GetVertexBuffer(), 0, mesh->GetVertexBuffer()->ItemSize());
for (size_t i = 0; i < mesh->GetSubmeshCount(); ++i){
auto ib = mesh->GetSubmeshBuffer(i);
rasterizer->SetIndexBuffer(ib, 0);
rasterizer->DrawIndexed(ib->Size() / ib->ItemSize(), 0);
}
}