[android] - fix black screen issue
This commit is contained in:
@@ -391,6 +391,8 @@ void NativeMapView::createSurface(ANativeWindow *window_) {
|
||||
if (!firstTime) {
|
||||
firstTime = true;
|
||||
|
||||
activate();
|
||||
|
||||
if (!eglMakeCurrent(display, surface, surface, context)) {
|
||||
mbgl::Log::Error(mbgl::Event::OpenGL, "eglMakeCurrent() returned error %d",
|
||||
eglGetError());
|
||||
@@ -410,6 +412,8 @@ void NativeMapView::createSurface(ANativeWindow *window_) {
|
||||
mbgl::gl::InitializeExtensions([] (const char * name) {
|
||||
return reinterpret_cast<mbgl::gl::glProc>(eglGetProcAddress(name));
|
||||
});
|
||||
|
||||
deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user