mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
Require OpenGL 4.1 (GeForce 400+,Radeon HD5000,Intel HD4000+)
Along with setting a version for macOS to use instead of 2.1, most if not all Essentials games require a maximum texture size of at least 16384x16384. OpenGL 4.1 requires this as a minimum.
This commit is contained in:
parent
c64a69ee6d
commit
4e5294e184
3 changed files with 8 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
#version 330
|
||||
#version 410
|
||||
#define attribute in
|
||||
#define varying out
|
||||
|
||||
|
|
|
@ -98,8 +98,8 @@ void initGLFunctions()
|
|||
/* Assume single digit */
|
||||
int glMajor = *ver - '0';
|
||||
|
||||
if (glMajor < 2)
|
||||
throw EXC("At least OpenGL (ES) 2.0 is required");
|
||||
if (glMajor < 4)
|
||||
throw EXC("At least OpenGL 4.0 is required"); // Actually 4.1
|
||||
|
||||
if (gles)
|
||||
{
|
||||
|
|
|
@ -409,9 +409,11 @@ static SDL_GLContext initGL(SDL_Window *win, Config &conf,
|
|||
if (conf.debugMode)
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG);
|
||||
|
||||
// Enables OpenGL 3 and 4 on macOS
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
|
||||
// Core profile enables OpenGL4 on macOS
|
||||
// Using OpenGL 4.1 requires a GPU with max texture size of 16384 or better
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
|
||||
glCtx = SDL_GL_CreateContext(win);
|
||||
|
|
Loading…
Add table
Reference in a new issue