Skip to content

LiteFX::Rendering::DeviceState

A class that can be used to manage the state of a IGraphicsDevice.

Synopsis

Declared in <litefx/rendering_api.hpp>

class [[dllimport, dllexport]] DeviceState;

Description

The device state makes managing resources created by a device easier, since you do not have to worry about storage and release order. Note, however, that this is not free. Requesting a resource requires a lookup within a hash-map. Also device states are not specialized for the concrete device, so you can only work with interfaces. This implies potentially inefficient upcasting of the state resource when its passed to another object. You have to decide if or to which degree you want to rely on storing resources in a device state.

Member Functions

NameDescription
DeviceState [constructor]Constructors
~DeviceState [destructor] [virtual]Releases the device state instance.
operator= Assigns a device state by taking it over.
accelerationStructure Returns an acceleration structure from the device state.
add add overloads
buffer Returns a buffer from the device state.
clear Release all resources managed by the device state.
descriptorSet Returns a descriptor set from the device state.
frameBuffer Returns a frame buffer from the device state.
image Returns an image from the device state.
indexBuffer Returns an index buffer from the device state.
pipeline Returns a pipeline from the device state.
release release overloads
renderPass Returns a render pass from the device state.
sampler Returns a sampler from the device state.
vertexBuffer Returns a vertex buffer from the device state.

Friends

NameDescription
LiteFX::Rendering::IGraphicsDeviceThe interface for a graphics device that.
LiteFX::Rendering::DeviceState::DeviceStateImpl
LiteFX::PimplPtrA smart pointer that manages an implementation instance for a public interface class.

See Also

StateResource

IGraphicsDevice