Skip to content

LiteFX::Rendering::IImage::size

Returns the size (in bytes) of an image at a specified mip map level. If the image does not contain the provided mip map level, the method returns 0.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] virtual size_t size(UInt32 level) const = 0;

Description

Note that the size will only be returned for one layer. You have to multiply this value by the number of layers, if you want to receive the size of all layers of a certain mip-map level. This is especially important, if you use cube mapping, because this method will only return the size of one face.

Return Value

The size (in bytes) of an image at a specified mip map level.

Parameters

NameDescription
levelThe mip map level to return the size for.