cesium-native  0.41.0
Ktx2TranscodeTargets.h
1 #pragma once
2 
3 #include "CesiumGltf/Library.h"
4 
5 namespace CesiumGltf {
6 
10 enum class CESIUMGLTF_API GpuCompressedPixelFormat {
11  NONE,
12  ETC1_RGB,
13  ETC2_RGBA,
14  BC1_RGB,
15  BC3_RGBA,
16  BC4_R,
17  BC5_RG,
18  BC7_RGBA,
19  PVRTC1_4_RGB,
20  PVRTC1_4_RGBA,
21  ASTC_4x4_RGBA,
22  PVRTC2_4_RGB,
23  PVRTC2_4_RGBA,
24  ETC2_EAC_R11,
25  ETC2_EAC_RG11
26 };
27 
38 struct CESIUMGLTF_API SupportedGpuCompressedPixelFormats {
39  bool ETC1_RGB{};
40  bool ETC2_RGBA{};
41  bool BC1_RGB{};
42  bool BC3_RGBA{};
43  bool BC4_R{};
44  bool BC5_RG{};
45  bool BC7_RGBA{};
46  bool PVRTC1_4_RGB{};
47  bool PVRTC1_4_RGBA{};
48  bool ASTC_4x4_RGBA{};
49  bool PVRTC2_4_RGB{};
50  bool PVRTC2_4_RGBA{};
51  bool ETC2_EAC_R11{};
52  bool ETC2_EAC_RG11{};
53 };
54 
62 struct CESIUMGLTF_API Ktx2TranscodeTargets {
63 
68  GpuCompressedPixelFormat ETC1S_R = GpuCompressedPixelFormat::NONE;
69 
75  GpuCompressedPixelFormat ETC1S_RG = GpuCompressedPixelFormat::NONE;
76 
81  GpuCompressedPixelFormat ETC1S_RGB = GpuCompressedPixelFormat::NONE;
82 
87  GpuCompressedPixelFormat ETC1S_RGBA = GpuCompressedPixelFormat::NONE;
88 
93  GpuCompressedPixelFormat UASTC_R = GpuCompressedPixelFormat::NONE;
94 
99  GpuCompressedPixelFormat UASTC_RG = GpuCompressedPixelFormat::NONE;
100 
105  GpuCompressedPixelFormat UASTC_RGB = GpuCompressedPixelFormat::NONE;
106 
111  GpuCompressedPixelFormat UASTC_RGBA = GpuCompressedPixelFormat::NONE;
112 
113  Ktx2TranscodeTargets() = default;
114 
125  const SupportedGpuCompressedPixelFormats& supportedFormats,
126  bool preserveHighQuality);
127 };
128 
129 } // namespace CesiumGltf
Classes for working with glTF models.
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...
Ktx2TranscodeTargets(const SupportedGpuCompressedPixelFormats &supportedFormats, bool preserveHighQuality)
Determine ideal transcode targets based on a list of supported gpu compressed formats.
Represents the status of support for all GpuCompressedPixelFormats on a client platform.