MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
GraphicsUtils.hpp
Go to the documentation of this file.
1#pragma once
2
4
5//============================================================================
6// Primitive Topology
7//============================================================================
8
9/**
10 * @enum PrimitiveTopology
11 * @brief Vertex assembly primitive topology
12 *
13 * Used to configure how vertices are assembled into primitives
14 * before rasterization.
15 */
24
25//============================================================================
26// Rasterization
27//============================================================================
28
29/**
30 * @enum PolygonMode
31 * @brief Rasterization polygon mode
32 */
33enum class PolygonMode : uint8_t {
34 FILL,
35 LINE,
36 POINT
37};
38
39/**
40 * @enum CullMode
41 * @brief Face culling mode
42 */
43enum class CullMode : uint8_t {
44 NONE,
45 FRONT,
46 BACK,
48};
49
50//============================================================================
51// Depth/Stencil
52//============================================================================
53
54/**
55 * @enum CompareOp
56 * @brief Depth/stencil comparison operation
57 */
58enum class CompareOp : uint8_t {
59 NEVER,
60 LESS,
61 EQUAL,
63 GREATER,
66 ALWAYS
67};
68
69//============================================================================
70// Blending
71//============================================================================
72
73/**
74 * @enum BlendFactor
75 * @brief Blending factor
76 */
89
90/**
91 * @enum BlendOp
92 * @brief Blending operation
93 */
94enum class BlendOp : uint8_t {
95 ADD,
98 MIN,
99 MAX
100};
101
102//============================================================================
103// Shader Types
104//============================================================================
105
106/**
107 * @enum ShaderStage
108 * @brief User-friendly shader stage enum
109 *
110 * Abstracts vk::ShaderStageFlagBits for Portal API convenience.
111 * Maps directly to Vulkan stages internally.
112 */
113enum class ShaderStage : uint8_t {
114 COMPUTE,
115 VERTEX,
116 FRAGMENT,
117 GEOMETRY,
120};
121
122//============================================================================
123// Image Helpers
124//============================================================================
125
126/**
127 * @enum ImageFormat
128 * @brief User-friendly image format enum
129 *
130 * Abstracts Vulkan formats for Portal API convenience.
131 * Maps to vk::Format internally.
132 */
133enum class ImageFormat : uint8_t {
134 // Normalized formats
135 R8, ///< Single channel 8-bit
136 RG8, ///< Two channel 8-bit
137 RGB8, ///< Three channel 8-bit
138 RGBA8, ///< Four channel 8-bit
139 RGBA8_SRGB, ///< Four channel 8-bit sRGB
140
141 // Floating point formats
142 R16F, ///< Single channel 16-bit float
143 RG16F, ///< Two channel 16-bit float
144 RGBA16F, ///< Four channel 16-bit float
145 R32F, ///< Single channel 32-bit float
146 RG32F, ///< Two channel 32-bit float
147 RGBA32F, ///< Four channel 32-bit float
148
149 // Depth/stencil formats
150 DEPTH16, ///< 16-bit depth
151 DEPTH24, ///< 24-bit depth
152 DEPTH32F, ///< 32-bit float depth
153 DEPTH24_STENCIL8 ///< 24-bit depth + 8-bit stencil
154};
155
156/**
157 * @enum FilterMode
158 * @brief Texture filtering mode
159 */
160enum class FilterMode : uint8_t {
161 NEAREST, ///< Nearest neighbor (pixelated)
162 LINEAR, ///< Bilinear filtering (smooth)
163 CUBIC ///< Bicubic filtering (high quality, slower)
164};
165
166/**
167 * @enum AddressMode
168 * @brief Texture addressing mode (wrapping)
169 */
170enum class AddressMode : uint8_t {
171 REPEAT, ///< Repeat texture
172 MIRRORED_REPEAT, ///< Mirror and repeat
173 CLAMP_TO_EDGE, ///< Clamp to edge color
174 CLAMP_TO_BORDER ///< Clamp to border color
175};
176
177}
PolygonMode
Rasterization polygon mode.
AddressMode
Texture addressing mode (wrapping)
@ CLAMP_TO_BORDER
Clamp to border color.
ShaderStage
User-friendly shader stage enum.
FilterMode
Texture filtering mode.
@ LINEAR
Bilinear filtering (smooth)
@ NEAREST
Nearest neighbor (pixelated)
@ CUBIC
Bicubic filtering (high quality, slower)
BlendOp
Blending operation.
ImageFormat
User-friendly image format enum.
@ DEPTH24_STENCIL8
24-bit depth + 8-bit stencil
@ RGBA32F
Four channel 32-bit float.
@ R16F
Single channel 16-bit float.
@ RGBA16F
Four channel 16-bit float.
@ RG32F
Two channel 32-bit float.
@ R32F
Single channel 32-bit float.
@ RG16F
Two channel 16-bit float.
@ RGBA8_SRGB
Four channel 8-bit sRGB.
PrimitiveTopology
Vertex assembly primitive topology.
CompareOp
Depth/stencil comparison operation.