|
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
|
Unified billboard sorting and rendering system. More...
#include "billboard_sorter.h"#include "gl_common.h"#include "scene_config.h"#include "sphere_types.h"#include <cglm/cglm.h>Go to the source code of this file.
Data Structures | |
| struct | BillboardRenderParams |
| Parameters required to execute a billboard rendering pass, decoupled from Scene. More... | |
| struct | BillboardRenderer |
| Manages billboard rendering buffers, VAO state, and the internal sorter. More... | |
Functions | |
| void | billboard_renderer_init (BillboardRenderer *renderer, int initial_capacity) |
| Initializes the billboard renderer and allocates internal sorter buffers. | |
| 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. | |
| 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. | |
| void | billboard_renderer_cleanup (BillboardRenderer *renderer) |
| Releases all GPU resources allocated for the billboard renderer. | |
Unified billboard sorting and rendering system.
| void billboard_renderer_cleanup | ( | BillboardRenderer * | renderer | ) |
Releases all GPU resources allocated for the billboard renderer.
| renderer | Pointer to the renderer struct. |
| 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.
| renderer | Pointer to the renderer struct. |
| params | Stateless parameter block. |
| pbr_billboard_shader | Shader used for the primary PBR pass. |
| debug_line_shader | Shader used for the wireframe debug overlays. |
| billboard_ubo_ptr | Mapped UBO pointer to copy the BillboardUBO struct to. |
| void billboard_renderer_init | ( | BillboardRenderer * | renderer, |
| int | initial_capacity | ||
| ) |
Initializes the billboard renderer and allocates internal sorter buffers.
| renderer | Pointer to the renderer struct. |
| initial_capacity | Expected number of instances. |
| 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.
| renderer | Pointer to the renderer struct. |
| quad_vbo | VBO containing basic quad geometry. |
| wire_quad_vbo | VBO for debug wireframe quad. |
| wire_cube_vbo | VBO for debug wireframe unit box. |