mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-23 22:50:10 +00:00
citra: Add OpenGL configuration
This commit is contained in:
parent
45b5244e12
commit
22c2d51e21
@ -61,6 +61,11 @@ void Config::ReadValues() {
|
||||
Settings::values.gpu_refresh_rate = glfw_config->GetInteger("Core", "gpu_refresh_rate", 30);
|
||||
Settings::values.frame_skip = glfw_config->GetInteger("Core", "frame_skip", 0);
|
||||
|
||||
// OpenGL
|
||||
Settings::values.opengl_version_major = glfw_config->GetReal("OpenGL", "version_major", 2);
|
||||
Settings::values.opengl_version_minor = glfw_config->GetReal("OpenGL", "version_minor", 1);
|
||||
Settings::values.opengl_flavor = glfw_config->Get("OpenGL", "flavor", "compatibility");
|
||||
|
||||
// Data Storage
|
||||
Settings::values.use_virtual_sd = glfw_config->GetBoolean("Data Storage", "use_virtual_sd", true);
|
||||
|
||||
|
@ -31,6 +31,12 @@ cpu_core = ## 0: Interpreter (default), 1: OldInterpreter (may work better, soon
|
||||
gpu_refresh_rate = ## 30 (default)
|
||||
frame_skip = ## 0: No frameskip (default), 1 : 2x frameskip, 2 : 4x frameskip, etc.
|
||||
|
||||
[OpenGL]
|
||||
## Allowed values: 2.1 to 4.5 for compatibility, 3.1 to 4.5 for core and 2.0 to 3.1 for es (subject to driver restrictions)
|
||||
version_major =
|
||||
version_minor =
|
||||
flavor = ## compatibility (default), core, gles
|
||||
|
||||
[Data Storage]
|
||||
use_virtual_sd =
|
||||
|
||||
|
@ -67,11 +67,17 @@ EmuWindow_GLFW::EmuWindow_GLFW() {
|
||||
LOG_CRITICAL(Frontend, "Failed to initialize GLFW! Exiting...");
|
||||
exit(1);
|
||||
}
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
|
||||
// GLFW on OSX requires these window hints to be set to create a 3.2+ GL context.
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, Settings::values.opengl_version_major);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, Settings::values.opengl_version_minor);
|
||||
|
||||
// Set hints for OpenGL core and GLES support.
|
||||
if (Settings::values.opengl_flavor == "core") {
|
||||
// GLFW on OSX requires these window hints to be set to create a 3.2+ GL context.
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
} else if (Settings::values.opengl_flavor == "gles") {
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
|
||||
} // compatibility is assumed otherwise, and doesn't require any hint.
|
||||
|
||||
std::string window_title = Common::StringFromFormat("Citra | %s-%s", Common::g_scm_branch, Common::g_scm_desc);
|
||||
m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth,
|
||||
|
@ -33,6 +33,11 @@ struct Values {
|
||||
int gpu_refresh_rate;
|
||||
int frame_skip;
|
||||
|
||||
// OpenGL
|
||||
std::string opengl_flavor;
|
||||
int opengl_version_major;
|
||||
int opengl_version_minor;
|
||||
|
||||
// Data Storage
|
||||
bool use_virtual_sd;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user