nicegraf
C++ Wrappers

Detailed Description

This module contains optional C++ wrappers for certain nicegraf structures and routines.

Data Structures

class  ngf::ngf_handle< T, ObjectManagementFuncs >
 
class  ngf::render_encoder
 
class  ngf::xfer_encoder
 
class  ngf::compute_encoder
 
struct  ngf::descriptor_set< S >
 
class  ngf::uniform_multibuffer< T >
 

Macros

#define NGF_RETURN_IF_ERROR(expr)
 

Typedefs

using ngf::shader_stage = ngf_handle<ngf_shader_stage, ngf_shader_stage_ManagementFuncs>
 
using ngf::graphics_pipeline = ngf_handle<ngf_graphics_pipeline, ngf_graphics_pipeline_ManagementFuncs>
 
using ngf::compute_pipeline = ngf_handle<ngf_compute_pipeline, ngf_compute_pipeline_ManagementFuncs>
 
using ngf::image = ngf_handle<ngf_image, ngf_image_ManagementFuncs>
 
using ngf::sampler = ngf_handle<ngf_sampler, ngf_sampler_ManagementFuncs>
 
using ngf::render_target = ngf_handle<ngf_render_target, ngf_render_target_ManagementFuncs>
 
using ngf::buffer = ngf_handle<ngf_buffer, ngf_buffer_ManagementFuncs>
 
using ngf::texel_buffer_view = ngf_handle<ngf_texel_buffer_view, ngf_texel_buffer_view_ManagementFuncs>
 
using ngf::context = ngf_handle<ngf_context, ngf_context_ManagementFuncs>
 
using ngf::cmd_buffer = ngf_handle<ngf_cmd_buffer, ngf_cmd_buffer_ManagementFuncs>
 

Functions

template<class... Args>
void ngf::cmd_bind_resources (ngf_render_encoder enc, const Args &&... args)
 
template<class... Args>
void ngf::cmd_bind_resources (ngf_compute_encoder enc, const Args &&... args)
 

Macro Definition Documentation

◆ NGF_RETURN_IF_ERROR

#define NGF_RETURN_IF_ERROR ( expr)
Value:
{ \
const ngf_error tmp = (expr); \
if (tmp != NGF_ERROR_OK) return tmp; \
}
ngf_error
Definition nicegraf.h:293
@ NGF_ERROR_OK
Definition nicegraf.h:296

A convenience macro to allow easily propagating nicegraf errors. The provided expression must evaluate to a ngf_error. If the result of the expression is not NGF_ERROR_OK, the value is returned from the calling function. Note: the calling function must also return an ngf_error.

Typedef Documentation

◆ buffer

◆ cmd_buffer

◆ compute_pipeline

◆ context

◆ graphics_pipeline

◆ image

◆ render_target

◆ sampler

◆ shader_stage

◆ texel_buffer_view

Function Documentation

◆ cmd_bind_resources() [1/2]

template<class... Args>
void ngf::cmd_bind_resources ( ngf_compute_encoder enc,
const Args &&... args )

A convenience function for binding many resources at once to the shader. Example usage:

ngf::cmd_bind_resources(your_compute_encoder,
void cmd_bind_resources(ngf_render_encoder enc, const Args &&... args)
Definition nicegraf-wrappers.h:577
Definition nicegraf-wrappers.h:445

◆ cmd_bind_resources() [2/2]

template<class... Args>
void ngf::cmd_bind_resources ( ngf_render_encoder enc,
const Args &&... args )

A convenience function for binding many resources at once to the shader. Example usage: