CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
BC.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
11
13
15
16#include <cstddef>
17
18namespace CeresEngine {
19
20 template<int N> struct BC {
25 [[nodiscard]] size_t size(size_t inputSize) const noexcept;
26
31 [[nodiscard]] size_t size(TExtent2<UInt32> extent) const noexcept;
32
38 void operator()(const Byte* in, Byte* out, TExtent2<UInt32> extent, bool highQuality = false) const noexcept;
39
45 Vector<Byte> operator()(const Vector<Byte>& in, TExtent2<UInt32> extent, bool highQuality = false);
46 };
47
48 // extern template struct BC<1>;
49 // extern template struct BC<3>;
50 // extern template struct BC<4>;
51 // extern template struct BC<5>;
52
55
58
61
64
65} // namespace CeresEngine
Definition Application.hpp:19
const BC< 3 > bc3
Compresses the texture using DXT5.
Definition BC.hpp:57
Byte
Definition DataTypes.hpp:40
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
const BC< 5 > bc5
Compresses the texture using BC5.
Definition BC.hpp:63
const BC< 3 > dxt5
Definition BC.hpp:57
const BC< 4 > bc4
Compresses the texture using BC4.
Definition BC.hpp:60
const BC< 1 > bc1
Compresses the texture using DXT1.
Definition BC.hpp:54
const BC< 1 > dxt1
Definition BC.hpp:54
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Definition BC.hpp:20
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 e...
void operator()(const Byte *in, Byte *out, TExtent2< UInt32 > extent, bool highQuality=false) const noexcept
Compresses the texture using DXT.
size_t size(size_t inputSize) const noexcept
Estimates the amount of bytes required in the out buffer when compressing an texture with inputSize b...