diff --git a/include/emulator.hpp b/include/emulator.hpp index 590c267c..1dd9c9d9 100644 --- a/include/emulator.hpp +++ b/include/emulator.hpp @@ -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); diff --git a/src/core/renderer_gl/renderer_gl.cpp b/src/core/renderer_gl/renderer_gl.cpp index cda309c8..fe83a104 100644 --- a/src/core/renderer_gl/renderer_gl.cpp +++ b/src/core/renderer_gl/renderer_gl.cpp @@ -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;