10 #ifndef INSTANCED_RENDERING_H
11 #define INSTANCED_RENDERING_H
14 #include <cglm/cglm.h>
Common OpenGL definitions, RAII helpers, and utilities.
@ SIMD_ALIGNMENT
Definition: gl_common.h:131
void instanced_group_cleanup(InstancedGroup *group)
Releases all GPU resources for the instanced group.
Definition: instanced_rendering.c:74
void instanced_group_init(InstancedGroup *group, const SphereInstance *data, int count)
Allocates the instance VBO on the GPU.
Definition: instanced_rendering.c:7
void instanced_group_bind_mesh(InstancedGroup *group, GLuint vbo, GLuint nbo, GLuint ebo)
Binds a procedural mesh (e.g., icosphere) to the instanced group.
Definition: instanced_rendering.c:28
void instanced_group_draw(InstancedGroup *group, size_t index_count)
Executes an indexed instanced draw call.
Definition: instanced_rendering.c:67
Manages mesh-based instanced spheres on the GPU.
Definition: instanced_rendering.h:36
GLuint vao
Definition: instanced_rendering.h:37
GLuint instance_vbo
Definition: instanced_rendering.h:39
int instance_count
Definition: instanced_rendering.h:40
Per-instance data sent to the shader via an instanced VBO.
Definition: instanced_rendering.h:23
float padding
Definition: instanced_rendering.h:29
float metallic
Definition: instanced_rendering.h:26
mat4 model
Definition: instanced_rendering.h:24
float ao
Definition: instanced_rendering.h:28
float roughness
Definition: instanced_rendering.h:27
vec3 albedo
Definition: instanced_rendering.h:25