Pass

sg_pass

The sg_pass structure is passed as argument into the sg_begin_pass() function.

For a swapchain render pass, provide an sg_pass_action and sg_swapchain struct (for instance via the sglue_swapchain() helper function from sokol_glue.h):

sg_begin_pass(&(sg_pass){ .action = { ... }, .swapchain = sglue_swapchain(), });

For an offscreen render pass, provide an sg_pass_action struct and an sg_attachments handle:

sg_begin_pass(&(sg_pass){ .action = { ... }, .attachments = attachments, });

You can also omit the .action object to get default pass action behaviour (clear to color=grey, depth=1 and stencil=0).

For a compute pass, just set the sg_pass.compute boolean to true:

sg_begin_pass(&(sg_pass){ .compute = true });

Members

Variables

_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.
compute
bool compute;
Undocumented in source.
label
const(char)* label;
Undocumented in source.
swapchain
Swapchain swapchain;
Undocumented in source.

Meta