| 355 | } |
| 356 | |
| 357 | void Mesh::InitCommon(const MeshVertex* vertices_, const uint16* indices_, uint64 vbAddress, uint64 ibAddress, uint64 vtxOffset_, uint64 idxOffset_) |
| 358 | { |
| 359 | Assert_(meshParts.Size() > 0); |
| 360 | |
| 361 | vertices = vertices_; |
| 362 | indices = indices_; |
| 363 | vtxOffset = uint32(vtxOffset_); |
| 364 | idxOffset = uint32(idxOffset_); |
| 365 | |
| 366 | vbView.BufferLocation = vbAddress; |
| 367 | vbView.SizeInBytes = sizeof(MeshVertex) * numVertices; |
| 368 | vbView.StrideInBytes = sizeof(MeshVertex); |
| 369 | |
| 370 | ibView.Format = IndexBufferFormat(); |
| 371 | ibView.SizeInBytes = IndexSize() * numIndices; |
| 372 | ibView.BufferLocation = ibAddress; |
| 373 | } |
| 374 | |
| 375 | |
| 376 | void Mesh::Shutdown() |