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.tests; 18 19 import com.badlogic.gdx.Gdx; 20 import com.badlogic.gdx.graphics.GL20; 21 import com.badlogic.gdx.tests.utils.GdxTest; 22 23 /** A simple test to demonstrate the life cycle of an application. 24 * 25 * @author mzechner */ 26 public class LifeCycleTest extends GdxTest { 27 28 @Override dispose()29 public void dispose () { 30 Gdx.app.log("Test", "app destroyed"); 31 } 32 33 @Override pause()34 public void pause () { 35 Gdx.app.log("Test", "app paused"); 36 } 37 38 @Override resume()39 public void resume () { 40 Gdx.app.log("Test", "app resumed"); 41 } 42 43 @Override render()44 public void render () { 45 Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); 46 } 47 48 @Override create()49 public void create () { 50 Gdx.app.log("Test", "app created: " + Gdx.graphics.getWidth() + "x" + Gdx.graphics.getHeight()); 51 } 52 53 @Override resize(int width, int height)54 public void resize (int width, int height) { 55 Gdx.app.log("Test", "app resized: " + width + "x" + height + ", Graphics says: " + Gdx.graphics.getWidth() + "x" 56 + Gdx.graphics.getHeight()); 57 } 58 } 59