Skip to content
Snippets Groups Projects
Commit 156cd33c authored by Camilla Löwy's avatar Camilla Löwy
Browse files

Add use of glad to tutorial

parent bbae72ce
Branches
No related tags found
No related merge requests found
......@@ -45,6 +45,17 @@ In other words:
- If you _do_ need to include such headers, do it _before_ including the
GLFW one and it will detect this
If you are using an [extension loader library](@ref context_glext_auto) to
access modern OpenGL then include the header for that library _before_ the GLFW
header. This lets it replace the OpenGL header included by GLFW without
conflicts. The following example uses [glad](https://github.com/Dav1dde/glad),
but the same rule applies to all.
@code
#include <glad/glad.h>
#include <GLFW/glfw3.h>
@endcode
@subsection quick_init_term Initializing and terminating GLFW
......@@ -144,6 +155,15 @@ glfwMakeContextCurrent(window);
The context will remain current until you make another context current or until
the window owning the current context is destroyed.
If you are using an [extension loader library](@ref context_glext_auto) to
access modern OpenGL then this is when to initialize it. The loader needs the
context to be current before it can load from it. The following example uses
[glad](https://github.com/Dav1dde/glad), but the same rule applies to all.
@code
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
@endcode
@subsection quick_window_close Checking the window close flag
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment