1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Enabled MSAA for splitview example.

This commit is contained in:
Camilla Berglund 2015-07-21 21:58:24 +02:00
parent 460e5d792d
commit 24e4e674a5

View File

@ -11,6 +11,7 @@
//========================================================================
#define GLFW_INCLUDE_GLU
#define GLFW_INCLUDE_GLEXT
#include <GLFW/glfw3.h>
#include <math.h>
@ -469,6 +470,8 @@ int main(void)
exit(EXIT_FAILURE);
}
glfwWindowHint(GLFW_SAMPLES, 4);
// Open OpenGL window
window = glfwCreateWindow(500, 500, "Split view demo", NULL, NULL);
if (!window)
@ -490,6 +493,13 @@ int main(void)
glfwMakeContextCurrent(window);
glfwSwapInterval(1);
if (glfwExtensionSupported("GL_ARB_multisample") ||
glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MAJOR) >= 2 ||
glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MINOR) >= 3)
{
glEnable(GL_MULTISAMPLE_ARB);
}
glfwGetFramebufferSize(window, &width, &height);
framebufferSizeFun(window, width, height);