|
RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
|
Optional volume renderer; not included by the RMGui umbrella. More...
#include "gpu_sokol.h"Data Structures | |
| struct | rmgui_gpu_cloud_orb_params_t |
| Exactly eight contiguous, 16-byte-aligned vec4 uniforms (128 bytes). More... | |
| struct | rmgui_gpu_cloud_orb_motion_t |
| Zero initializes idle motion. More... | |
Typedefs | |
| typedef struct rmgui_gpu_cloud_orb | rmgui_gpu_cloud_orb_t |
| Owned shader, pipeline and immutable fullscreen triangle for one target format. | |
Functions | |
| rmgui_gpu_result_t | rmgui_gpu_cloud_orb_create (rmgui_gpu_cloud_orb_t **out, const rmgui_gpu_desc_t *desc) |
| Allocate outside a host pass. | |
| void | rmgui_gpu_cloud_orb_destroy (rmgui_gpu_cloud_orb_t *g) |
| Release outside a pass; NULL is a no-op. | |
| rmgui_gpu_cloud_orb_params_t | rmgui_gpu_cloud_orb_default_params (float aspect) |
| Return delivered palette/camera defaults, radius .99, detail 3.8, 48 steps. | |
| rmgui_gpu_result_t | rmgui_gpu_cloud_orb_motion_update (rmgui_gpu_cloud_orb_motion_t *motion, int hovered, float dt) |
| Integrate continuous phase and activity: hover rises in 2s, exit falls in .5s. | |
| void | rmgui_gpu_cloud_orb_begin (rmgui_gpu_cloud_orb_t *g, const rmgui_gpu_frame_t *frame) |
| Begin INSIDE the host pass with positive target dimensions. | |
| rmgui_gpu_result_t | rmgui_gpu_cloud_orb_draw (rmgui_gpu_cloud_orb_t *g, const rmgui_gpu_cloud_orb_params_t *params, rmgui_rect_t dst, rmgui_rect_t clip) |
| Allocation-free volume draw in top-left, y-down dst/clip device pixels. | |
| void | rmgui_gpu_cloud_orb_end (rmgui_gpu_cloud_orb_t *g) |
| Deactivate without ending the host pass or restoring any host state. | |
Optional volume renderer; not included by the RMGui umbrella.
The host owns sokol's implementation, context, setup/shutdown, passes and commits. All calls use its sg thread; destroy before sg_shutdown.
| typedef struct rmgui_gpu_cloud_orb rmgui_gpu_cloud_orb_t |
Owned shader, pipeline and immutable fullscreen triangle for one target format.
| rmgui_gpu_result_t rmgui_gpu_cloud_orb_create | ( | rmgui_gpu_cloud_orb_t ** | out, |
| const rmgui_gpu_desc_t * | desc ) |
Allocate outside a host pass.
Explicit formats/sample count match that pass. Failure leaves *out unchanged; E_ARGS invalid desc, E_STATE no sg/outside-pass violation, E_BACKEND unsupported target/backend or allocation/resource failure.
| void rmgui_gpu_cloud_orb_destroy | ( | rmgui_gpu_cloud_orb_t * | g | ) |
Release outside a pass; NULL is a no-op.
| rmgui_gpu_cloud_orb_params_t rmgui_gpu_cloud_orb_default_params | ( | float | aspect | ) |
Return delivered palette/camera defaults, radius .99, detail 3.8, 48 steps.
aspect must be finite and positive; recompute when destination aspect changes. Assign motion.phase/activity to motion[0]/[1] before drawing.
| rmgui_gpu_result_t rmgui_gpu_cloud_orb_motion_update | ( | rmgui_gpu_cloud_orb_motion_t * | motion, |
| int | hovered, | ||
| float | dt ) |
Integrate continuous phase and activity: hover rises in 2s, exit falls in .5s.
dt is finite, nonnegative seconds. hovered must be 0 or 1. Invalid state or arguments return E_ARGS without mutation; otherwise returns OK.
| void rmgui_gpu_cloud_orb_begin | ( | rmgui_gpu_cloud_orb_t * | g, |
| const rmgui_gpu_frame_t * | frame ) |
Begin INSIDE the host pass with positive target dimensions.
Invalid inputs leave the region inactive. State clobbered through end: pipeline, bindings, uniforms, viewport and scissor. The host reapplies its state afterwards.
| rmgui_gpu_result_t rmgui_gpu_cloud_orb_draw | ( | rmgui_gpu_cloud_orb_t * | g, |
| const rmgui_gpu_cloud_orb_params_t * | params, | ||
| rmgui_rect_t | dst, | ||
| rmgui_rect_t | clip ) |
Allocation-free volume draw in top-left, y-down dst/clip device pixels.
Nonempty clip intersects dst and target. Failure changes no GPU state or target: E_ARGS for invalid/nonfinite uniforms, empty rectangles, dst endpoints or target-height-minus-dst-bottom outside int range; E_LIMIT for dst dimensions above sg_query_limits().max_image_size_2d (the conservative viewport limit); E_STATE outside an active region/pass, E_BACKEND for lost resources. Uniform input is never mutated. Output is straight LINEAR RGBA; RGB blends SRC_ALPHA/ONE_MINUS_SRC_ALPHA, alpha ONE/ONE_MINUS_SRC_ALPHA. No depth writes or scene-depth intersection. Draw after opaque content and before the transparent shell. The host must use an sRGB attachment or a linear intermediate with a later transfer pass; never blend linear output into an already sRGB-encoded UNORM target.
| void rmgui_gpu_cloud_orb_end | ( | rmgui_gpu_cloud_orb_t * | g | ) |
Deactivate without ending the host pass or restoring any host state.