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