LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::ImageView Struct Reference

Image view structure used as source when writing the image data to a hardware texture. More...

#include <ImageFlags.h>

Public Member Functions

 ImageView ()=default
 ImageView (ImageFormat format, DataType dataType, const void *data, std::size_t dataSize, std::uint32_t rowStride=0, std::uint32_t layerStride=0)
 Constructor to initialize all attributes.
 ImageView (const MutableImageView &rhs)
 Explicitly constructs the immutable image view from a mutable image view, effectively downgrading its mutability.

Public Attributes

ImageFormat format = ImageFormat::RGBA
 Specifies the image format. By default ImageFormat::RGBA.
DataType dataType = DataType::UInt8
 Specifies the image data type. This must be DataType::UInt8 for compressed images. By default DataType::UInt8.
const void * data = nullptr
 Read-only pointer to the image data.
std::size_t dataSize = 0
 Specifies the size (in bytes) of the image data. This is primarily used for compressed images and serves for robustness.
std::uint32_t rowStride = 0
 Specifies the stride (in bytes) between two rows of the image data.
std::uint32_t layerStride = 0
 Specifies the stride (in bytes) between two array layers or volume slices of the image data.

Detailed Description

Image view structure used as source when writing the image data to a hardware texture.

Remarks
This kind of image is mainly used to fill a MIP-map within a hardware texture by reading from a source image. The counterpart for reading a MIP-map from a hardware texture by writing to a destination image is the MutableImageView structure.
See also
MutableImageView
ConvertImageBuffer
RenderSystem::CreateTexture
RenderSystem::WriteTexture

Constructor & Destructor Documentation

◆ ImageView() [1/3]

LLGL::ImageView::ImageView ( )
default

◆ ImageView() [2/3]

LLGL::ImageView::ImageView ( ImageFormat format,
DataType dataType,
const void * data,
std::size_t dataSize,
std::uint32_t rowStride = 0,
std::uint32_t layerStride = 0 )
inline

Constructor to initialize all attributes.

◆ ImageView() [3/3]

LLGL::ImageView::ImageView ( const MutableImageView & rhs)
inlineexplicit

Explicitly constructs the immutable image view from a mutable image view, effectively downgrading its mutability.

Member Data Documentation

◆ data

const void* LLGL::ImageView::data = nullptr

Read-only pointer to the image data.

◆ dataSize

std::size_t LLGL::ImageView::dataSize = 0

Specifies the size (in bytes) of the image data. This is primarily used for compressed images and serves for robustness.

◆ dataType

DataType LLGL::ImageView::dataType = DataType::UInt8

Specifies the image data type. This must be DataType::UInt8 for compressed images. By default DataType::UInt8.

◆ format

ImageFormat LLGL::ImageView::format = ImageFormat::RGBA

Specifies the image format. By default ImageFormat::RGBA.

◆ layerStride

std::uint32_t LLGL::ImageView::layerStride = 0

Specifies the stride (in bytes) between two array layers or volume slices of the image data.

Remarks
If this is zero, each image layer is considered tightly packed and the stride is implied by the row stride (implicit or explicit) times the height of the image multiplied by the pixel format size (see Format). If this is non-zero, it must be a multiple of rowStride.
Note
Only supported with image conversion functions.

◆ rowStride

std::uint32_t LLGL::ImageView::rowStride = 0

Specifies the stride (in bytes) between two rows of the image data.

Remarks
If this is zero, each image row is considered tightly packed and the stride is implied by the width of the image multiplied by the pixel format size (see Format).
Note
Only supported with: Vulkan, OpenGL, Direct3D 11, Direct3D 12.

The documentation for this struct was generated from the following file: