Skip to content

LiteFX::Rendering::IGraphicsFactory::createTexture

Creates a texture.

Synopses

Declared in <litefx/rendering_api.hpp>

Creates a texture.

[[dllimport, dllexport]] SharedPtr<IImage> createTexture(
    Format format,
    Size3d const& size,
    ImageDimensions dimension = ImageDimensions::DIM_2,
    UInt32 levels = 1,
    UInt32 layers = 1,
    MultiSamplingLevel samples = MultiSamplingLevel::x1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Creates a texture.

[[dllimport, dllexport]] SharedPtr<IImage> createTexture(
    String const& name,
    Format format,
    Size3d const& size,
    ImageDimensions dimension = ImageDimensions::DIM_2,
    UInt32 levels = 1,
    UInt32 layers = 1,
    MultiSamplingLevel samples = MultiSamplingLevel::x1,
    ResourceUsage usage = ResourceUsage::Default,
    AllocationBehavior allocationBehavior = AllocationBehavior::Default) const;

» more...

Return Value

The instance of the texture.

Parameters

NameDescription
formatThe format of the texture image.
sizeThe dimensions of the texture.
dimensionThe dimensionality of the texture.
layersThe number of layers (slices) in this texture.
levelsThe number of mip map levels of the texture.
samplesThe number of samples, the texture should be sampled with.
usageThe intended usage for the buffer.
allocationBehaviorThe behavior controlling what happens if currently there is not enough memory available for the resource.
nameThe name of the texture image.

See Also

createTextures