OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
texture_port.hpp
1#pragma once
2#include <ossia/detail/config.hpp>
3#include <cstdint>
4#include <optional>
5
6namespace ossia
7{
8
9enum texture_filter
10{
11 NONE,
12 NEAREST,
13 LINEAR
14};
15
16enum texture_address_mode
17{
18 REPEAT,
19 CLAMP_TO_EDGE,
20 MIRROR,
21};
22
23enum texture_format
24{
25 RGBA8,
26 BGRA8,
27 R8,
28 RG8,
29 R16,
30 RG16,
31 RED_OR_ALPHA8,
32
33 RGBA16F,
34 RGBA32F,
35 R16F,
36 R32F,
37
38 RGB10A2,
39
40 D16,
41 D24,
42 D24S8,
43 D32F,
44};
45struct texture_size
46{
47 int32_t width{};
48 int32_t height{};
49
50 bool operator==(const texture_size& other) const noexcept = default;
51 bool operator!=(const texture_size& other) const noexcept = default;
52};
53
54struct render_target_spec
55{
56 std::optional<texture_size> size;
57
58 texture_format format = RGBA8;
59
60 texture_filter mag_filter : 2 = texture_filter::LINEAR;
61 texture_filter min_filter : 2 = texture_filter::LINEAR;
62 texture_filter mipmap_mode : 2 = texture_filter::NONE;
63
64 texture_address_mode address_u : 2 = texture_address_mode::REPEAT;
65 texture_address_mode address_v : 2 = texture_address_mode::REPEAT;
66 texture_address_mode address_w : 2 = texture_address_mode::REPEAT;
67
68 bool operator==(const render_target_spec& other) const noexcept = default;
69 bool operator!=(const render_target_spec& other) const noexcept = default;
70};
71
72struct buffer_spec
73{
74
75};
76}
Definition git_info.h:7