Pass
extern (C)
struct Pass {
}
- _end_canary
uint _end_canary;
Undocumented in source.
- _start_canary
uint _start_canary;
Undocumented in source.
- action
PassAction action;
Undocumented in source.
- attachments
Attachments attachments;
Undocumented in source.
- label
const(char)* label;
Undocumented in source.
- swapchain
Swapchain swapchain;
Undocumented in source.
sokol gfx
enumsfunctionsmanifest constantsstructs
sg_pass
The sg_pass structure is passed as argument into the sg_begin_pass() function.
For an offscreen rendering pass, an sg_pass_action struct and sg_attachments object must be provided, and for swapchain passes, an sg_pass_action and an sg_swapchain struct. It is an error to provide both an sg_attachments handle and an initialized sg_swapchain struct in the same sg_begin_pass().
An sg_begin_pass() call for an offscreen pass would look like this (where attachments is an sg_attachments handle):
sg_begin_pass(&(sg_pass){ .action = { ... }, .attachments = attachments, });
...and a swapchain render pass would look like this (using the sokol_glue.h helper function sglue_swapchain() which gets the swapchain properties from sokol_app.h):
sg_begin_pass(&(sg_pass){ .action = { ... }, .swapchain = sglue_swapchain(), });
You can also omit the .action object to get default pass action behaviour (clear to color=grey, depth=1 and stencil=0)