|
@@ -83,17 +83,17 @@ Class AppInstance
|
|
|
|
|
|
The following environment variables can be set prior to constructing a new AppInstance:
|
|
The following environment variables can be set prior to constructing a new AppInstance:
|
|
|
|
|
|
- MX2_MOJO_OPENGL_PROFILE : Should be set to one of "es", "compatibility" or "core". Defaults to "compatibility" on macos and linux, "es" on all other targets. Uses 'Angle' for es support on windows.
|
|
|
|
-
|
|
|
|
- MX2_MOJO_OPENGL_VERSION_MAJOR : defaults to "2".
|
|
|
|
-
|
|
|
|
- MX2_MOJO_OPENGL_VERSION_MINOR : defaults to "1".
|
|
|
|
-
|
|
|
|
- MX2_MOJO_COLOR_BUFFER_BITS : Minimum depth buffer bit depth. defaults to "8".
|
|
|
|
|
|
+ MOJO_OPENGL_PROFILE : Should be set to one of "es", "compatibility" or "core". Defaults to "compatibility" on macos and linux, "es" on all other targets. Uses 'Angle' for es support on windows.
|
|
|
|
+
|
|
|
|
+ MOJO_OPENGL_VERSION_MAJOR : defaults to "2".
|
|
|
|
+
|
|
|
|
+ MOJO_OPENGL_VERSION_MINOR : defaults to "1".
|
|
|
|
+
|
|
|
|
+ MOJO_COLOR_BUFFER_BITS : Minimum depth buffer bit depth. defaults to "8".
|
|
|
|
|
|
- MX2_MOJO_DEPTH_BUFFER_BITS : Minimum depth buffer bit depth. defaults to "0".
|
|
|
|
|
|
+ MOJO_DEPTH_BUFFER_BITS : Minimum depth buffer bit depth. defaults to "0".
|
|
|
|
|
|
- MX2_MOJO_STENCIL_BUFFER_BITS : Minimum stencil buffer bit depth. defaults to "0".
|
|
|
|
|
|
+ MOJO_STENCIL_BUFFER_BITS : Minimum stencil buffer bit depth. defaults to "0".
|
|
|
|
|
|
Environment variables may be set using the [[std::std.filesystem.SetEnv|SetEnv]] function.
|
|
Environment variables may be set using the [[std::std.filesystem.SetEnv|SetEnv]] function.
|
|
|
|
|
|
@@ -127,7 +127,7 @@ Class AppInstance
|
|
'
|
|
'
|
|
Local gl_profile:Int,gl_major:Int=2,gl_minor:Int=0
|
|
Local gl_profile:Int,gl_major:Int=2,gl_minor:Int=0
|
|
|
|
|
|
- Select GetEnv( "MX2_MOJO_OPENGL_PROFILE" )
|
|
|
|
|
|
+ Select GetConfig( "MOJO_OPENGL_PROFILE" )
|
|
Case "core"
|
|
Case "core"
|
|
gl_profile=SDL_GL_CONTEXT_PROFILE_CORE
|
|
gl_profile=SDL_GL_CONTEXT_PROFILE_CORE
|
|
Case "compatibility"
|
|
Case "compatibility"
|
|
@@ -143,18 +143,18 @@ Class AppInstance
|
|
End
|
|
End
|
|
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK,gl_profile )
|
|
SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK,gl_profile )
|
|
- SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION,Int( GetEnv( "MX2_MOJO_OPENGL_VERSION_MAJOR",gl_major ) ) )
|
|
|
|
- SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION,Int( GetEnv( "MX2_MOJO_OPENGL_VERSION_MINOR",gl_minor ) ) )
|
|
|
|
|
|
+ SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION,Int( GetConfig( "MOJO_OPENGL_VERSION_MAJOR",gl_major ) ) )
|
|
|
|
+ SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION,Int( GetConfig( "MOJO_OPENGL_VERSION_MINOR",gl_minor ) ) )
|
|
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER,1 )
|
|
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER,1 )
|
|
|
|
|
|
- Local n:=Int( GetEnv( "MX2_MOJO_COLOR_BUFFER_BITS",8 ) )
|
|
|
|
|
|
+ Local n:=Int( GetConfig( "MOJO_COLOR_BUFFER_BITS",8 ) )
|
|
|
|
|
|
SDL_GL_SetAttribute( SDL_GL_RED_SIZE,n )
|
|
SDL_GL_SetAttribute( SDL_GL_RED_SIZE,n )
|
|
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE,n )
|
|
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE,n )
|
|
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE,n )
|
|
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE,n )
|
|
- SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE,Int( GetEnv( "MX2_MOJO_DEPTH_BUFFER_BITS" ) ) )
|
|
|
|
- SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE,Int( GetEnv( "MX2_MOJO_STENCIL_BUFFER_BITS" ) ) )
|
|
|
|
|
|
+ SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE,Int( GetConfig( "MOJO_DEPTH_BUFFER_BITS" ) ) )
|
|
|
|
+ SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE,Int( GetConfig( "MOJO_STENCIL_BUFFER_BITS" ) ) )
|
|
|
|
|
|
#If __DESKTOP_TARGET__
|
|
#If __DESKTOP_TARGET__
|
|
|
|
|
|
@@ -184,9 +184,9 @@ Class AppInstance
|
|
|
|
|
|
_theme=New Theme
|
|
_theme=New Theme
|
|
|
|
|
|
- Local themePath:=GetEnv( "MX2_MOJO_INITIAL_THEME","default" )
|
|
|
|
|
|
+ Local themePath:=GetConfig( "MOJO_INITIAL_THEME","default" )
|
|
|
|
|
|
- Local themeScale:=Float( GetEnv( "MX2_MOJO_INITIAL_THEME_SCALE",1 ) )
|
|
|
|
|
|
+ Local themeScale:=Float( GetConfig( "MOJO_INITIAL_THEME_SCALE",1 ) )
|
|
|
|
|
|
_theme.Load( themePath,New Vec2f( themeScale ) )
|
|
_theme.Load( themePath,New Vec2f( themeScale ) )
|
|
|
|
|