opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
liboscar
graphics
color_render_buffer_format.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <iosfwd>
4
5
namespace
osc
6
{
7
// the underlying, color-renderable, format of a color render buffer
8
//
9
// note: the naming convention and documentation for each format is designed
10
// to be the same as Vulkan's:
11
//
12
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkFormat.html
13
enum class
ColorRenderBufferFormat
{
14
15
// one-component, 8-bit unsigned normalized format that has a single 8-bit R component
16
R8_UNORM
,
17
18
// a four-component, 32-bit unsigned normalized format that has an 8-bit R component in
19
// byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A
20
// component in byte 3.
21
R8G8B8A8_UNORM
,
22
23
// a four-component, 32-bit unsigned normalized format that has an 8-bit R component
24
// stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB
25
// nonlinear encoding in byte 1, an 8-bit B component stored with sRGB nonlinear encoding
26
// in byte 2, and an 8-bit A component in byte 3.
27
R8G8B8A8_SRGB
,
28
29
// a two-component, 32-bit signed floating-point format that has a 16-bit R component in
30
// bytes 0..1, and a 16-bit G component in bytes 2..3
31
R16G16_SFLOAT
,
32
33
// a three-component, 48-bit signed floating-point format that has a 16-bit R component in
34
// bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5
35
R16G16B16_SFLOAT
,
36
37
// a four-component, 64-bit signed floating-point format that has a 16-bit R component in
38
// bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and
39
// a 16-bit A component in bytes 6..7
40
R16G16B16A16_SFLOAT
,
41
42
// a one-component, 32-bit signed floating-point format that has a single 32-bit R component.
43
R32_SFLOAT
,
44
45
NUM_OPTIONS
,
46
47
Default
=
R8G8B8A8_SRGB
,
48
DefaultHDR
=
R16G16B16A16_SFLOAT
,
49
};
50
51
constexpr
bool
is_srgb_encoded
(
ColorRenderBufferFormat
format)
52
{
53
return
format ==
ColorRenderBufferFormat::R8G8B8A8_SRGB
;
54
}
55
56
std::ostream&
operator<<
(std::ostream&,
ColorRenderBufferFormat
);
57
}
osc
Definition
custom_decoration_generator.h:5
osc::operator<<
std::ostream & operator<<(std::ostream &, const Object &)
osc::BlendingEquation::NUM_OPTIONS
@ NUM_OPTIONS
osc::is_srgb_encoded
constexpr bool is_srgb_encoded(ColorRenderBufferFormat format)
Definition
color_render_buffer_format.h:51
osc::OBJWriterFlag::Default
@ Default
osc::ColorRenderBufferFormat
ColorRenderBufferFormat
Definition
color_render_buffer_format.h:13
osc::ColorRenderBufferFormat::R16G16B16_SFLOAT
@ R16G16B16_SFLOAT
osc::ColorRenderBufferFormat::R32_SFLOAT
@ R32_SFLOAT
osc::ColorRenderBufferFormat::R16G16_SFLOAT
@ R16G16_SFLOAT
osc::ColorRenderBufferFormat::R8G8B8A8_SRGB
@ R8G8B8A8_SRGB
osc::ColorRenderBufferFormat::R16G16B16A16_SFLOAT
@ R16G16B16A16_SFLOAT
osc::ColorRenderBufferFormat::R8_UNORM
@ R8_UNORM
osc::ColorRenderBufferFormat::DefaultHDR
@ DefaultHDR
osc::ColorRenderBufferFormat::R8G8B8A8_UNORM
@ R8G8B8A8_UNORM
Generated by
1.9.8