Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::model::submit_vertex_pulling_callbacks Struct Reference

Callbacks for submitting the model using vertex-pulling rendering. More...

#include <model.h>

Classes

struct  params
 Per-invocation information for a vertex-pulling submesh submit. More...
 

Public Attributes

std::function< void(const params &info)> setup_begin
 Called once per pass (once for non-skinned, once for skinned). Typically used to bind the program.
 
std::function< void(const params &info)> setup_params_per_instance
 Called once per pass after setup_begin. Typically used to set instance-level uniforms.
 
std::function< void(const params &info)> setup_params_per_submesh
 Called once per submesh instance after u_world and the raw VB/IB have been bound.
 
std::function< void(const params &info)> setup_end
 Called once per pass at the end. Typically used to end the program.
 

Detailed Description

Callbacks for submitting the model using vertex-pulling rendering.

Vertex-pulling rendering procedurally generates vertices in the vertex shader from gl_VertexID and reads per-vertex data (positions, bone indices, bone weights, ...) directly from the vertex buffer bound as a read-only compute buffer. Before each per-submesh callback the model has already:

  • Set u_world via gfx::set_world_transform() with either the per- submesh non-skinned matrix or the per-submesh bone matrices.
  • Bound the mesh's hardware vertex buffer on compute stage 0 and its hardware index buffer on compute stage 1 (both read-only). The callback is expected to set the shader program, any additional uniforms, render state, call gfx::set_vertex_count(...) with the effect-specific vertex multiplier, and finally gfx::submit(...) on the desired view.

Definition at line 607 of file model.h.

Member Data Documentation

◆ setup_begin

std::function<void(const params& info)> unravel::model::submit_vertex_pulling_callbacks::setup_begin

Called once per pass (once for non-skinned, once for skinned). Typically used to bind the program.

Definition at line 632 of file model.h.

◆ setup_end

std::function<void(const params& info)> unravel::model::submit_vertex_pulling_callbacks::setup_end

Called once per pass at the end. Typically used to end the program.

Definition at line 638 of file model.h.

◆ setup_params_per_instance

std::function<void(const params& info)> unravel::model::submit_vertex_pulling_callbacks::setup_params_per_instance

Called once per pass after setup_begin. Typically used to set instance-level uniforms.

Definition at line 634 of file model.h.

◆ setup_params_per_submesh

std::function<void(const params& info)> unravel::model::submit_vertex_pulling_callbacks::setup_params_per_submesh

Called once per submesh instance after u_world and the raw VB/IB have been bound.

Definition at line 636 of file model.h.


The documentation for this struct was generated from the following file: