bump opengl version

This commit is contained in:
ktyl 2021-07-06 23:13:56 +01:00
parent 8857b057e0
commit a3b65ed3ff
3 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#version 330 core #version 430 core
out vec4 FragColor; out vec4 FragColor;
in vec3 ourColor; in vec3 ourColor;

View File

@ -1,4 +1,4 @@
#version 330 core #version 430 core
layout (location = 0) in vec3 aPos; // position has attribute position 0 layout (location = 0) in vec3 aPos; // position has attribute position 0
layout (location = 1) in vec3 aColor; // color has attribute position 1 layout (location = 1) in vec3 aColor; // color has attribute position 1
layout (location = 2) in vec2 aTexCoord; // texture coordinate layout (location = 2) in vec2 aTexCoord; // texture coordinate

View File

@ -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_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
sdlWindow = SDL_CreateWindow( sdlWindow = SDL_CreateWindow(