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

Method InitCommon

SampleFramework12/v1.00/Graphics/Model.cpp:357–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void 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
376void Mesh::Shutdown()

Callers 1

CreateBuffersMethod · 0.80

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected