10#ifndef INSTANCED_RENDERING_H
11#define INSTANCED_RENDERING_H
Common OpenGL definitions, RAII helpers, and utilities.
void instanced_group_cleanup(InstancedGroup *group)
Releases all GPU resources for the instanced group.
Definition instanced_rendering.c:82
void instanced_group_update(InstancedGroup *group, const SphereInstance *data, int count)
Updates the instance VBO with new data (e.g., N-body positions).
Definition instanced_rendering.c:66
void instanced_group_init(InstancedGroup *group, const SphereInstance *data, int count)
Allocates the instance VBO on the GPU.
Definition instanced_rendering.c:8
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:21
void instanced_group_draw(InstancedGroup *group, size_t index_count)
Executes an indexed instanced draw call.
Definition instanced_rendering.c:75
Pure-data type for per-instance sphere attributes.
Manages mesh-based instanced spheres on the GPU.
Definition instanced_rendering.h:20
GLuint vao
Definition instanced_rendering.h:21
GLuint instance_vbo
Definition instanced_rendering.h:23
int instance_count
Definition instanced_rendering.h:24
Per-instance data sent to the shader via an instanced VBO.
Definition sphere_types.h:25