mk_framebuf_is_validfunction
int mk_framebuf_is_valid(mk_framebuf_t fb)Check if framebuffer handle is valid.
| Parameter | Type | Description |
|---|---|---|
fb | mk_framebuf_t | Value for fb. |
Returns The resulting value.
#include <modkit/gpu_types.h>1 functions · 1 structs · 6 enums · 6 typedefs · 1 macros
GPU type abstractions.
Provides modkit's own enums for renderer types, texture formats, view modes, and sampler flags.
mk_framebuf_is_validfunctionint mk_framebuf_is_valid(mk_framebuf_t fb)Check if framebuffer handle is valid.
| Parameter | Type | Description |
|---|---|---|
fb | mk_framebuf_t | Value for fb. |
Returns The resulting value.
mk_framebuf_tstructOpaque framebuffer handle.
| Field | Type | Description |
|---|---|---|
id | uint32_t | Packed framebuffer identifier. |
mk_flipenumValues for flip.
| Value | Description |
|---|---|
MK_FLIP_NONE | Selects none. |
MK_FLIP_H | Selects h. |
MK_FLIP_V | Selects v. |
MK_FLIP_DIAG | Selects diag. |
mk_renderer_typeenumValues for renderer type.
| Value | Description |
|---|---|
MK_RENDERER_AUTO | Auto-detect best renderer (zero-init safe). |
MK_RENDERER_D3D11 | Selects d3d11. |
MK_RENDERER_D3D12 | Selects d3d12. |
MK_RENDERER_METAL | Selects metal. |
MK_RENDERER_OPENGLES | Selects opengles. |
MK_RENDERER_OPENGL | Selects opengl. |
MK_RENDERER_VULKAN | Selects vulkan. |
MK_RENDERER_WEBGPU | Selects WebGPU. |
MK_RENDERER_NOOP | No rendering (headless/testing). |
mk_sampler_flagsenumValues for sampler flags.
| Value | Description |
|---|---|
MK_SAMPLER_NONE | Selects none. |
MK_SAMPLER_U_MIRROR | Selects u mirror. |
MK_SAMPLER_U_CLAMP | Selects u clamp. |
MK_SAMPLER_V_MIRROR | Selects v mirror. |
MK_SAMPLER_V_CLAMP | Selects v clamp. |
MK_SAMPLER_W_MIRROR | Selects w mirror. |
MK_SAMPLER_W_CLAMP | Selects w clamp. |
MK_SAMPLER_MIN_POINT | Selects min point. |
MK_SAMPLER_MIN_ANISO | Selects min aniso. |
MK_SAMPLER_MAG_POINT | Selects mag point. |
MK_SAMPLER_MAG_ANISO | Selects mag aniso. |
MK_SAMPLER_MIP_POINT | Selects mip point. |
MK_SAMPLER_UV_CLAMP | U_CLAMP | V_CLAMP. |
MK_SAMPLER_POINT | MIN_POINT | MAG_POINT. |
MK_SAMPLER_COMPARE_LESS | Selects compare less. |
MK_SAMPLER_COMPARE_LEQUAL | Selects compare lequal. |
MK_SAMPLER_COMPARE_EQUAL | Selects compare equal. |
MK_SAMPLER_COMPARE_GEQUAL | Selects compare gequal. |
MK_SAMPLER_COMPARE_GREATER | Selects compare greater. |
MK_SAMPLER_COMPARE_NOTEQUAL | Selects compare notequal. |
MK_SAMPLER_COMPARE_NEVER | Selects compare never. |
MK_SAMPLER_COMPARE_ALWAYS | Selects compare always. |
mk_shading_rateenumValues for shading rate.
| Value | Description |
|---|---|
MK_SHADING_RATE_1X1 | Selects 1x1. |
MK_SHADING_RATE_1X2 | Selects 1x2. |
MK_SHADING_RATE_2X1 | Selects 2x1. |
MK_SHADING_RATE_2X2 | Selects 2x2. |
MK_SHADING_RATE_2X4 | Selects 2x4. |
MK_SHADING_RATE_4X2 | Selects 4x2. |
MK_SHADING_RATE_4X4 | Selects 4x4. |
mk_texture_formatenumValues for texture format.
| Value | Description |
|---|---|
MK_TEXTURE_FORMAT_R8 | Selects r8. |
MK_TEXTURE_FORMAT_R16U | Selects r16u. |
MK_TEXTURE_FORMAT_R16F | Selects r16f. |
MK_TEXTURE_FORMAT_R32F | Selects r32f. |
MK_TEXTURE_FORMAT_RG8 | Selects rg8. |
MK_TEXTURE_FORMAT_RG16U | Selects rg16u. |
MK_TEXTURE_FORMAT_RG16F | Selects rg16f. |
MK_TEXTURE_FORMAT_RG32U | Selects rg32u. |
MK_TEXTURE_FORMAT_RG32F | Selects rg32f. |
MK_TEXTURE_FORMAT_RGB8 | Selects rgb8. |
MK_TEXTURE_FORMAT_BGRA8 | Selects bgra8. |
MK_TEXTURE_FORMAT_RGBA8 | Selects rgba8. |
MK_TEXTURE_FORMAT_RGBA16F | Selects rgba16f. |
MK_TEXTURE_FORMAT_RGBA32F | Selects rgba32f. |
MK_TEXTURE_FORMAT_RG11B10F | Selects rg11b10f. |
MK_TEXTURE_FORMAT_D16 | Selects d16. |
MK_TEXTURE_FORMAT_D24S8 | Selects d24s8. |
MK_TEXTURE_FORMAT_D32F | Selects d32f. |
MK_TEXTURE_FORMAT_COUNT | Selects count. |
mk_view_modeenumValues for view mode.
| Value | Description |
|---|---|
MK_VIEW_MODE_DEFAULT | Selects default. |
MK_VIEW_MODE_SEQUENTIAL | Selects sequential. |
MK_VIEW_MODE_DEPTH_ASC | Selects depth asc. |
MK_VIEW_MODE_DEPTH_DESC | Selects depth desc. |
mk_flip_ttypedeftypedef enum mk_flip mk_flip_tValues for flip.
mk_renderer_type_ttypedeftypedef enum mk_renderer_type mk_renderer_type_tValues for renderer type.
mk_sampler_flags_ttypedeftypedef enum mk_sampler_flags mk_sampler_flags_tValues for sampler flags.
mk_shading_rate_ttypedeftypedef enum mk_shading_rate mk_shading_rate_tValues for shading rate.
mk_texture_format_ttypedeftypedef enum mk_texture_format mk_texture_format_tValues for texture format.
mk_view_mode_ttypedeftypedef enum mk_view_mode mk_view_mode_tValues for view mode.
MK_FRAMEBUF_INVALIDdefineMK_FRAMEBUF_INVALIDInvalid sentinel for framebuf.