mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 14:05:32 +02:00
Create 'gl3' build option
This commit is contained in:
parent
4e5294e184
commit
7ff57d3851
4 changed files with 11 additions and 3 deletions
|
@ -89,6 +89,13 @@ if get_option('threaded_gl_init')
|
||||||
global_args += '-DTHREADED_GLINIT'
|
global_args += '-DTHREADED_GLINIT'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Mainly for virtual machines
|
||||||
|
if get_option('gl3')
|
||||||
|
global_args += ['-DZ_GL_MINOR=3','-DZ_GL_MAJOR=3']
|
||||||
|
else
|
||||||
|
global_args += ['-DZ_GL_MINOR=1','-DZ_GL_MAJOR=4']
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Objectify our C
|
# Objectify our C
|
||||||
global_args += run_command(objfw,'--cppflags').stdout().split()
|
global_args += run_command(objfw,'--cppflags').stdout().split()
|
||||||
|
|
|
@ -3,6 +3,7 @@ option('mk', type: 'boolean', value: false, description: 'Build to fit Marin\'s
|
||||||
option('console', type: 'boolean', value: true, description: 'Whether to debug information in the console')
|
option('console', type: 'boolean', value: true, description: 'Whether to debug information in the console')
|
||||||
option('macos_min_version', type: 'string', value: '10.10', description: 'Minimum macOS system version to support')
|
option('macos_min_version', type: 'string', value: '10.10', description: 'Minimum macOS system version to support')
|
||||||
option('threaded_gl_init', type: 'boolean', value: true, description: 'Init GL on secondary thread')
|
option('threaded_gl_init', type: 'boolean', value: true, description: 'Init GL on secondary thread')
|
||||||
|
option('gl3', type: 'boolean', value: false, description: 'Use OpenGL 3.3 instead of 4.1')
|
||||||
|
|
||||||
option('shared_fluid', type: 'boolean', value: false, description: 'Dynamically link fluidsynth at build time')
|
option('shared_fluid', type: 'boolean', value: false, description: 'Dynamically link fluidsynth at build time')
|
||||||
option('cjk_fallback_font', type: 'boolean', value: false, description: 'Use WenQuanYi Micro Hei as the fallback font')
|
option('cjk_fallback_font', type: 'boolean', value: false, description: 'Use WenQuanYi Micro Hei as the fallback font')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#version 410
|
#version 330
|
||||||
#define attribute in
|
#define attribute in
|
||||||
#define varying out
|
#define varying out
|
||||||
|
|
||||||
|
|
|
@ -412,8 +412,8 @@ static SDL_GLContext initGL(SDL_Window *win, Config &conf,
|
||||||
// Core profile enables OpenGL4 on macOS
|
// Core profile enables OpenGL4 on macOS
|
||||||
// Using OpenGL 4.1 requires a GPU with max texture size of 16384 or better
|
// 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_MAJOR_VERSION, Z_GL_MAJOR);
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, Z_GL_MINOR);
|
||||||
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);
|
||||||
|
|
||||||
glCtx = SDL_GL_CreateContext(win);
|
glCtx = SDL_GL_CreateContext(win);
|
||||||
|
|
Loading…
Add table
Reference in a new issue