npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

glad.c

v1.2025.12

Published

Vulkan/GL/GLES/EGL/GLX/WGL Loader based on the official specs, using glad by David Herberth (2013).

Readme

glad

Vulkan/GL/GLES/EGL/GLX/WGL Loader based on the official specifications for C/C++.

[!NOTE] This repository contains headers generated by glad with the following options:

  • Generator: C/C++
  • APIs
  • egl: Version 1.5
  • gl: Version 4.6
  • gles1: Version 1
  • gles2: Version 3.2
  • glsc2: Version 2.0
  • glx: Version 1.4
  • vulkan: Version 1.4
  • vulkansc: Version 1.4 (no loader)
  • wgl: 1.0
  • Extensions: All
  • Options:
  • header only: Generate a header only version of glad
  • loader: Include internal loaders for APIs

Installation

Run:

$ npm i glad.c

And then include the needed headers in your source files as follows:

// main.c
#define GLAD_EGL_IMPLEMENTATION
#define GLAD_GL_IMPLEMENTATION
#define GLAD_GLES1_IMPLEMENTATION
#define GLAD_GLES2_IMPLEMENTATION
#define GLAD_GLSC2_IMPLEMENTATION
#define GLAD_GLX_IMPLEMENTATION
#define GLAD_VULKAN_IMPLEMENTATION
#define GLAD_VULKANSC_IMPLEMENTATION
#define GLAD_WGL_IMPLEMENTATION
#include "node_modules/glad.c/glad/egl.h"
#include "node_modules/glad.c/glad/gl.h"
#include "node_modules/glad.c/glad/gles1.h"
#include "node_modules/glad.c/glad/gles2.h"
#include "node_modules/glad.c/glad/glsc2.h"
#include "node_modules/glad.c/glad/glx.h"
#include "node_modules/glad.c/glad/vulkan.h"
#include "node_modules/glad.c/glad/vulkansc.h"
#include "node_modules/glad.c/glad/wgl.h"

int main() { /* ... */ }

And then compile with clang or gcc as usual.

$ clang main.c  # or, use gcc
$ gcc   main.c

You may also use a simpler approach:

// main.c
#define GLAD_EGL_IMPLEMENTATION
#define GLAD_GL_IMPLEMENTATION
#define GLAD_GLES1_IMPLEMENTATION
#define GLAD_GLES2_IMPLEMENTATION
#define GLAD_GLSC2_IMPLEMENTATION
#define GLAD_GLX_IMPLEMENTATION
#define GLAD_VULKAN_IMPLEMENTATION
#define GLAD_VULKANSC_IMPLEMENTATION
#define GLAD_WGL_IMPLEMENTATION
#include <glad/egl.h>
#include <glad/gl.h>
#include <glad/gles1.h>
#include <glad/gles2.h>
#include <glad/glsc2.h>
#include <glad/glx.h>
#include <glad/vulkan.h>
#include <glad/vulkansc.h>
#include <glad/wgl.h>

int main() { /* ... */ }

If you add the path node_modules/glad.c to your compiler's include paths.

$ clang -I./node_modules/glad.c main.c  # or, use gcc
$ gcc   -I./node_modules/glad.c main.c

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 = gladLoadGL(glfwGetProcAddress);
    if (version == 0) {
        printf("Failed to initialize OpenGL context\n");
        return -1;
    }

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

    // -- snip --
}

The full code: hellowindow2.cpp

More examples in the examples directory of this repository.

Plugins

Glad plugins maintained by the community to add support for more languages:

Documentation

The documentation can be found in the wiki.

Examples can be found in the example directory. Some examples:

License

The generated code from glad is in WTFPL. Now Khronos has some of their specifications under Apache Version 2.0 license which may have an impact on the generated code, see this clarifying comment on the Khronos / OpenGL-Specification issue tracker.

SRC ORG