Add use of glad to tutorial

This commit is contained in:
Camilla Berglund 2015-10-18 02:05:02 +02:00
parent bbae72cea2
commit 156cd33c7f

View File

@ -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