LiteFX::Rendering::ResourceAllocationResult::buffer¶
Returns the allocated buffer resource, or raises an exception if the allocation does not contain a buffer resource, or the buffer resource is not of TBuffer.
Synopsis¶
Declared in <litefx/rendering_api.hpp>
template<std::derived_from<IBuffer> TBuffer>
SharedPtr<TBuffer> buffer() const;
Exceptions¶
| Name | Thrown on |
|---|---|
RuntimeException | Thrown, if the allocated resource is not a buffer, or if the allocated buffer does not implement TBuffer. |
Return Value¶
The pointer to the buffer resource.
Template Parameters¶
| Name | Description |
|---|---|
| TBuffer | The type of the buffer. |