nicegraf
ngf::descriptor_set< S >::binding< B > Struct Template Reference

Static Public Member Functions

static ngf_resource_bind_op texture (const ngf_image image)
 
static ngf_resource_bind_op storage_image (const ngf_image image)
 
static ngf_resource_bind_op storage_buffer (const ngf_buffer buf, size_t offset, size_t range)
 
static ngf_resource_bind_op uniform_buffer (const ngf_buffer buf, size_t offset, size_t range)
 
static ngf_resource_bind_op texel_buffer (const ngf_texel_buffer_view buf_view)
 
static ngf_resource_bind_op sampler (const ngf_sampler sampler)
 
static ngf_resource_bind_op texture_and_sampler (const ngf_image image, const ngf_sampler sampler)
 

Detailed Description

template<uint32_t S>
template<uint32_t B>
struct ngf::descriptor_set< S >::binding< B >

Convenience wrapper for binding resources. See cmd_bind_resources for details.

Member Function Documentation

◆ sampler()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::sampler ( const ngf_sampler sampler)
inlinestatic

Creates a ngf_resource_bind_op for a sampler.

Parameters
samplerThe sampler to use.

◆ storage_buffer()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::storage_buffer ( const ngf_buffer buf,
size_t offset,
size_t range )
inlinestatic

Creates a ngf_resource_bind_op for an storage buffer.

Parameters
bufThe buffer to bind as a storage buffer.
offsetThe offset at which to bind the buffer.
rangeThe extent of the bound memory.

◆ storage_image()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::storage_image ( const ngf_image image)
inlinestatic

Creates a ngf_resource_bind_op for an ngf_image that is to be used as a storage image

Parameters
imageThe image to bind.

◆ texel_buffer()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::texel_buffer ( const ngf_texel_buffer_view buf_view)
inlinestatic

Creates a ngf_resource_bind_op for a texel buffer.

Parameters
bufThe buffer to bind as a texel buffer.
offsetThe offset at which to bind the buffer.
rangeThe extent of the bound memory.
fmtThe texel format expected by the shader.

◆ texture()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::texture ( const ngf_image image)
inlinestatic

Creates a ngf_resource_bind_op for a ngf_image.

Parameters
imageThe image to bind.

◆ texture_and_sampler()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::texture_and_sampler ( const ngf_image image,
const ngf_sampler sampler )
inlinestatic

Creates a ngf_resource_bind_op for a combined image + sampler.

Parameters
imageThe image part of the combined image + sampler.
samplerThe sampler part of the combined image + sampler.

◆ uniform_buffer()

template<uint32_t S>
template<uint32_t B>
static ngf_resource_bind_op ngf::descriptor_set< S >::binding< B >::uniform_buffer ( const ngf_buffer buf,
size_t offset,
size_t range )
inlinestatic

Creates a ngf_resource_bind_op for an uniform buffer.

Parameters
bufThe buffer to bind as a uniform buffer.
offsetThe offset at which to bind the buffer.
rangeThe extent of the bound memory.