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

Method EnsureCapacity

Source/Engine/Graphics/Models/ModelData.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void MeshData::EnsureCapacity(int32 vertices, int32 indices, bool preserveContents, bool withColors, bool withSkin, int32 texcoords)
27{
28 Positions.EnsureCapacity(vertices, preserveContents);
29 Indices.EnsureCapacity(indices, preserveContents);
30 UVs.Resize(texcoords);
31 for (auto& channel : UVs)
32 channel.EnsureCapacity(vertices, preserveContents);
33 Normals.EnsureCapacity(vertices, preserveContents);
34 Tangents.EnsureCapacity(vertices, preserveContents);
35 Colors.EnsureCapacity(withColors ? vertices : 0, preserveContents);
36 BlendIndices.EnsureCapacity(withSkin ? vertices : 0, preserveContents);
37 BlendWeights.EnsureCapacity(withSkin ? vertices : 0, preserveContents);
38}
39
40void MeshData::SwapBuffers(MeshData& other)
41{

Callers 5

GPUTasksManagerMethod · 0.45
InitFunction · 0.45
BuildIndexBufferMethod · 0.45
GenerateTangentsMethod · 0.45
SubmitMethod · 0.45

Calls 1

ResizeMethod · 0.45

Tested by

no test coverage detected