|
| 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.
|
| |
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.