Nimbin[12]?Games / Entropie / entropie/src/core/gl.c

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/core/gl.c 595 B · 22 lines raw
#include "core/gl.h"

#include <SDL3/SDL.h>

#define GL_DEFINE_FN(type, name) type name = NULL;
GL_FUNCTION_LIST(GL_DEFINE_FN)
#undef GL_DEFINE_FN

bool Gl_load(void) {
    bool ok = true;

#define GL_LOAD_FN(type, name)                                  \
    name = (type)SDL_GL_GetProcAddress(#name);                  \
    if (!name) {                                                \
        SDL_Log("OpenGL function missing: %s", #name);          \
        ok = false;                                             \
    }
    GL_FUNCTION_LIST(GL_LOAD_FN)
#undef GL_LOAD_FN

    return ok;
}