MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Index

Function Index

Source/Engine/Graphics/GPUBufferDescription.h:268–272  ·  view source on GitHub ↗

Creates index buffer description. The element stride. The elements count. The data. The buffer description.

Source from the content-addressed store, hash-verified

266 /// <param name="data">The data.</param>
267 /// <returns>The buffer description.</returns>
268 static GPUBufferDescription Index(int32 elementStride, int32 elementsCount, const void* data)
269 {
270 const auto format = elementStride == 4 ? PixelFormat::R32_UInt : PixelFormat::R16_UInt;
271 return Buffer(elementsCount * elementStride, GPUBufferFlags::IndexBuffer, format, data, elementStride, GPUResourceUsage::Default);
272 }
273
274 /// <summary>
275 /// Creates index buffer description.

Callers 5

InitDescMethod · 0.70
MeshAccessorClass · 0.50
ComputeNormalsMethod · 0.50
InitMethod · 0.50
UpdateTrianglesMethod · 0.50

Calls 1

BufferClass · 0.50

Tested by

no test coverage detected