AttachmentDesc

sg_attachments_desc

Creation parameters for an sg_attachments object, used as argument to the sg_make_attachments() function.

An attachments object bundles 0..4 color attachments, 0..4 msaa-resolve attachments, and none or one depth-stencil attachmente for use in a render pass. At least one color attachment or one depth-stencil attachment must be provided (no color attachment and a depth-stencil attachment is useful for a depth-only render pass).

Each attachment definition consists of an image object, and two additional indices describing which subimage the pass will render into: one mipmap index, and if the image is a cubemap, array-texture or 3D-texture, the face-index, array-layer or depth-slice.

All attachments must have the same width and height.

All color attachments and the depth-stencil attachment must have the same sample count.

If a resolve attachment is set, an MSAA-resolve operation from the associated color attachment image into the resolve attachment image will take place in the sg_end_pass() function. In this case, the color attachment must have a (sample_count>1), and the resolve attachment a (sample_count==1). The resolve attachment also must have the same pixel format as the color attachment.

NOTE that MSAA depth-stencil attachments cannot be msaa-resolved

extern (C)
struct AttachmentDesc {}

Members

Variables

image
Image image;
Undocumented in source.
mip_level
int mip_level;
Undocumented in source.
slice
int slice;
Undocumented in source.

Meta