mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Enabled MSAA for splitview example.
This commit is contained in:
parent
460e5d792d
commit
24e4e674a5
|
@ -11,6 +11,7 @@
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
#define GLFW_INCLUDE_GLU
|
#define GLFW_INCLUDE_GLU
|
||||||
|
#define GLFW_INCLUDE_GLEXT
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -469,6 +470,8 @@ int main(void)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glfwWindowHint(GLFW_SAMPLES, 4);
|
||||||
|
|
||||||
// Open OpenGL window
|
// Open OpenGL window
|
||||||
window = glfwCreateWindow(500, 500, "Split view demo", NULL, NULL);
|
window = glfwCreateWindow(500, 500, "Split view demo", NULL, NULL);
|
||||||
if (!window)
|
if (!window)
|
||||||
|
@ -490,6 +493,13 @@ int main(void)
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
glfwSwapInterval(1);
|
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);
|
glfwGetFramebufferSize(window, &width, &height);
|
||||||
framebufferSizeFun(window, width, height);
|
framebufferSizeFun(window, width, height);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user