Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
GraphicsFormat.hpp
Go to the documentation of this file.
1#pragma once
2#include <Primitives.hpp>
3
4namespace Faro
5{
6 /// @brief Describes what elements are present in a format and what order they have in storage.
16
17 /// @brief Describes the datatype of a format element.
27
28 /// @brief Describes the element storage distribution.
45
46 /// @brief Describes a graphics format.
48 {
51
55 bool linear = true;
56
57 /**
58 * @brief Get the amount of elements/channels in this format.
59 * @return uint8 Amount of elements
60 */
62
63 /**
64 * @brief Get the size of 1 format instance.
65 * @return uint8 Size of this format
66 */
68
72
77 };
78
79 extern bool operator==(const GraphicsFormat& a, const GraphicsFormat& b);
80
81 extern bool operator<(const GraphicsFormat& a, const GraphicsFormat& b);
82}
Definition Array.hpp:8
bool operator==(String a, String b)
Definition String.hpp:151
GraphicsFormatElementLayout
Describes the element storage distribution.
Definition GraphicsFormat.hpp:30
@ FEL_16
Definition GraphicsFormat.hpp:36
@ FEL_8
Definition GraphicsFormat.hpp:32
@ FEL_32_32_32_32
Definition GraphicsFormat.hpp:43
@ FEL_Unknown
Definition GraphicsFormat.hpp:31
@ FEL_8_8_8_8
Definition GraphicsFormat.hpp:35
@ FEL_32_32_32
Definition GraphicsFormat.hpp:42
@ FEL_32_32
Definition GraphicsFormat.hpp:41
@ FEL_8_8_8
Definition GraphicsFormat.hpp:34
@ FEL_16_16_16
Definition GraphicsFormat.hpp:38
@ FEL_16_16_16_16
Definition GraphicsFormat.hpp:39
@ FEL_8_8
Definition GraphicsFormat.hpp:33
@ FEL_16_16
Definition GraphicsFormat.hpp:37
@ FEL_32
Definition GraphicsFormat.hpp:40
GraphicsFormatElements
Describes what elements are present in a format and what order they have in storage.
Definition GraphicsFormat.hpp:8
@ FE_R
Definition GraphicsFormat.hpp:10
@ FE_RGB
Definition GraphicsFormat.hpp:12
@ FE_RGBA
Definition GraphicsFormat.hpp:13
@ FE_Unknown
Definition GraphicsFormat.hpp:9
@ FE_BGRA
Definition GraphicsFormat.hpp:14
@ FE_RG
Definition GraphicsFormat.hpp:11
GraphicsFormatElementType
Describes the datatype of a format element.
Definition GraphicsFormat.hpp:19
@ FET_Float
Definition GraphicsFormat.hpp:21
@ FET_SNorm
Definition GraphicsFormat.hpp:23
@ FET_UInt
Definition GraphicsFormat.hpp:24
@ FET_UNorm
Definition GraphicsFormat.hpp:22
@ FET_SInt
Definition GraphicsFormat.hpp:25
@ FET_Unknown
Definition GraphicsFormat.hpp:20
bool operator<(const GraphicsFormat &a, const GraphicsFormat &b)
Definition GraphicsFormat.cpp:52
uint8_t uint8
Definition Primitives.hpp:6
Describes a graphics format.
Definition GraphicsFormat.hpp:48
GraphicsFormatElementType elementType
Definition GraphicsFormat.hpp:53
uint8 GetElementCount()
Get the amount of elements/channels in this format.
Definition GraphicsFormat.cpp:14
static GraphicsFormat Byte
Definition GraphicsFormat.hpp:69
static GraphicsFormat Float2
Definition GraphicsFormat.hpp:74
static GraphicsFormat Byte2
Definition GraphicsFormat.hpp:70
static GraphicsFormat Float3
Definition GraphicsFormat.hpp:75
static GraphicsFormat Byte4
Definition GraphicsFormat.hpp:71
bool linear
Definition GraphicsFormat.hpp:55
static GraphicsFormat Float
Definition GraphicsFormat.hpp:73
static GraphicsFormat Float4
Definition GraphicsFormat.hpp:76
uint8 GetStride()
Get the size of 1 format instance.
Definition GraphicsFormat.cpp:27
GraphicsFormat(GraphicsFormatElements elements, GraphicsFormatElementType elementType, GraphicsFormatElementLayout elementLayout)
Definition GraphicsFormat.hpp:50
GraphicsFormatElementLayout elementLayout
Definition GraphicsFormat.hpp:54
GraphicsFormatElements elements
Definition GraphicsFormat.hpp:52
GraphicsFormat()
Definition GraphicsFormat.hpp:49