1 /******************************************************************************* 2 * Copyright 2011 See AUTHORS file. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ******************************************************************************/ 16 17 package com.badlogic.gdx; 18 19 import com.badlogic.gdx.graphics.GL20; 20 import com.badlogic.gdx.graphics.GL30; 21 22 /** Environment class holding references to the {@link Application}, {@link Graphics}, {@link Audio}, {@link Files} and 23 * {@link Input} instances. The references are held in public static fields which allows static access to all sub systems. Do not 24 * use Graphics in a thread that is not the rendering thread. 25 * <p> 26 * This is normally a design faux pas but in this case is better than the alternatives. 27 * @author mzechner */ 28 public class Gdx { 29 public static Application app; 30 public static Graphics graphics; 31 public static Audio audio; 32 public static Input input; 33 public static Files files; 34 public static Net net; 35 36 public static GL20 gl; 37 public static GL20 gl20; 38 public static GL30 gl30; 39 } 40