Init open gl before poi types and indexes
This commit is contained in:
parent
1d5de834f1
commit
ec12ec3b45
1 changed files with 13 additions and 5 deletions
|
@ -626,13 +626,17 @@ public class AppInitializer implements IProgress {
|
|||
private void startApplicationBackground() {
|
||||
try {
|
||||
startBgTime = System.currentTimeMillis();
|
||||
app.getRendererRegistry().initRenderers(this);
|
||||
notifyEvent(InitEvents.INIT_RENDERERS);
|
||||
// native depends on renderers
|
||||
initOpenGl();
|
||||
notifyEvent(InitEvents.NATIVE_OPEN_GLINITIALIZED);
|
||||
|
||||
// init poi types before indexes and before POI
|
||||
initPoiTypes();
|
||||
notifyEvent(InitEvents.POI_TYPES_INITIALIZED);
|
||||
app.resourceManager.reloadIndexesOnStart(this, warnings);
|
||||
|
||||
app.getRendererRegistry().initRenderers(this);
|
||||
notifyEvent(InitEvents.INIT_RENDERERS);
|
||||
// native depends on renderers
|
||||
initNativeCore();
|
||||
notifyEvent(InitEvents.NATIVE_INITIALIZED);
|
||||
|
@ -735,8 +739,7 @@ public class AppInitializer implements IProgress {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void initNativeCore() {
|
||||
private void initOpenGl() {
|
||||
if (!"qnx".equals(System.getProperty("os.name"))) {
|
||||
OsmandSettings osmandSettings = app.getSettings();
|
||||
if (osmandSettings.USE_OPENGL_RENDER.get()) {
|
||||
|
@ -753,8 +756,13 @@ public class AppInitializer implements IProgress {
|
|||
osmandSettings.OPENGL_RENDER_FAILED.set(false);
|
||||
warnings.add("Native OpenGL library is not supported. Please try again after exit");
|
||||
}
|
||||
notifyEvent(InitEvents.NATIVE_OPEN_GLINITIALIZED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initNativeCore() {
|
||||
if (!"qnx".equals(System.getProperty("os.name"))) {
|
||||
OsmandSettings osmandSettings = app.getSettings();
|
||||
if (osmandSettings.NATIVE_RENDERING_FAILED.get()) {
|
||||
osmandSettings.SAFE_MODE.set(true);
|
||||
osmandSettings.NATIVE_RENDERING_FAILED.set(false);
|
||||
|
|
Loading…
Reference in a new issue