1
// Copyright 2008 Dolphin Emulator Project
2
// Licensed under GPLv2+
3
// Refer to the license.txt file included.
10
#include "Common/GL/GLInterfaceBase.h"
13
// On Android, EGL creation is so early that our regular logging system is not
14
// up and running yet. Use Android logging.
15
#include "base/logging.h"
16
#define EGL_ILOG(...) ILOG(__VA_ARGS__)
17
#define EGL_ELOG(...) ELOG(__VA_ARGS__)
21
#define EGL_ILOG(...) INFO_LOG(G3D, __VA_ARGS__)
22
#define EGL_ELOG(...) INFO_LOG(G3D, __VA_ARGS__)
27
class cInterfaceEGL : public cInterfaceBase {
29
void SwapInterval(int Interval) override;
31
void SetMode(u32 mode) override { s_opengl_mode = mode; }
32
void* GetFuncAddress(const std::string& name) override;
33
bool Create(void *window_handle, bool core, bool use565) override;
34
bool MakeCurrent() override;
35
bool ClearCurrent() override;
36
void Shutdown() override;
43
virtual EGLDisplay OpenDisplay() = 0;
44
virtual EGLNativeWindowType InitializePlatform(EGLNativeWindowType host_window, EGLConfig config) = 0;
45
virtual void ShutdownPlatform() = 0;
46
virtual void SetInternalResolution(int internalWidth, int internalHeight) {}
47
const char *EGLGetErrorString(EGLint error);
50
bool ChooseAndCreate(void *window_handle, bool core, bool use565);