From a3b65ed3ff44c539609ef432cfac1e173b87a794 Mon Sep 17 00:00:00 2001 From: ktyl Date: Tue, 6 Jul 2021 23:13:56 +0100 Subject: [PATCH] bump opengl version --- res/shader/shader.frag | 2 +- res/shader/shader.vert | 2 +- src/gfx.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/res/shader/shader.frag b/res/shader/shader.frag index be3d118..cadfb1e 100644 --- a/res/shader/shader.frag +++ b/res/shader/shader.frag @@ -1,4 +1,4 @@ -#version 330 core +#version 430 core out vec4 FragColor; in vec3 ourColor; diff --git a/res/shader/shader.vert b/res/shader/shader.vert index 1becee2..0e349b5 100644 --- a/res/shader/shader.vert +++ b/res/shader/shader.vert @@ -1,4 +1,4 @@ -#version 330 core +#version 430 core layout (location = 0) in vec3 aPos; // position has attribute position 0 layout (location = 1) in vec3 aColor; // color has attribute position 1 layout (location = 2) in vec2 aTexCoord; // texture coordinate diff --git a/src/gfx.c b/src/gfx.c index 1b73a6f..5dc53ab 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -21,8 +21,8 @@ void gfxInit() } SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); - SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); sdlWindow = SDL_CreateWindow(