.texture a texture-view object will be created .image the sg_image parent resource .mip_levels optional mip-level range, keep zero-initialized for the entire mipmap chain .base the first mip level .count number of mip levels, keeping this zero-initialized means 'all remaining mip levels' .slices optional slice range, keep zero-initialized to include all slices .base the first slice .count number of slices, keeping this zero-initializied means 'all remaining slices'
.storage_buffer a storage-buffer-view object will be created .buffer the sg_buffer parent resource, must have been created with sg_buffer_desc.usage.storage_buffer = true .offset optional 256-byte aligned byte-offset into the buffer
.storage_image a storage-image-view object will be created .image the sg_image parent resource, must have been created with sg_image_desc.usage.storage_image = true .mip_level selects the mip-level for the compute shader to write .slice selects the slice for the compute shader to write
.color_attachment a color-attachment-view object will be created .image the sg_image parent resource, must have been created with sg_image_desc.usage.color_attachment = true .mip_level selects the mip-level to render into .slice selects the slice to render into
.resolve_attachment a resolve-attachment-view object will be created .image the sg_image parent resource, must have been created with sg_image_desc.usage.resolve_attachment = true .mip_level selects the mip-level to msaa-resolve into .slice selects the slice to msaa-resolve into
.depth_stencil_attachment a depth-stencil-attachment-view object will be created .image the sg_image parent resource, must have been created with sg_image_desc.usage.depth_stencil_attachment = true .mip_level selects the mip-level to render into .slice selects the slice to render into
sg_view_desc
Creation params for sg_view objects, passed into sg_make_view() calls.
View objects are passed into sg_apply_bindings() (for texture-, storage-buffer- and storage-image views), and sg_begin_pass() (for color-, resolve- and depth-stencil-attachment views).
The view type is determined by initializing one of the sub-structs of