commit ef96b6336dad7160f09f41238314df43539e0d1c
parent 39845904af83026feb19a689b49a3122ea575f25
Author: Amin Mesbah <dev@aminmesbah.com>
Date: Sun, 5 Aug 2018 15:14:51 -0700
Enable MSAA on Linux
Diffstat:
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/game.c b/src/game.c
@@ -3,6 +3,7 @@
#include <assert.h>
#include <math.h>
+// TODO: remove references to emscripten
#ifdef __EMSCRIPTEN__
#include <GLES3/gl3.h>
#else
@@ -152,6 +153,11 @@ void game_init(struct GameState *game_state, uint32_t screen_width, uint32_t scr
game_state->cube_shader = shader_compile("shader/cube_v.glsl", "shader/cube_f.glsl");
glEnable(GL_DEPTH_TEST);
+
+ // TODO: remove references to emscripten
+#ifndef __EMSCRIPTEN__
+ glEnable(GL_MULTISAMPLE);
+#endif
}
diff --git a/src/game.h b/src/game.h
@@ -1,6 +1,7 @@
#ifndef GAME_H
#define GAME_H
+// TODO: remove references to emscripten
#ifdef __EMSCRIPTEN__
#include <GLES3/gl3.h>
#else
diff --git a/src/platform_linux.c b/src/platform_linux.c
@@ -43,6 +43,7 @@ int main(void)
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
+ glfwWindowHint(GLFW_SAMPLES, 4);
GLFWwindow* window = glfwCreateWindow(PLATFORM_SCR_WIDTH, PLATFORM_SCR_HEIGHT, "Quaternion Demo", NULL, NULL);
if (!window)