MacOS OpenGL memes

This commit is contained in:
wheremyfoodat 2023-05-07 02:03:24 +03:00
parent ac43c09ebd
commit 7c68e70ba4
2 changed files with 4 additions and 2 deletions

View file

@ -39,7 +39,9 @@ public:
Helpers::panic("Failed to initialize SDL2");
}
// Request OpenGL 4.1 (Max available on MacOS)
// Request OpenGL 4.1 Core (Max available on MacOS)
// MacOS gets mad if we don't explicitly demand a core profile
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
window = SDL_CreateWindow("Alber", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL);

View file

@ -8,7 +8,7 @@ using namespace Floats;
// This is all hacked up to display our first triangle
const char* vertexShader = R"(
#version 420 core
#version 410 core
layout (location = 0) in vec4 coords;
layout (location = 1) in vec4 vertexColour;