MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / InitCommon

Method InitCommon

SHTest/SampleFramework12/v1.04/Graphics/Model.cpp:409–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407}
408
409void 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
427void Mesh::Shutdown()
428{

Callers 1

CreateBuffersMethod · 0.80

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected