mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Even more EGL logging
This commit is contained in:
parent
7aebff0efb
commit
1d6e48b817
3 changed files with 21 additions and 19 deletions
|
@ -7,20 +7,6 @@
|
|||
|
||||
#include "Common/GL/GLInterface/EGL.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
// On Android, EGL creation is so early that our regular logging system is not
|
||||
// up and running yet. Use Android logging.
|
||||
#include "base/logging.h"
|
||||
#define EGL_ILOG(...) ILOG(__VA_ARGS__)
|
||||
#define EGL_ELOG(...) ELOG(__VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
#define EGL_ILOG(...) EGL_ILOG(__VA_ARGS__)
|
||||
#define EGL_ELOG(...) EGL_ELOG(__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
||||
#include "Common/Log.h"
|
||||
|
||||
// Show the current FPS
|
||||
|
@ -234,17 +220,17 @@ bool cInterfaceEGL::Create(void *window_handle, bool core, bool use565) {
|
|||
|
||||
switch (s_opengl_mode) {
|
||||
case MODE_OPENGL:
|
||||
EGL_ELOG("Setting RENDERABLE_TYPE to EGL_OPENGL_BIT");
|
||||
EGL_ILOG("Setting RENDERABLE_TYPE to EGL_OPENGL_BIT");
|
||||
attribs[1] = EGL_OPENGL_BIT;
|
||||
ctx_attribs[0] = EGL_NONE;
|
||||
break;
|
||||
case MODE_OPENGLES2:
|
||||
EGL_ELOG("Setting RENDERABLE_TYPE to EGL_OPENGL_ES2_BIT");
|
||||
EGL_ILOG("Setting RENDERABLE_TYPE to EGL_OPENGL_ES2_BIT");
|
||||
attribs[1] = EGL_OPENGL_ES2_BIT;
|
||||
ctx_attribs[1] = 2;
|
||||
break;
|
||||
case MODE_OPENGLES3:
|
||||
EGL_ELOG("Setting RENDERABLE_TYPE to EGL_OPENGL_ES3_BIT_KHR");
|
||||
EGL_ILOG("Setting RENDERABLE_TYPE to EGL_OPENGL_ES3_BIT_KHR");
|
||||
attribs[1] = (1 << 6); /* EGL_OPENGL_ES3_BIT_KHR */
|
||||
ctx_attribs[1] = 3;
|
||||
break;
|
||||
|
|
|
@ -9,6 +9,21 @@
|
|||
|
||||
#include "Common/GL/GLInterfaceBase.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
// On Android, EGL creation is so early that our regular logging system is not
|
||||
// up and running yet. Use Android logging.
|
||||
#include "base/logging.h"
|
||||
#define EGL_ILOG(...) ILOG(__VA_ARGS__)
|
||||
#define EGL_ELOG(...) ELOG(__VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
#define EGL_ILOG(...) INFO_LOG(G3D, __VA_ARGS__)
|
||||
#define EGL_ELOG(...) INFO_LOG(G3D, __VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class cInterfaceEGL : public cInterfaceBase
|
||||
{
|
||||
protected:
|
||||
|
|
|
@ -12,11 +12,12 @@ EGLDisplay cInterfaceEGLAndroid::OpenDisplay() {
|
|||
EGLNativeWindowType cInterfaceEGLAndroid::InitializePlatform(EGLNativeWindowType host_window, EGLConfig config) {
|
||||
EGLint format;
|
||||
if (EGL_FALSE == eglGetConfigAttrib(egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format)) {
|
||||
ERROR_LOG(G3D, "Failed getting EGL_NATIVE_VISUAL_ID: error %s", EGLGetErrorString(eglGetError()));
|
||||
EGL_ELOG("Failed getting EGL_NATIVE_VISUAL_ID: error %s", EGLGetErrorString(eglGetError()));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ANativeWindow_setBuffersGeometry(host_window, internalWidth_, internalHeight_, format);
|
||||
int32_t result = ANativeWindow_setBuffersGeometry(host_window, internalWidth_, internalHeight_, format);
|
||||
EGL_ILOG("ANativeWindow_setBuffersGeometry returned %d", result);
|
||||
|
||||
const int width = ANativeWindow_getWidth(host_window);
|
||||
const int height = ANativeWindow_getHeight(host_window);
|
||||
|
|
Loading…
Add table
Reference in a new issue