|
SBgl 0.1.0
A graphics framework in C99
|


Go to the source code of this file.
Data Structures | |
| struct | sbgl_InstanceData |
| Per-instance data for automated batching. More... | |
| struct | sbgl_Vertex |
| Standard vertex structure for basic geometry rendering. Optimized for cache density (16 bytes). More... | |
| struct | sbgl_DrawPacket |
| Encapsulates all data required to submit a single draw call. Optimized for cache density (16 bytes). More... | |
| struct | sbgl_IndirectCommand |
| Standard Vulkan Indirect Draw command layout. More... | |
| struct | sbgl_VertexAttribute |
| Vertex attribute definition. More... | |
| struct | sbgl_Telemetry |
| Performance telemetry data for a single frame. More... | |
| struct | sbgl_VertexLayout |
| Vertex input layout definition. More... | |
| struct | sbgl_PipelineConfig |
| Configuration for creating a graphics pipeline. More... | |
| struct | sbgl_ErrorDetail |
| Detailed error information for debugging. More... | |
| struct | sbgl_Context |
| Engine context. More... | |
| struct | sbgl_ResourceLimits |
| Resource limits for engine initialization. More... | |
| struct | sbgl_InitConfig |
| Configuration for engine initialization. More... | |
| struct | sbgl_InitResult |
| Result structure for initialization. More... | |
Macros | |
| #define | SBGL_INVALID_HANDLE 0 |
| #define | SBGL_INVALID_OFFSET ((uint32_t)-1) |
| #define | SBGL_PACKET_MESH_MASK 0x7FF |
| #define | SBGL_PACKET_MAT_MASK 0x7FF |
| #define | SBGL_PACKET_BLEND_MASK 0x3 |
| #define | SBGL_PACKET_SIDED_MASK 0x1 |
| #define | SBGL_PACKET_TAGS_MASK 0x7F |
| #define | SBGL_PACKET_MAT_SHIFT 11 |
| #define | SBGL_PACKET_BLEND_SHIFT 22 |
| #define | SBGL_PACKET_SIDED_SHIFT 24 |
| #define | SBGL_PACKET_TAGS_SHIFT 25 |
| #define | SBGL_VOXEL_ID_MASK 0x3FFFF |
| #define | SBGL_VOXEL_SCALE_MASK 0xFF |
| #define | SBGL_VOXEL_SCALE_SHIFT 18 |
| #define | SBGL_VOXEL_MAT_MASK 0x3F |
| #define | SBGL_VOXEL_MAT_SHIFT 26 |
| #define | SBGL_PACK_VOXEL_INSTANCE(id, scale, mat) |
| #define | SBGL_PACK_HEADER(mesh, mat, blend, sided, tags) |
| #define | SBGL_GET_MESH_ID(h) |
| #define | SBGL_GET_MAT_ID(h) |
| #define | SBGL_GET_BLEND_MODE(h) |
| #define | sbgl_DefaultInitConfig |
| Default initialization configuration values. | |
Typedefs | |
| typedef uint32_t | sbgl_Buffer |
| Handle for a GPU-side buffer. | |
| typedef uint32_t | sbgl_Shader |
| Handle for a shader module. | |
| typedef uint32_t | sbgl_Pipeline |
| Handle for a graphics pipeline. | |
| typedef uint32_t | sbgl_ComputePipeline |
| Handle for a compute pipeline. | |
| typedef uint64_t | sbgl_SortKey |
| Bit-packed key used for sorting draw commands to minimize state changes. | |
| typedef struct sbgl_RenderQueue | sbgl_RenderQueue |
| Internal queue used to batch and sort draw packets before submission. | |
| typedef struct sbgl_Context | sbgl_Context |
| Engine context. | |
| typedef struct sbgl_Window | sbgl_Window |
| #define sbgl_DefaultInitConfig |
Default initialization configuration values.
Use this as a starting point for custom configurations:
Definition at line 328 of file sbgl_types.h.
| #define SBGL_GET_BLEND_MODE | ( | h | ) |
Definition at line 91 of file sbgl_types.h.
| #define SBGL_GET_MAT_ID | ( | h | ) |
Definition at line 90 of file sbgl_types.h.
| #define SBGL_GET_MESH_ID | ( | h | ) |
Definition at line 89 of file sbgl_types.h.
| #define SBGL_INVALID_HANDLE 0 |
Definition at line 8 of file sbgl_types.h.
| #define SBGL_INVALID_OFFSET ((uint32_t)-1) |
Definition at line 9 of file sbgl_types.h.
| #define SBGL_PACK_HEADER | ( | mesh, | |
| mat, | |||
| blend, | |||
| sided, | |||
| tags ) |
Definition at line 82 of file sbgl_types.h.
| #define SBGL_PACK_VOXEL_INSTANCE | ( | id, | |
| scale, | |||
| mat ) |
Definition at line 79 of file sbgl_types.h.
| #define SBGL_PACKET_BLEND_MASK 0x3 |
Definition at line 61 of file sbgl_types.h.
| #define SBGL_PACKET_BLEND_SHIFT 22 |
Definition at line 66 of file sbgl_types.h.
| #define SBGL_PACKET_MAT_MASK 0x7FF |
Definition at line 60 of file sbgl_types.h.
| #define SBGL_PACKET_MAT_SHIFT 11 |
Definition at line 65 of file sbgl_types.h.
| #define SBGL_PACKET_MESH_MASK 0x7FF |
Definition at line 59 of file sbgl_types.h.
| #define SBGL_PACKET_SIDED_MASK 0x1 |
Definition at line 62 of file sbgl_types.h.
| #define SBGL_PACKET_SIDED_SHIFT 24 |
Definition at line 67 of file sbgl_types.h.
| #define SBGL_PACKET_TAGS_MASK 0x7F |
Definition at line 63 of file sbgl_types.h.
| #define SBGL_PACKET_TAGS_SHIFT 25 |
Definition at line 68 of file sbgl_types.h.
| #define SBGL_VOXEL_ID_MASK 0x3FFFF |
Definition at line 73 of file sbgl_types.h.
| #define SBGL_VOXEL_MAT_MASK 0x3F |
Definition at line 76 of file sbgl_types.h.
| #define SBGL_VOXEL_MAT_SHIFT 26 |
Definition at line 77 of file sbgl_types.h.
| #define SBGL_VOXEL_SCALE_MASK 0xFF |
Definition at line 74 of file sbgl_types.h.
| #define SBGL_VOXEL_SCALE_SHIFT 18 |
Definition at line 75 of file sbgl_types.h.
| typedef uint32_t sbgl_Buffer |
Handle for a GPU-side buffer.
Definition at line 37 of file sbgl_types.h.
| typedef uint32_t sbgl_ComputePipeline |
Handle for a compute pipeline.
Definition at line 52 of file sbgl_types.h.
| typedef struct sbgl_Context sbgl_Context |
Engine context.
The context serves as the handle for all SBgl operations. It utilizes an opaque pointer pattern to encapsulate internal engine state, ensuring that OS-specific handles and internal memory management are hidden from the public API.
| typedef uint32_t sbgl_Pipeline |
Handle for a graphics pipeline.
Definition at line 47 of file sbgl_types.h.
| typedef struct sbgl_RenderQueue sbgl_RenderQueue |
Internal queue used to batch and sort draw packets before submission.
Definition at line 106 of file sbgl_types.h.
| typedef uint32_t sbgl_Shader |
Handle for a shader module.
Definition at line 42 of file sbgl_types.h.
| typedef uint64_t sbgl_SortKey |
Bit-packed key used for sorting draw commands to minimize state changes.
Definition at line 57 of file sbgl_types.h.
| typedef struct sbgl_Window sbgl_Window |
Definition at line 344 of file sbgl_types.h.
| enum sbgl_BackendType |
Backend types supported by the engine.
| Enumerator | |
|---|---|
| SBGL_BACKEND_VULKAN | |
Definition at line 243 of file sbgl_types.h.
| enum sbgl_BarrierType |
Memory barrier types for compute synchronization.
| Enumerator | |
|---|---|
| SBGL_BARRIER_COMPUTE_TO_COMPUTE | |
| SBGL_BARRIER_COMPUTE_TO_INDIRECT | |
| SBGL_BARRIER_COMPUTE_TO_GRAPHICS | |
| SBGL_BARRIER_GRAPHICS_TO_COMPUTE | |
| SBGL_BARRIER_HOST_TO_COMPUTE | |
| SBGL_BARRIER_HOST_TO_GRAPHICS | |
Definition at line 142 of file sbgl_types.h.
| enum sbgl_BlendMode |
Blending modes for pipeline color attachments.
| Enumerator | |
|---|---|
| SBGL_BLEND_MODE_NONE | |
| SBGL_BLEND_MODE_ALPHA | |
| SBGL_BLEND_MODE_ADDITIVE | |
Definition at line 195 of file sbgl_types.h.
| enum sbgl_BufferUsage |
Buffer usage flags.
| Enumerator | |
|---|---|
| SBGL_BUFFER_USAGE_VERTEX | |
| SBGL_BUFFER_USAGE_INDEX | |
| SBGL_BUFFER_USAGE_STORAGE | |
| SBGL_BUFFER_USAGE_INDIRECT | |
| SBGL_BUFFER_USAGE_TRANSFER_DST | |
Definition at line 122 of file sbgl_types.h.
| enum sbgl_Format |
Data formats for vertex attributes.
| Enumerator | |
|---|---|
| SBGL_FORMAT_R32_SFLOAT | |
| SBGL_FORMAT_R32G32_SFLOAT | |
| SBGL_FORMAT_R32G32B32_SFLOAT | |
| SBGL_FORMAT_R32G32B32A32_SFLOAT | |
| SBGL_FORMAT_R16G16B16A16_SNORM | |
| SBGL_FORMAT_R8G8B8A8_UNORM | |
Definition at line 154 of file sbgl_types.h.
| enum sbgl_platform_Result |
Result codes for platform layer operations.
| Enumerator | |
|---|---|
| SBGL_PLATFORM_SUCCESS | |
| SBGL_PLATFORM_ERROR_WINDOW_FAILED | |
| SBGL_PLATFORM_ERROR_NO_DISPLAY | |
| SBGL_PLATFORM_ERROR_INIT_FAILED | |
Definition at line 233 of file sbgl_types.h.
| enum sbgl_Result |
Result codes for engine operations.
Definition at line 214 of file sbgl_types.h.
| enum sbgl_ShaderStage |
Shader stage flags.
| Enumerator | |
|---|---|
| SBGL_SHADER_STAGE_VERTEX | |
| SBGL_SHADER_STAGE_FRAGMENT | |
| SBGL_SHADER_STAGE_COMPUTE | |
Definition at line 133 of file sbgl_types.h.