Android support, attempt-1 #8
@@ -15,6 +15,7 @@ typedef struct EGLState {
|
||||
} EGLState;
|
||||
|
||||
bool eglInit(EGLState *st);
|
||||
bool eglMakeCurrentContext(EGLState *st);
|
||||
bool eglResetSurface(EGLState *st);
|
||||
|
||||
// Source
|
||||
@@ -51,6 +52,14 @@ bool eglInit(EGLState *st) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool eglMakeCurrentContext(EGLState *st) {
|
||||
if (eglMakeCurrent(st->display, st->surface, st->surface, st->ctx) == EGL_FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool eglResetSurface(EGLState *st) {
|
||||
// Destroy previous surface
|
||||
if (st->surface != EGL_NO_SURFACE) {
|
||||
|
||||
Reference in new issue
Block a user