mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
MacOS OpenGL memes
This commit is contained in:
parent
ac43c09ebd
commit
7c68e70ba4
2 changed files with 4 additions and 2 deletions
|
@ -39,7 +39,9 @@ public:
|
||||||
Helpers::panic("Failed to initialize SDL2");
|
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_MAJOR_VERSION, 4);
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
|
||||||
window = SDL_CreateWindow("Alber", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL);
|
window = SDL_CreateWindow("Alber", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_OPENGL);
|
||||||
|
|
|
@ -8,7 +8,7 @@ using namespace Floats;
|
||||||
// This is all hacked up to display our first triangle
|
// This is all hacked up to display our first triangle
|
||||||
|
|
||||||
const char* vertexShader = R"(
|
const char* vertexShader = R"(
|
||||||
#version 420 core
|
#version 410 core
|
||||||
|
|
||||||
layout (location = 0) in vec4 coords;
|
layout (location = 0) in vec4 coords;
|
||||||
layout (location = 1) in vec4 vertexColour;
|
layout (location = 1) in vec4 vertexColour;
|
||||||
|
|
Loading…
Add table
Reference in a new issue