$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
instanced_rendering.c File Reference
#include "instanced_rendering.h"
#include "gl_common.h"
#include "render_utils.h"
#include <stddef.h>
Include dependency graph for instanced_rendering.c:

Functions

void instanced_group_init (InstancedGroup *group, const SphereInstance *data, int count)
 Allocates the instance VBO on the GPU. More...
 
static void setup_instance_attributes (void)
 
void instanced_group_bind_mesh (InstancedGroup *group, GLuint vbo, GLuint nbo, GLuint ebo)
 Binds a procedural mesh (e.g., icosphere) to the instanced group. More...
 
void instanced_group_draw (InstancedGroup *group, size_t index_count)
 Executes an indexed instanced draw call. More...
 
void instanced_group_cleanup (InstancedGroup *group)
 Releases all GPU resources for the instanced group. More...
 

Function Documentation

◆ instanced_group_bind_mesh()

void instanced_group_bind_mesh ( InstancedGroup group,
GLuint  vbo,
GLuint  nbo,
GLuint  ebo 
)

Binds a procedural mesh (e.g., icosphere) to the instanced group.

Parameters
groupPointer to the group.
vboMesh vertex VBO.
nboMesh normal VBO.
eboMesh index EBO.
Here is the call graph for this function:

◆ instanced_group_cleanup()

void instanced_group_cleanup ( InstancedGroup group)

Releases all GPU resources for the instanced group.

Parameters
groupPointer to the group.

◆ instanced_group_draw()

void instanced_group_draw ( InstancedGroup group,
size_t  index_count 
)

Executes an indexed instanced draw call.

Parameters
groupPointer to the group.
index_countNumber of indices in the base mesh.

◆ instanced_group_init()

void instanced_group_init ( InstancedGroup group,
const SphereInstance data,
int  count 
)

Allocates the instance VBO on the GPU.

Parameters
groupPointer to the group.
dataInitial data (optional).
countNumber of instances.

◆ setup_instance_attributes()

static void setup_instance_attributes ( void  )
static
Here is the call graph for this function: