From a1a5570e9735cb3ead0149b26d00eb4d6ade744f Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 30 Aug 2015 03:37:42 -0300 Subject: Replace the previous OpenGL loader with a glad-generated 3.3 one The main advantage of switching to glad from glLoadGen is that, apart from being actively maintained, it supports a customizable entrypoint loader function, which makes it possible to also support OpenGL ES. --- src/citra/CMakeLists.txt | 4 ++-- src/citra/emu_window/emu_window_glfw.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/citra') diff --git a/src/citra/CMakeLists.txt b/src/citra/CMakeLists.txt index 1d6aac9a9..beb96bd30 100644 --- a/src/citra/CMakeLists.txt +++ b/src/citra/CMakeLists.txt @@ -15,7 +15,7 @@ create_directory_groups(${SRCS} ${HEADERS}) add_executable(citra ${SRCS} ${HEADERS}) target_link_libraries(citra core video_core common) -target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih) +target_link_libraries(citra ${GLFW_LIBRARIES} ${OPENGL_gl_LIBRARY} inih glad) if (MSVC) target_link_libraries(citra getopt) endif() @@ -23,4 +23,4 @@ target_link_libraries(citra ${PLATFORM_LIBRARIES}) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD") install(TARGETS citra RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") -endif() \ No newline at end of file +endif() diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 6d6656b5a..096efc4a2 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp @@ -7,7 +7,7 @@ #include // Let’s use our own GL header, instead of one from GLFW. -#include "video_core/renderer_opengl/generated/gl_3_2_core.h" +#include #define GLFW_INCLUDE_NONE #include -- cgit v1.2.3 From 68eb19749456ba653c8286080f5be99ffc1ce5e7 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 30 Aug 2015 04:29:03 -0300 Subject: Increase required OpenGL version to 3.3 This gives us several niceties such as Sampler Objects, shader attribute locations and Timer Queries. --- src/citra/emu_window/emu_window_glfw.cpp | 2 +- src/citra_qt/bootmanager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/citra') diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 096efc4a2..9453b1f48 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp @@ -89,7 +89,7 @@ EmuWindow_GLFW::EmuWindow_GLFW() { exit(1); } glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); + glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); // 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); diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index f8aacb527..d9bacfc3d 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -109,7 +109,7 @@ GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread) : // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose QGLFormat fmt; - fmt.setVersion(3,2); + fmt.setVersion(3,3); fmt.setProfile(QGLFormat::CoreProfile); // Requests a forward-compatible context, which is required to get a 3.2+ context on OS X fmt.setOption(QGL::NoDeprecatedFunctions); -- cgit v1.2.3