LWJGL 2 desktop exit status #433

This commit is contained in:
Emux
2017-10-29 15:15:24 +02:00
parent cbdeb58c2f
commit bcf4cff42b
20 changed files with 64 additions and 36 deletions

View File

@@ -68,6 +68,7 @@ public class GdxMapApp extends GdxMap {
cfg.samples = 2;
cfg.foregroundFPS = 30;
cfg.backgroundFPS = 10;
cfg.forceExit = false;
return cfg;
}
@@ -79,4 +80,9 @@ public class GdxMapApp extends GdxMap {
mMap.setMapPosition(0, 0, 1 << 2);
}
@Override
public void dispose() {
System.exit(0);
}
}

View File

@@ -0,0 +1,22 @@
/*
* Copyright 2017 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.gdx;
public class GdxMapImpl extends GdxMap {
@Override
public void dispose() {
System.exit(0);
}
}

View File

@@ -16,8 +16,8 @@
*/
package org.oscim.stuff;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -25,7 +25,7 @@ import org.oscim.theme.VtmThemes;
import org.oscim.tiling.source.UrlTileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
public class MapzenTest extends GdxMap {
public class MapzenTest extends GdxMapImpl {
@Override
public void createLayers() {

View File

@@ -3,13 +3,13 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
import org.oscim.core.BoundingBox;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
public class AnimatorTest extends GdxMap {
public class AnimatorTest extends GdxMapImpl {
@Override
public void createLayers() {

View File

@@ -18,13 +18,13 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.source.bitmap.DefaultSources;
public class BitmapLayerTest extends GdxMap {
public class BitmapLayerTest extends GdxMapImpl {
private BitmapTileLayer mLayer = null;
private BitmapTileLayer mShaded = null;

View File

@@ -17,8 +17,8 @@ package org.oscim.test;
import org.oscim.backend.GLAdapter;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeometryBuffer;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -26,7 +26,7 @@ import org.oscim.renderer.MapRenderer;
import org.oscim.renderer.bucket.CircleBucket;
import org.oscim.theme.styles.CircleStyle;
public class CircleTest extends GdxMap {
public class CircleTest extends GdxMapImpl {
private final GeometryBuffer geom = new GeometryBuffer(2, 1);
private final Renderer renderer = new Renderer();

View File

@@ -18,8 +18,8 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.renderer.MapRenderer;
@@ -28,7 +28,7 @@ import org.oscim.theme.IRenderTheme.ThemeException;
import org.oscim.theme.ThemeLoader;
import org.oscim.tiling.source.mapfile.MapFileTileSource;
public class ExternalRenderThemeTest extends GdxMap {
public class ExternalRenderThemeTest extends GdxMapImpl {
VectorTileLayer mapLayer;

View File

@@ -27,8 +27,8 @@ import com.badlogic.gdx.utils.viewport.Viewport;
import org.oscim.backend.GL;
import org.oscim.core.Point;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.renderer.GLState;
import org.oscim.renderer.MapRenderer;
import org.oscim.tiling.TileSource;
@@ -36,7 +36,7 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
import static org.oscim.backend.GLAdapter.gl;
public class GdxSpriteBatchTest extends GdxMap {
public class GdxSpriteBatchTest extends GdxMapImpl {
private double latitude = 47.1970869;
private double longitude = 18.4398422;
private double scale = 1 << 17;

View File

@@ -19,8 +19,8 @@ package org.oscim.test;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.core.GeometryBuffer;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -32,7 +32,7 @@ import org.oscim.theme.styles.AreaStyle;
import org.oscim.theme.styles.LineStyle;
import org.oscim.theme.styles.LineStyle.LineBuilder;
public class HairLineTest extends GdxMap {
public class HairLineTest extends GdxMapImpl {
static GeometryBuffer createLine(float r) {
GeometryBuffer in = new GeometryBuffer(100, 2);

View File

@@ -23,8 +23,8 @@ import org.oscim.backend.CanvasAdapter;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.core.GeometryBuffer;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -36,7 +36,7 @@ import org.oscim.theme.styles.LineStyle;
import java.io.IOException;
public class LineRenderTest extends GdxMap {
public class LineRenderTest extends GdxMapImpl {
GeometryBuffer mGeom = new GeometryBuffer(2, 1);
GeometryBuffer mLine = new GeometryBuffer(2, 1);

View File

@@ -5,8 +5,8 @@ import com.badlogic.gdx.Input;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeometryBuffer;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -14,7 +14,7 @@ import org.oscim.renderer.MapRenderer;
import org.oscim.renderer.bucket.LineBucket;
import org.oscim.theme.styles.LineStyle;
public class LineTest extends GdxMap {
public class LineTest extends GdxMapImpl {
@Override
protected boolean onKeyDown(int keycode) {

View File

@@ -16,8 +16,8 @@ package org.oscim.test;
import org.oscim.core.MapPosition;
import org.oscim.core.Tile;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -29,7 +29,7 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class MapsforgeMultiTest extends GdxMap {
public class MapsforgeMultiTest extends GdxMapImpl {
private final List<File> mapFiles;

View File

@@ -18,8 +18,8 @@ package org.oscim.test;
import org.oscim.core.MapPosition;
import org.oscim.core.Tile;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -36,7 +36,7 @@ import org.oscim.tiling.source.mapfile.MapInfo;
import java.io.File;
public class MapsforgeTest extends GdxMap {
public class MapsforgeTest extends GdxMapImpl {
private File mapFile;

View File

@@ -18,8 +18,8 @@ package org.oscim.test;
import com.badlogic.gdx.Input;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.renderer.MapRenderer;
import org.oscim.theme.RenderTheme;
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
import static org.oscim.utils.ColorUtil.saturate;
public class RuleVisitorTest extends GdxMap {
public class RuleVisitorTest extends GdxMapImpl {
final Logger log = LoggerFactory.getLogger(RuleVisitorTest.class);
RenderTheme mTheme;

View File

@@ -18,8 +18,8 @@ package org.oscim.test;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
import org.oscim.theme.RenderTheme;
@@ -27,7 +27,7 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ThemeBuilderTest extends GdxMap {
public class ThemeBuilderTest extends GdxMapImpl {
final Logger log = LoggerFactory.getLogger(S3DBLayerTest.class);

View File

@@ -16,8 +16,8 @@
*/
package org.oscim.test.gdx.poi3d;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.tile.buildings.BuildingLayer;
import org.oscim.layers.tile.vector.VectorTileLayer;
import org.oscim.layers.tile.vector.labeling.LabelLayer;
@@ -26,7 +26,7 @@ import org.oscim.theme.VtmThemes;
import org.oscim.tiling.TileSource;
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
public class Gdx3DTest extends GdxMap {
public class Gdx3DTest extends GdxMapImpl {
@Override
public void createLayers() {

View File

@@ -20,8 +20,8 @@ package org.oscim.test.jeo;
import org.jeo.map.Style;
import org.jeo.vector.VectorDataset;
import org.oscim.backend.canvas.Color;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.JeoVectorLayer;
import org.oscim.layers.OSMIndoorLayer;
import org.oscim.layers.tile.bitmap.BitmapTileLayer;
@@ -35,7 +35,7 @@ import java.net.URLConnection;
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
public class LayerTest extends GdxMap {
public class LayerTest extends GdxMapImpl {
// from http://overpass-turbo.eu/s/2vp
String PATH = "https://gist.githubusercontent.com/anonymous/09062103a66844a96048f25626078c8d/raw/1d3af6a5a55e9ea4adc9551fa633a051a44a5a9c/overpass.geojson";

View File

@@ -18,8 +18,8 @@ package org.oscim.test.renderer;
import org.oscim.backend.canvas.Color;
import org.oscim.backend.canvas.Paint.Cap;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
import java.util.Arrays;
public class AtlasTest extends GdxMap {
public class AtlasTest extends GdxMapImpl {
@Override
protected void createLayers() {

View File

@@ -19,8 +19,8 @@ package org.oscim.test.renderer;
import org.oscim.backend.canvas.Color;
import org.oscim.core.GeometryBuffer;
import org.oscim.core.Point;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.GLViewport;
@@ -30,7 +30,7 @@ import org.oscim.utils.geom.BezierPath;
import java.util.List;
public class BezierTest extends GdxMap {
public class BezierTest extends GdxMapImpl {
@Override
protected void createLayers() {

View File

@@ -18,8 +18,8 @@ package org.oscim.test.renderer;
import org.oscim.backend.GL;
import org.oscim.backend.canvas.Color;
import org.oscim.gdx.GdxMap;
import org.oscim.gdx.GdxMapApp;
import org.oscim.gdx.GdxMapImpl;
import org.oscim.layers.GenericLayer;
import org.oscim.renderer.BucketRenderer;
import org.oscim.renderer.BufferObject;
@@ -35,7 +35,7 @@ import java.nio.FloatBuffer;
import static org.oscim.backend.GLAdapter.gl;
import static org.oscim.renderer.MapRenderer.COORD_SCALE;
public class HexagonRenderTest extends GdxMap {
public class HexagonRenderTest extends GdxMapImpl {
@Override
protected void createLayers() {