Make tests and examples use glad

This commit is contained in:
Camilla Berglund
2015-10-14 03:11:20 +02:00
parent bf123b5299
commit 1b1ef31228
25 changed files with 84 additions and 11675 deletions

View File

@@ -10,7 +10,7 @@
// because I am not a friend of orthogonal projections)
//========================================================================
#define GLFW_INCLUDE_GLEXT
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#if defined(_MSC_VER)
@@ -513,14 +513,11 @@ int main(void)
// Enable vsync
glfwMakeContextCurrent(window);
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
glfwSwapInterval(1);
if (glfwExtensionSupported("GL_ARB_multisample") ||
glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MAJOR) >= 2 ||
glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MINOR) >= 3)
{
if (GLAD_GL_ARB_multisample || GLAD_GL_VERSION_1_3)
glEnable(GL_MULTISAMPLE_ARB);
}
glfwGetFramebufferSize(window, &width, &height);
framebufferSizeFun(window, width, height);