Skip to content

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

NameThrown on
RuntimeExceptionThrown, 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

NameDescription
TBufferThe type of the buffer.