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,7 +1,7 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016-2017 devemux86
* Copyright 2018 Gustl22
* Copyright 2018-2019 Gustl22
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@@ -29,6 +29,7 @@ public class GLAdapter {
* The instance provided by backend
*/
public static GL gl;
public static GL30 gl30;
public static boolean ANDROID_QUIRKS = false;
public static boolean GDX_DESKTOP_QUIRKS = false;
@@ -45,8 +46,10 @@ public class GLAdapter {
*/
public static boolean CIRCLE_QUADS = false;
public static void init(GL gl20) {
gl = gl20;
public static void init(GL gl) {
GLAdapter.gl = gl;
if (gl instanceof GL30)
GLAdapter.gl30 = (GL30) gl;
ANDROID_QUIRKS = (CanvasAdapter.platform == Platform.ANDROID);
GDX_DESKTOP_QUIRKS = CanvasAdapter.platform.isDesktop();
@@ -56,4 +59,8 @@ public class GLAdapter {
if (CanvasAdapter.platform == Platform.MACOS)
BuildingLayer.TRANSLUCENT = false;
}
public static boolean isGL30() {
return gl30 != null;
}
}