 |
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.MeshesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic 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
TaskA
Task that represents the asynchronous operation.
Exceptions| Exception | Condition |
|---|
| InvalidOperationException | Thrown when this mesh was not initialized yet. |
| Exception | Thrown when the mesh is using a custom vertex or index buffer, or when the GPU device is unexpectedly null. |
See Also