$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Scene Struct Reference

Encapsulates all 3D scene data, geometry, and rendering state. More...

#include <scene.h>

Collaboration diagram for Scene:
[legend]

Data Fields

IcosphereGeometry geometry
 
InstancedGroup instanced_group
 
BillboardGroup billboard_group
 
SphereSorter sphere_sorter
 
SphereInstancesphere_instances
 
int sphere_instance_count
 
Skybox skybox
 
MaterialLibmaterial_lib
 
char ** hdr_files
 
int hdr_count
 
int current_hdr_index
 
IBLCoordinator ibl_coord
 
LightProbeGrid probe_grid
 
Shaderpbr_instanced_shader
 
Shaderpbr_billboard_shader
 
Shaderdebug_shader
 
Shaderdebug_line_shader
 
Shaderskybox_shader
 
GLuint sphere_vao
 
GLuint sphere_vbo
 
GLuint sphere_nbo
 
GLuint sphere_ebo
 
GLuint quad_vbo
 
GLuint wire_cube_vbo
 
GLuint wire_quad_vbo
 
GLuint hdr_texture
 
GLuint recycled_hdr_tex
 
GLuint spec_prefiltered_tex
 
GLuint irradiance_tex
 
GLuint brdf_lut_tex
 
GLuint empty_vao
 
GLuint shader_spmap
 
GLuint shader_irmap
 
GLuint shader_lum_pass1
 
GLuint shader_lum_pass2
 
GLuint dummy_black_tex
 
GLuint dummy_white_tex
 
GLuint lum_ssbo [2]
 
GLuint transition_snapshot_tex
 
GLuint billboard_ubo
 
void * billboard_ubo_ptr
 
GLuint bound_ibl_textures [IBL_TEXTURE_COUNT]
 
GLuint bound_sh_textures [SH_TEXTURE_COUNT]
 
GLuint bound_probe_ssbo
 
int wireframe
 
int billboard_mode
 
SortingMode sorting_mode
 
int pbr_debug_mode
 
int show_envmap
 
float env_lod
 
int subdivisions
 
GIMode gi_mode
 
int show_probe_grid
 
int specular_aa_enabled
 
AAMode aa_mode
 
BillboardUniforms billboard_uniforms
 
InstancedUniforms instanced_uniforms
 
DebugUniforms debug_uniforms
 

Detailed Description

Encapsulates all 3D scene data, geometry, and rendering state.

Field Documentation

◆ aa_mode

AAMode Scene::aa_mode

AA Mode: Screen-space or Curvature.

◆ billboard_group

BillboardGroup Scene::billboard_group

Managed buffers for billboards.

◆ billboard_mode

int Scene::billboard_mode

Toggle for billboard rendering path.

◆ billboard_ubo

GLuint Scene::billboard_ubo

UBO for billboard per-frame uniforms.

◆ billboard_ubo_ptr

void* Scene::billboard_ubo_ptr

Persistent mapped CPU pointer for UBO.

◆ billboard_uniforms

BillboardUniforms Scene::billboard_uniforms

Cached locations.

◆ bound_ibl_textures

GLuint Scene::bound_ibl_textures[IBL_TEXTURE_COUNT]

Last IBL active.

◆ bound_probe_ssbo

GLuint Scene::bound_probe_ssbo

Last probe SSBO bound.

◆ bound_sh_textures

GLuint Scene::bound_sh_textures[SH_TEXTURE_COUNT]

Last SH tex bound.

◆ brdf_lut_tex

GLuint Scene::brdf_lut_tex

Shared BRDF lookup table.

◆ current_hdr_index

int Scene::current_hdr_index

Index of active HDR in file list.

◆ debug_line_shader

Shader* Scene::debug_line_shader

Shader for wireframe lines.

◆ debug_shader

Shader* Scene::debug_shader

Generic debug/visualization shader.

◆ debug_uniforms

DebugUniforms Scene::debug_uniforms

Cached locations.

◆ dummy_black_tex

GLuint Scene::dummy_black_tex

Safe fallback (0,0,0,1).

◆ dummy_white_tex

GLuint Scene::dummy_white_tex

Safe fallback (1,1,1,1).

◆ empty_vao

GLuint Scene::empty_vao

Vertex-less drawing VAO.

◆ env_lod

float Scene::env_lod

Skybox blurriness.

◆ geometry

IcosphereGeometry Scene::geometry

High-poly sphere mesh data.

◆ gi_mode

GIMode Scene::gi_mode

Selected GI sampling method.

◆ hdr_count

int Scene::hdr_count

Number of available environment maps.

◆ hdr_files

char** Scene::hdr_files

List of found HDR files in assets.

◆ hdr_texture

GLuint Scene::hdr_texture

Active HDR cubemap.

◆ ibl_coord

IBLCoordinator Scene::ibl_coord

IBL state machine (Compute shaders owned by Scene).

◆ instanced_group

InstancedGroup Scene::instanced_group

Managed buffers for opaque spheres.

◆ instanced_uniforms

InstancedUniforms Scene::instanced_uniforms

Cached locations.

◆ irradiance_tex

GLuint Scene::irradiance_tex

Active Irradiance map.

◆ lum_ssbo

GLuint Scene::lum_ssbo[2]

Double-buffered storage for luminance.

◆ material_lib

MaterialLib* Scene::material_lib

Loaded material presets.

◆ pbr_billboard_shader

Shader* Scene::pbr_billboard_shader

Shader for volumetric/alpha spheres.

◆ pbr_debug_mode

int Scene::pbr_debug_mode

Swap to wireframe/normal/roughness

◆ pbr_instanced_shader

Shader* Scene::pbr_instanced_shader

Shared PBR shader for opaque geo.

◆ probe_grid

LightProbeGrid Scene::probe_grid

Global Illumination spatial grid.

◆ quad_vbo

GLuint Scene::quad_vbo

Shared full-screen quad (FSQ).

◆ recycled_hdr_tex

GLuint Scene::recycled_hdr_tex

Recycled texture for next load.

◆ shader_irmap

GLuint Scene::shader_irmap

Internal IBL irradiance shader.

◆ shader_lum_pass1

GLuint Scene::shader_lum_pass1

Luminance downsample pass.

◆ shader_lum_pass2

GLuint Scene::shader_lum_pass2

Mean luminance compute pass.

◆ shader_spmap

GLuint Scene::shader_spmap

Internal IBL specular shader.

◆ show_envmap

int Scene::show_envmap

Draw skybox toggle.

◆ show_probe_grid

int Scene::show_probe_grid

Debug visualization of probes.

◆ skybox

Skybox Scene::skybox

Environment renderer (Shaders owned by Scene).

◆ skybox_shader

Shader* Scene::skybox_shader

Skybox shader wrapper.

◆ sorting_mode

SortingMode Scene::sorting_mode

Selected sorting algorithm.

◆ spec_prefiltered_tex

GLuint Scene::spec_prefiltered_tex

Active Specular map.

◆ specular_aa_enabled

int Scene::specular_aa_enabled

Screen-Space Specular Anti-Aliasing.

◆ sphere_ebo

GLuint Scene::sphere_ebo

Shared index buffer.

◆ sphere_instance_count

int Scene::sphere_instance_count

Active sphere count.

◆ sphere_instances

SphereInstance* Scene::sphere_instances

Persistent array for sorting.

◆ sphere_nbo

GLuint Scene::sphere_nbo

Shared normal buffer.

◆ sphere_sorter

SphereSorter Scene::sphere_sorter

Sorter for alpha blending.

◆ sphere_vao

GLuint Scene::sphere_vao

Shared geometry VAO.

◆ sphere_vbo

GLuint Scene::sphere_vbo

Shared vertex buffer.

◆ subdivisions

int Scene::subdivisions

LOD of the shared icosphere.

◆ transition_snapshot_tex

GLuint Scene::transition_snapshot_tex

For crossfade mode.

◆ wire_cube_vbo

GLuint Scene::wire_cube_vbo

Shared wireframe cube.

◆ wire_quad_vbo

GLuint Scene::wire_quad_vbo

Shared wireframe quad.

◆ wireframe

int Scene::wireframe

OpenGL wireframe mode toggle.


The documentation for this struct was generated from the following file: