GitHub 火線榜

GitHub 火線榜 · 倉庫檔案

Dav1dde/glad

Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs. (簡介來自倉庫自身文件。)

資料截至 October 26Dav1dde

最好成績

#382

總榜 · C 语言

4.6K

累計 Star

512

Fork 總數

0

近 30 天在榜天數

專案狀態授權條款: NOASSERTION最近 push: September 28Open Issues(含 PR): 33

自 2026-10-25 起採集;未知 = 尚未採集到

把上榜徽章放進你的 README · Dav1dde/glad[![把上榜徽章放進你的 README](https://git.vaiox.xyz/api/badge/Dav1dde/glad.svg)](https://git.vaiox.xyz/zh-TW/repo/Dav1dde/glad)
<a href="https://git.vaiox.xyz/zh-TW/repo/Dav1dde/glad"><img src="https://git.vaiox.xyz/api/badge/Dav1dde/glad.svg" alt="把上榜徽章放進你的 README" height="20"></a>

專案文件

glad

Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specifications for multiple languages.

Check out the webservice for glad2 to generate the files you need!

NOTE: This is the 2.0 branch, which adds more functionality but changes the API.

Some languages are only available in the glad1 generator.

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

For the source code and various Khronos files see LICENSE.

The generated code from glad is any of Public Domain, WTFPL or CC0. 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.

當前上榜

  • 382

    總榜 · 史上最強 · C

    4.6K 星 · 512 fork · 累計星星

    總榜 · C →

近 30 天勢頭

近 30 天沒有上榜紀錄。

同類專案 · 共享主題

← 回到榜單