GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::TextureImageUploadOptions Struct Reference

Configuration options for a texture image upload. More...

#include <GREM/graphics/Texture.hpp>

Public Member Functions

constexpr bool operator== (const TextureImageUploadOptions &other) const =default
 Compare these options to another set of options for equality.

Public Attributes

Color::TransferFunction transferFunction = Color::TransferFunction::SRGB
 Preferred transfer function to use when choosing the internal texture format.
bool convertToPremultipliedAlpha = true
 Convert the uploaded image from straight to pre-multiplied alpha.
bool generateMipmap = true
 Generate a new mip chain with the maximum number of mip levels for the texture based on mip level 0 of the uploaded image, ignoring any other mip levels in the input image.

Detailed Description

Configuration options for a texture image upload.

Member Function Documentation

◆ operator==()

bool grem::graphics::TextureImageUploadOptions::operator== ( const TextureImageUploadOptions & other) const
nodiscardconstexprdefault

Compare these options to another set of options for equality.

Parameters
otherthe options to compare these to.
Returns
true if the options are equal, false otherwise.

Member Data Documentation

◆ transferFunction

Color::TransferFunction grem::graphics::TextureImageUploadOptions::transferFunction = Color::TransferFunction::SRGB

Preferred transfer function to use when choosing the internal texture format.

Note
Only applies to image formats where the corresponding texture format has both sRGB and non-sRGB variants.

◆ convertToPremultipliedAlpha

bool grem::graphics::TextureImageUploadOptions::convertToPremultipliedAlpha = true

Convert the uploaded image from straight to pre-multiplied alpha.

Note
Only applies to images in raw RGBA formats.

◆ generateMipmap

bool grem::graphics::TextureImageUploadOptions::generateMipmap = true

Generate a new mip chain with the maximum number of mip levels for the texture based on mip level 0 of the uploaded image, ignoring any other mip levels in the input image.

Note
Only applies to textures with framebuffer-compatible internal formats.

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