Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
ktx2_decoder.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <vector>
5#include <string>
6
7namespace pulp::render {
8
11 std::vector<uint8_t> pixels;
12 uint32_t width = 0;
13 uint32_t height = 0;
14 uint32_t mip_levels = 1;
15 std::string format;
16 bool compressed = false;
17 bool success = false;
18};
19
23std::string optimal_gpu_format();
24
28DecodedTexture decode_ktx2(const uint8_t* data, size_t size);
29
32
33} // namespace pulp::render
Definition gpu_fwd.hpp:31
bool ktx2_available()
Check if a KTX2 transcoding backend was compiled in.
std::string optimal_gpu_format()
Detect the optimal GPU texture compression format for the current platform.
DecodedTexture decode_ktx2(const uint8_t *data, size_t size)
Validate and parse KTX2 header metadata.
Parsed texture data from a KTX2 container.
Definition ktx2_decoder.hpp:10
bool compressed
Whether pixels are GPU-compressed (BC7/ASTC/ETC2).
Definition ktx2_decoder.hpp:16
bool success
Definition ktx2_decoder.hpp:17
uint32_t mip_levels
Definition ktx2_decoder.hpp:14
uint32_t width
Definition ktx2_decoder.hpp:12
std::string format
Preferred GPU format hint.
Definition ktx2_decoder.hpp:15
uint32_t height
Definition ktx2_decoder.hpp:13
std::vector< uint8_t > pixels
Pixel data when a transcoding backend provides it.
Definition ktx2_decoder.hpp:11