- Notifications
You must be signed in to change notification settings - Fork493
Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
License
Dav1dde/glad
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
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.
#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.
Gladpluginsmaintained by the community to add support for more languages:
The documentation can be found in thewiki.
Examples can be foundin the example directory. Some examples:
- C/C++
- Rust
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.
About
Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.