summaryrefslogtreecommitdiff
path: root/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/GL/GLInterface/EGLHaiku.cpp')
-rw-r--r--Source/Core/Common/GL/GLInterface/EGLHaiku.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp b/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
new file mode 100644
index 0000000000..253b9c8c98
--- /dev/null
+++ b/Source/Core/Common/GL/GLInterface/EGLHaiku.cpp
@@ -0,0 +1,30 @@
+// Copyright 2017 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
+
+#include "Common/GL/GLInterface/EGLHaiku.h"
+
+#include <Window.h>
+
+EGLDisplay cInterfaceEGLHaiku::OpenDisplay()
+{
+ return eglGetDisplay(EGL_DEFAULT_DISPLAY);
+}
+
+EGLNativeWindowType cInterfaceEGLHaiku::InitializePlatform(EGLNativeWindowType host_window,
+ EGLConfig config)
+{
+ EGLint format;
+ eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format);
+
+ BWindow* window = reinterpret_cast<BWindow*>(host_window);
+ const int width = window->Size().width;
+ const int height = window->Size().height;
+ GLInterface->SetBackBufferDimensions(width, height);
+
+ return host_window;
+}
+
+void cInterfaceEGLHaiku::ShutdownPlatform()
+{
+}