CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::BC< N > Struct Template Reference

#include <CeresEngine/Texture/Compression/BC.hpp>

Public Member Functions

size_t size (size_t inputSize) const noexcept
 Estimates the amount of bytes required in the out buffer when compressing an texture with inputSize bytes.
 
size_t size (TExtent2< UInt32 > extent) const noexcept
 Estimates the amount of bytes required in the out buffer when compressing an texture with the given extent.
 
void operator() (const Byte *in, Byte *out, TExtent2< UInt32 > extent, bool highQuality=false) const noexcept
 Compresses the texture using DXT.
 
Vector< Byteoperator() (const Vector< Byte > &in, TExtent2< UInt32 > extent, bool highQuality=false)
 Compresses the texture using DXT.
 

Member Function Documentation

◆ operator()() [1/2]

template<int N>
void CeresEngine::BC< N >::operator() ( const Byte in,
Byte out,
TExtent2< UInt32 extent,
bool  highQuality = false 
) const
noexcept

Compresses the texture using DXT.

Parameters
inThe input (uncompressed) texture
outThe output (compressed) texture
extentThe texture extents
highQualityIf true will compress using two passes.

◆ operator()() [2/2]

template<int N>
Vector< Byte > CeresEngine::BC< N >::operator() ( const Vector< Byte > &  in,
TExtent2< UInt32 extent,
bool  highQuality = false 
)

Compresses the texture using DXT.

Parameters
inThe input (uncompressed) texture
extentThe texture extents
highQualityIf true will compress using two passes.
Returns
The compressed texture

◆ size() [1/2]

template<int N>
size_t CeresEngine::BC< N >::size ( size_t  inputSize) const
noexcept

Estimates the amount of bytes required in the out buffer when compressing an texture with inputSize bytes.

Parameters
inputSizeThe uncompressed texture size
Returns
The amount of bytes used by the compressed texture

◆ size() [2/2]

template<int N>
size_t CeresEngine::BC< N >::size ( TExtent2< UInt32 extent) const
noexcept

Estimates the amount of bytes required in the out buffer when compressing an texture with the given extent.

Parameters
extentThe texture extent
Returns
The amount of bytes used by the compressed texture

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