Skip to content
/ glad Public
forked from Dav1dde/glad

Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.

License

Notifications You must be signed in to change notification settings

simboocn/glad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glad

GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.

Check out the webservice to generate the files you need!

Examples

#include <glad/gl.h>
// GLFW (include after glad)
#include <GLFW/glfw3.h>


int main() {
    // -- snip --

    GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "LearnOpenGL", NULL, NULL);
    glfwMakeContextCurrent(window);

    int version = gladLoadGLSimple((GLADsimpleloadproc) glfwGetProcAddress);
    if (version == 0) {
        printf("Failed to initialize OpenGL context\n");
        return -1;
    }

    // Successfully loaded OpenGL
    printf("Loaded OpenGL %d.%d\n", version / 10, version % 10);

    // -- snip --
}

The full code: hellowindow2.cpp

More examples in the examples directory of this repository.

About

Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 58.2%
  • Python 26.7%
  • Rust 6.0%
  • Shell 3.6%
  • CMake 2.9%
  • C++ 2.6%