EGL: Stop the window_handle shuffling as well
This commit is contained in:
parent
e7471958e4
commit
e2e3f2a20b
|
@ -156,9 +156,11 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
|||
else
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
|
||||
EGLNativeWindowType native_window = window_handle;
|
||||
|
||||
EGLint format;
|
||||
eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format);
|
||||
ANativeWindow_setBuffersGeometry((EGLNativeWindowType)Host_GetRenderHandle(), 0, 0, format);
|
||||
ANativeWindow_setBuffersGeometry(native_window, 0, 0, format);
|
||||
int none, width, height;
|
||||
Host_GetRenderWindowSize(none, none, width, height);
|
||||
GLWin.width = width;
|
||||
|
@ -184,16 +186,13 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
GLWin.native_window = Host_GetRenderHandle();
|
||||
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, nullptr);
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, native_window, nullptr);
|
||||
if (!GLWin.egl_surf)
|
||||
{
|
||||
INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
window_handle = (void *)GLWin.native_window;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ typedef struct {
|
|||
EGLSurface egl_surf;
|
||||
EGLContext egl_ctx;
|
||||
EGLDisplay egl_dpy;
|
||||
EGLNativeWindowType native_window;
|
||||
#elif defined(__APPLE__)
|
||||
NSView *cocoaWin;
|
||||
NSOpenGLContext *cocoaCtx;
|
||||
|
|
Loading…
Reference in New Issue