Skip to content

itsYakub/gload.h

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gload.h - single-header only OpenGL loader

gload.h is a single-header only legacy, modern and embedded-systems OpenGL loader, based on the official KhronosGroup's OpenGL Registry. It's simple, easy to use, highly configurable with support for GNU/Linux, MacOS and Windows Operating Systems.

Usage

gload.h is designed to be simple drag-n-drop library for your common C/C++ projects. Simply include it in your project. There's no need to link with any library, unless you explicitly specify one of 3 backends: GLX, EGL or WGL.

#define GLOAD_IMPLEMENTATION
#include "gload.h"

int main(void) {
    if (!gloadLoadGL()) { return (1); }

    /* ... */
    
    glClearColor(1.0, 0.1, 0.1, 1.0);
    glClear(GL_COLOR_BUFFER_BIT);

    /* ... */

    return (0);
}

Credits

Credits for gload.h must be given where it's needed. The whole project is based on:

Huge inspiration for the project and giant help in it's design were:

Licence

This project is licenced under LGPL-3 Licence.