From 717447eebf23822c449a3e1fb7313dd7e632aa91 Mon Sep 17 00:00:00 2001 From: 4VRDriver <44267643+4VRDriver@users.noreply.github.com> Date: Fri, 18 Sep 2020 21:05:05 +0200 Subject: [PATCH] Enable MSAA --- src/Controller.cpp | 1 + src/Window.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/Controller.cpp b/src/Controller.cpp index c38c950..1e09551 100644 --- a/src/Controller.cpp +++ b/src/Controller.cpp @@ -31,6 +31,7 @@ Controller::Controller() { glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint(GLFW_SAMPLES, 4); #ifndef _DEBUG glfwWindowHint(GLFW_MAXIMIZED, GL_TRUE); diff --git a/src/Window.cpp b/src/Window.cpp index e95ff84..0211f06 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -33,6 +33,9 @@ Window::Window() { glFrontFace(GL_CW); glCullFace(GL_FRONT); + // Enable multisampling (a bit redundant because most graphics drivers do this automatically) + glEnable(GL_MULTISAMPLE); + // Disable mouse cursor #ifdef _DEBUG mouseCatched = false;