Unravel Engine C++ Reference
Loading...
Searching...
No Matches
format.h
Go to the documentation of this file.
1#pragma once
2
3#include <bgfx/bgfx.h>
4#include <cstdint>
5#include <string>
6
7namespace gfx
8{
9
10using texture_format = bgfx::TextureFormat::Enum;
11
12namespace format_search_flags
13{
30} // namespace format_search_flags
31
32auto is_format_supported(std::uint16_t flags, texture_format format) -> bool;
33
34auto get_best_format(std::uint16_t type, std::uint32_t search_flags) -> texture_format;
35
36auto get_default_rt_sampler_flags() -> std::uint64_t;
37
38
39// A small struct to hold your derived info.
41{
43 bool is_hdr{};
45};
46
47auto get_format_info(texture_format fmt) -> format_details;
48auto to_string(texture_format fmt) -> std::string;
49
50} // namespace gfx
manifold_type type
auto to_string(texture_format fmt) -> std::string
Definition format.cpp:378
auto is_format_supported(uint16_t flags, texture_format format) -> bool
Definition format.cpp:290
bgfx::TextureFormat::Enum texture_format
Definition format.h:10
auto get_format_info(texture_format fmt) -> format_details
Definition format.cpp:296
auto get_default_rt_sampler_flags() -> uint64_t
Definition format.cpp:283
auto get_best_format(std::uint16_t type_flags, std::uint32_t search_flags) -> texture_format
Definition format.cpp:234
bool has_alpha_channel
Definition format.h:42