Nimbin[12]?Games / Entropie / entropie/src/render/skybox.h

Entropie git · main

Entropie festival game; first steps

sdl c game entropie cmake · first commit 2026-10-10 · last commit 2026-11-02 (18 hours ago) · synced 10 hours ago

C 88.5% Markdown 9.1% GLSL 2.3%
git clone https://git.christianimmanuel.de/games/Entropie.gitwget https://git.christianimmanuel.de/games/Entropie/archive/Entropie.tar.gz
entropie/src/render/skybox.h 751 B · 26 lines raw
#ifndef RENDER_SKYBOX_H
#define RENDER_SKYBOX_H

/* Painted day/night sky with clouds, sun and moon (clouding over with the weather).
   Drawn after the solid things, before what floats in the air (rain, smoke). */

#include <stdbool.h>

#include "core/gl.h"
#include "render/camera.h"
#include "render/renderer.h"

typedef struct {
    GLuint vao;
    GLuint vbo;
    GLuint program;
    GLint  u_view, u_projection, u_sky_time;
    GLint  u_sun_dir, u_light_color, u_sky_top, u_sky_horizon, u_day_factor, u_overcast;
} Skybox;

bool Skybox_init(Skybox *sky);
void Skybox_draw(const Skybox *sky, const Renderer *renderer, const Camera *camera,
                 const Lighting *light);
void Skybox_shutdown(Skybox *sky);

#endif /* RENDER_SKYBOX_H */