Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
skybox.h
Go to the documentation of this file.
1
10#ifndef SKYBOX_H
11#define SKYBOX_H
12
13#include "gl_common.h"
14#include <cglm/types.h>
15
16typedef struct Shader Shader;
17
22typedef struct {
23 GLuint vao;
24 GLuint vbo;
26 /* Cached uniform locations */
29 GLint u_blur_lod;
30 GLint u_env_map;
31} Skybox;
32
38void skybox_init(Skybox* skybox, Shader* shader);
39
49void skybox_render(Skybox* skybox, Shader* shader, GLuint env_map,
50 GLuint fallback_tex, const mat4 inv_view_proj,
51 float blur_lod);
52
57void skybox_cleanup(Skybox* skybox);
58
59#endif /* SKYBOX_H */
Common OpenGL definitions, RAII helpers, and utilities.
void skybox_cleanup(Skybox *skybox)
Cleans up GPU resources.
Definition skybox.c:70
void skybox_render(Skybox *skybox, Shader *shader, GLuint env_map, GLuint fallback_tex, const mat4 inv_view_proj, float blur_lod)
Renders the skybox to the current framebuffer.
Definition skybox.c:37
void skybox_init(Skybox *skybox, Shader *shader)
Initializes skybox geometry and caches uniform locations.
Definition skybox.c:9
Wrapper for an OpenGL program with uniform caching and automatic cleanup.
Definition shader.h:71
Persistent state and resource handles for the environment renderer.
Definition skybox.h:22
GLint u_inv_view_proj
Definition skybox.h:27
GLuint vbo
Definition skybox.h:24
GLuint vao
Definition skybox.h:23
GLint u_env_map
Definition skybox.h:30
GLint u_blur_lod
Definition skybox.h:29