[android] - fix black screen issue

This commit is contained in:
Tobrun
2016-05-09 14:13:01 +02:00
parent 5645936ab5
commit 7d0d09e7dc

View File

@@ -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();
}
}