Android support, attempt-1 #8

Open
kornerr wants to merge 62 commits from and1 into master
pull from: and1
Showing only changes of commit b1dd0a5107 - Show all commits
+28
View File
@@ -9,6 +9,12 @@
// Header // Header
bool raybriEGLInit(void); bool raybriEGLInit(void);
bool raybriEGLResetSurface(
void *caLayer,
EGLConfig *cfg,
EGLDisplay *display,
EGLSurface *surface
);
// Source // Source
@@ -48,6 +54,28 @@ bool raybriEGLInit(void) {
return true; return true;
} }
bool raybriEGLResetSurface(
void *caLayer,
EGLConfig *cfg,
EGLDisplay *display,
EGLSurface *surface
) {
// Destroy previous surface
if (surface != EGL_NO_SURFACE) {
eglDestroySurface(display, surface);
surface = EGL_NO_SURFACE;
}
// Create new surface
// ANGLE on iOS takes a CALayer as the native window
surface = eglCreateWindowSurface(display, cfg, (EGLNativeWindowType)caLayer, NULL);
if (surface == EGL_NO_SURFACE) {
return false;
}
return true;
}
#endif // RAYBRI_EGL_IMPLEMENTATION #endif // RAYBRI_EGL_IMPLEMENTATION
#endif // RAYBRI_EGL_H #endif // RAYBRI_EGL_H