 |
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.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
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