diff options
| author | 2014-04-30 17:00:36 -0700 | |
|---|---|---|
| committer | 2014-04-30 17:00:36 -0700 | |
| commit | c1b770cc0db5649c4b9dc52f5e31105b2bc88eb6 (patch) | |
| tree | a6c51db895d75c4db877bad1b7ddec1c5da4952b /src | |
| parent | A bit of Cmake love (diff) | |
| download | yuzu-c1b770cc0db5649c4b9dc52f5e31105b2bc88eb6.tar.gz yuzu-c1b770cc0db5649c4b9dc52f5e31105b2bc88eb6.tar.xz yuzu-c1b770cc0db5649c4b9dc52f5e31105b2bc88eb6.zip | |
OpenGL 3+ on OSX with GLFW
Diffstat (limited to 'src')
| -rw-r--r-- | src/citra/emu_window/emu_window_glfw.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/video_core.cpp | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index e6943f146..ea1499e7c 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp | |||
| @@ -27,11 +27,18 @@ EmuWindow_GLFW::EmuWindow_GLFW() { | |||
| 27 | exit(1); | 27 | exit(1); |
| 28 | } | 28 | } |
| 29 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); | 29 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); |
| 30 | glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1); | 30 | glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); |
| 31 | glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); | ||
| 32 | glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); | ||
| 31 | m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, | 33 | m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, |
| 32 | (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), | 34 | (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), |
| 33 | m_window_title.c_str(), NULL, NULL); | 35 | m_window_title.c_str(), NULL, NULL); |
| 34 | 36 | ||
| 37 | if (m_render_window == NULL) { | ||
| 38 | printf("Failed to create GLFW window! Exiting..."); | ||
| 39 | exit(1); | ||
| 40 | } | ||
| 41 | |||
| 35 | // Setup callbacks | 42 | // Setup callbacks |
| 36 | glfwSetWindowUserPointer(m_render_window, this); | 43 | glfwSetWindowUserPointer(m_render_window, this); |
| 37 | //glfwSetKeyCallback(m_render_window, OnKeyEvent); | 44 | //glfwSetKeyCallback(m_render_window, OnKeyEvent); |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index f2e17f9f9..4e9cd70bc 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -30,6 +30,8 @@ void Start() { | |||
| 30 | 30 | ||
| 31 | /// Initialize the video core | 31 | /// Initialize the video core |
| 32 | void Init(EmuWindow* emu_window) { | 32 | void Init(EmuWindow* emu_window) { |
| 33 | glewExperimental = GL_TRUE; | ||
| 34 | |||
| 33 | g_emu_window = emu_window; | 35 | g_emu_window = emu_window; |
| 34 | g_emu_window->MakeCurrent(); | 36 | g_emu_window->MakeCurrent(); |
| 35 | g_renderer = new RendererOpenGL(); | 37 | g_renderer = new RendererOpenGL(); |