| 407 | } |
| 408 | |
| 409 | void Mesh::InitCommon(const MeshVertex* vertices_, const uint8* indices_, uint64 vbAddress, uint64 ibAddress, uint64 vtxOffset_, uint64 idxOffset_) |
| 410 | { |
| 411 | Assert_(meshParts.Size() > 0); |
| 412 | |
| 413 | vertices = vertices_; |
| 414 | indices = indices_; |
| 415 | vtxOffset = uint32(vtxOffset_); |
| 416 | idxOffset = uint32(idxOffset_); |
| 417 | |
| 418 | vbView.BufferLocation = vbAddress; |
| 419 | vbView.SizeInBytes = sizeof(MeshVertex) * numVertices; |
| 420 | vbView.StrideInBytes = sizeof(MeshVertex); |
| 421 | |
| 422 | ibView.Format = IndexBufferFormat(); |
| 423 | ibView.SizeInBytes = IndexSize() * numIndices; |
| 424 | ibView.BufferLocation = ibAddress; |
| 425 | } |
| 426 | |
| 427 | void Mesh::Shutdown() |
| 428 | { |