Skip to content

LiteFX::Rendering::IDescriptorSet::update

Updates one or more texture descriptors within the current descriptor set.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] void update(
    UInt32 binding,
    IImage const& texture,
    UInt32 descriptor = 0,
    UInt32 firstLevel = 0,
    UInt32 levels = 0,
    UInt32 firstLayer = 0,
    UInt32 layers = 0) const;

Description

The exact representation of the level and layer parameters depends on the dimension of the provided texture, as well as the type of the descriptor identified by the binding parameter.

If the texture itself is not an array (i.e. the number of layers equals 1), the parameters firstLayer and layers are ignored.

The descriptor type dictates, how mip-maps can be provided. If the descriptor type identifies a writable texture, the firstLevel parameter specifies the mip-map level to write to (or read from). Multiple levels are not allowed in this case, so the levels parameter is ignored. Instead, you have to bind them to separate descriptors. Furthermore, the firstLayer and layers parameter can be used to specify the number of depth or W-slices of a writable 3D texture or the side(s) of a cube map.

Parameters

NameDescription
bindingThe texture binding point.
textureThe texture to write to the descriptor set.
descriptorThe index of the descriptor in the descriptor array to bind the texture to.
firstLevelThe index of the first mip-map level to bind.
levelsThe number of mip-map levels to bind. A value of 0 binds all available levels, starting at firstLevel.
firstLayerThe index of the first layer to bind.
layersThe number of layers to bind. A value of 0 binds all available layers, starting at firstLayer.