Click or drag to resize
Ab4d.SharpEngine logo

TriangleMeshTCreateGpuBuffersAsync(Boolean, Boolean) Method

Asynchronously creates the vertex and index buffers for this mesh in the background thread. Also, the BoundingBox and OctTree can be generated on the background tree (when updateBoundingBox and updateOctTree are true and when vertices count is equal or bigger to VerticesCountToGenerateBoundingBoxAndOctTreeOnBackgroundThread).

Namespace: Ab4d.SharpEngine.Meshes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public Task CreateGpuBuffersAsync(
	bool updateBoundingBox = true,
	bool updateOctTree = true
)

Parameters

updateBoundingBox  Boolean  (Optional)
A boolean value indicating whether the bounding box should be updated after creating the GPU buffers. Defaults to true.
updateOctTree  Boolean  (Optional)
A boolean value indicating whether the OctTree should be updated after creating the GPU buffers. Defaults to true.

Return Value

Task
A Task that represents the asynchronous operation.
Exceptions
ExceptionCondition
InvalidOperationExceptionThrown when this mesh was not initialized yet.
ExceptionThrown when the mesh is using a custom vertex or index buffer, or when the GPU device is unexpectedly null.
See Also