GL30 adapter (#652)

This commit is contained in:
Gustl22
2019-02-03 21:10:11 +01:00
committed by Emux
parent f6f00c2521
commit 45cf4057d1
11 changed files with 191 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016-2017 Longri
* Copyright 2019 Gustl22
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@@ -17,6 +18,8 @@
*/
package org.oscim.ios.test;
import com.badlogic.gdx.graphics.glutils.GLVersion;
import org.oscim.backend.GLAdapter;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeoPoint;
@@ -25,6 +28,7 @@ import org.oscim.event.Event;
import org.oscim.gdx.GdxAssets;
import org.oscim.gdx.GdxMap;
import org.oscim.ios.backend.IosGL;
import org.oscim.ios.backend.IosGL30;
import org.oscim.ios.backend.IosGraphics;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
@@ -46,7 +50,6 @@ public class IOSPathLayerTest extends GdxMap {
// init globals
IosGraphics.init();
GdxAssets.init("assets/");
GLAdapter.init(new IosGL());
}
private static final boolean ANIMATION = false;
@@ -54,6 +57,14 @@ public class IOSPathLayerTest extends GdxMap {
private List<PathLayer> mPathLayers = new ArrayList<>();
private TextureItem tex;
@Override
protected void initGLAdapter(GLVersion version) {
if (version.getMajorVersion() >= 3)
GLAdapter.init(new IosGL30());
else
GLAdapter.init(new IosGL());
}
@Override
public void createLayers() {
VectorTileLayer l = mMap.setBaseMap(new OSciMap4TileSource());