Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

Dav1dde/glad

Repository files navigation

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

Check out thewebservice 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 theglad1 generator.

Examples

#include<glad/gl.h>// GLFW (include after glad)#include<GLFW/glfw3.h>intmain() {// -- snip --GLFWwindow*window=glfwCreateWindow(WIDTH,HEIGHT,"LearnOpenGL",NULL,NULL);glfwMakeContextCurrent(window);intversion=gladLoadGL(glfwGetProcAddress);if (version==0) {printf("Failed to initialize OpenGL context\n");return-1;    }// Successfully loaded OpenGLprintf("Loaded OpenGL %d.%d\n",GLAD_VERSION_MAJOR(version),GLAD_VERSION_MINOR(version));// -- snip --}

The full code:hellowindow2.cpp

More examples in theexamples directory of this repository.

Plugins

Gladpluginsmaintained by the community to add support for more languages:

Documentation

The documentation can be found in thewiki.

Examples can be foundin the example directory. Some examples:

License

For the source code and various Khronos files seeLICENSE.

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


[8]ページ先頭

©2009-2026 Movatter.jp