Click or drag to resize
Ab4d.SharpEngine logo

TriangleMeshTCreateGpuBuffersAsync(Scene, 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(
	Scene scene,
	bool updateBoundingBox = true,
	bool updateOctTree = true
)

Parameters

scene  Scene
The Scene object associated with the GPU device used to create the buffers.
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
ArgumentExceptionThrown when the scene parameter is null or does not match the scene used to initialize the mesh, or when the GPU device in the provided scene is null.
ExceptionThrown when the mesh is using a custom vertex or index buffer, or when the GPU device is unexpectedly null.
See Also