6#ifndef BILLBOARD_RENDERER_H
7#define BILLBOARD_RENDERER_H
29 int32_t probe_grid_dim[3];
88 GLuint wire_quad_vbo, GLuint wire_cube_vbo);
102 GLuint pbr_billboard_shader,
103 GLuint debug_line_shader,
void* billboard_ubo_ptr);
void billboard_renderer_draw(BillboardRenderer *renderer, const BillboardRenderParams *params, GLuint pbr_billboard_shader, GLuint debug_line_shader, void *billboard_ubo_ptr)
Executes the sorting, UBO upload, and drawing commands for all billboards.
Definition billboard_renderer.c:307
void billboard_renderer_init(BillboardRenderer *renderer, int initial_capacity)
Initializes the billboard renderer and allocates internal sorter buffers.
Definition billboard_renderer.c:56
void billboard_renderer_cleanup(BillboardRenderer *renderer)
Releases all GPU resources allocated for the billboard renderer.
Definition billboard_renderer.c:332
void billboard_renderer_prepare(BillboardRenderer *renderer, GLuint quad_vbo, GLuint wire_quad_vbo, GLuint wire_cube_vbo)
Prepares the VAO by linking the shared quad, wire quad, and wire cube VBOs.
Definition billboard_renderer.c:89
Back-to-front sorting for transparent billboard geometry.
Common OpenGL definitions, RAII helpers, and utilities.
Render configuration flags extracted from Scene.
SortingMode
Sorting algorithms for transparent billboards.
Definition scene_config.h:15
Pure-data type for per-instance sphere attributes.
Parameters required to execute a billboard rendering pass, decoupled from Scene.
Definition billboard_renderer.h:20
mat4 projection
Definition billboard_renderer.h:21
mat4 previous_view_proj
Definition billboard_renderer.h:23
SortingMode sorting_mode
Definition billboard_renderer.h:36
int32_t aa_mode
Definition billboard_renderer.h:32
mat4 view
Definition billboard_renderer.h:22
const SphereInstance * instances
Definition billboard_renderer.h:39
vec3 probe_grid_max
Definition billboard_renderer.h:28
int instance_count
Definition billboard_renderer.h:40
bool wireframe
Definition billboard_renderer.h:35
int32_t gi_mode
Definition billboard_renderer.h:30
bool specular_aa_enabled
Definition billboard_renderer.h:31
int32_t pbr_debug_mode
Definition billboard_renderer.h:25
vec3 camera_pos
Definition billboard_renderer.h:24
vec3 probe_grid_min
Definition billboard_renderer.h:27
Manages billboard rendering buffers, VAO state, and the internal sorter.
Definition billboard_renderer.h:48
GLuint vao_wire_quad
Definition billboard_renderer.h:54
int instance_count
Definition billboard_renderer.h:52
GLint loc_stippled
Definition billboard_renderer.h:65
GLint loc_use_instance_col
Definition billboard_renderer.h:67
GLint loc_billboard_mode
Definition billboard_renderer.h:66
GLuint vao
Definition billboard_renderer.h:50
GLuint vao_wire_box
Definition billboard_renderer.h:55
GLuint cached_debug_program
Definition billboard_renderer.h:62
int capacity
Definition billboard_renderer.h:53
GLint loc_color
Definition billboard_renderer.h:68
GLuint instance_vbo
Definition billboard_renderer.h:51
GLint loc_view
Definition billboard_renderer.h:64
GLint loc_proj
Definition billboard_renderer.h:63
BillboardSorter sorter
Definition billboard_renderer.h:58
Reusable memory context for sorting operations.
Definition billboard_sorter.h:27
Per-instance data sent to the shader via an instanced VBO.
Definition sphere_types.h:25