From 95f3c956a80d880f9988fed5c4a920e436808195 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sat, 19 Sep 2015 04:40:00 +1200 Subject: Move GL interface code out of the OpenGL video backend. --- Source/Core/Common/GL/GLInterface/EGLAndroid.cpp | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Source/Core/Common/GL/GLInterface/EGLAndroid.cpp (limited to 'Source/Core/Common/GL/GLInterface/EGLAndroid.cpp') diff --git a/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp b/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp new file mode 100644 index 0000000000..023ba9b901 --- /dev/null +++ b/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp @@ -0,0 +1,29 @@ +// Copyright 2014 Dolphin Emulator Project +// Licensed under GPLv2+ +// Refer to the license.txt file included. + +#include "Common/GL/GLInterface/EGLAndroid.h" +#include "Core/Host.h" + +EGLDisplay cInterfaceEGLAndroid::OpenDisplay() +{ + return eglGetDisplay(EGL_DEFAULT_DISPLAY); +} + +EGLNativeWindowType cInterfaceEGLAndroid::InitializePlatform(EGLNativeWindowType host_window, EGLConfig config) +{ + EGLint format; + eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format); + ANativeWindow_setBuffersGeometry(host_window, 0, 0, format); + + const int width = ANativeWindow_getWidth(host_window); + const int height = ANativeWindow_getHeight(host_window); + GLInterface->SetBackBufferDimensions(width, height); + + return host_window; +} + +void cInterfaceEGLAndroid::ShutdownPlatform() +{ +} + -- cgit v1.2.3 From c9836ff59292855093ba5f7bdc47755ea74123a5 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sat, 19 Sep 2015 06:12:20 +1200 Subject: EGL: Don't depend on VideoCommon or Core --- Source/Core/Common/GL/GLInterface/EGLAndroid.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Source/Core/Common/GL/GLInterface/EGLAndroid.cpp') diff --git a/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp b/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp index 023ba9b901..c2204d3ec7 100644 --- a/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp +++ b/Source/Core/Common/GL/GLInterface/EGLAndroid.cpp @@ -3,7 +3,6 @@ // Refer to the license.txt file included. #include "Common/GL/GLInterface/EGLAndroid.h" -#include "Core/Host.h" EGLDisplay cInterfaceEGLAndroid::OpenDisplay() { -- cgit v1.2.3