List of usage examples for com.badlogic.gdx.graphics GLCommon glClearColor
public void glClearColor(float red, float green, float blue, float alpha);
From source file:airfoil.Main.java
License:Open Source License
@Override public void render() { if (this.alive) { GLCommon gl = Gdx.gl; gl.glViewport(0, 0, this.width, this.height); gl.glClearColor(ColorClear.r, ColorClear.g, ColorClear.b, ColorClear.a); gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glEnable(GL20.GL_DEPTH_TEST); gl.glDepthFunc(GL20.GL_LESS);/* w ww. j a v a 2 s . com*/ /* */ this.renderMeshLines(this.database.getMesh(this.geometry)); } }
From source file:app.badlogicgames.superjumper.MainMenuScreen.java
License:Apache License
public void draw() { GLCommon gl = Gdx.gl; gl.glClearColor(1, 0, 0, 1); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();/*from w w w .ja v a 2s . c o m*/ batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.backgroundRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.logo, 160 - 274 / 2, 480 - 10 - 142, 274, 142); batcher.draw(Assets.mainMenu, 10, 200 - 110 / 2, 300, 110); batcher.draw(Assets.multiplayer, 160 - 64, 100, 128, 32); batcher.draw(Settings.soundEnabled ? Assets.soundOn : Assets.soundOff, 0, 0, 64, 64); batcher.end(); if (System.nanoTime() - last > 2000000000) { Gdx.app.log("SuperJumper", "version: " + Gdx.app.getVersion() + ", memory: " + Gdx.app.getJavaHeap() + ", " + Gdx.app.getNativeHeap() + ", native orientation:" + Gdx.input.getNativeOrientation() + ", orientation: " + Gdx.input.getRotation() + ", accel: " + (int) Gdx.input.getAccelerometerX() + ", " + (int) Gdx.input.getAccelerometerY() + ", " + (int) Gdx.input.getAccelerometerZ() + ", apr: " + (int) Gdx.input.getAzimuth() + ", " + (int) Gdx.input.getPitch() + ", " + (int) Gdx.input.getRoll()); last = System.nanoTime(); } }
From source file:app.badlogicgames.superjumper.RegisterScreen.java
License:Apache License
public void draw() { GLCommon gl = Gdx.gl; gl.glClearColor(1, 0, 0, 1); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();/* ww w. j a va 2s. c o m*/ batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.backgroundRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.enterName, 10, 400, 128, 32); Assets.font.draw(batcher, ": " + Util.NAME, 140, 400 + Assets.font.getLineHeight()); batcher.draw(Assets.enterEmail, 10, 350, 128, 32); Assets.font.draw(batcher, ": " + Util.EMAIL, 140, 350 + Assets.font.getLineHeight()); batcher.draw(Assets.enterPass, 10, 300, 128, 32); Assets.font.draw(batcher, ": " + Util.PASSWORD, 140, 300 + Assets.font.getLineHeight()); batcher.draw(Assets.submit, 160 - 64, 100, 128, 32); Assets.font.draw(batcher, notification, 10, 50); batcher.end(); if (System.nanoTime() - last > 2000000000) { Gdx.app.log("SuperJumper", "version: " + Gdx.app.getVersion() + ", memory: " + Gdx.app.getJavaHeap() + ", " + Gdx.app.getNativeHeap() + ", native orientation:" + Gdx.input.getNativeOrientation() + ", orientation: " + Gdx.input.getRotation() + ", accel: " + (int) Gdx.input.getAccelerometerX() + ", " + (int) Gdx.input.getAccelerometerY() + ", " + (int) Gdx.input.getAccelerometerZ() + ", apr: " + (int) Gdx.input.getAzimuth() + ", " + (int) Gdx.input.getPitch() + ", " + (int) Gdx.input.getRoll()); last = System.nanoTime(); } }
From source file:com.asg.guesswhat.screens.MainMenuScreen.java
License:Apache License
public void draw(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClearColor(1, 0, 0, 1); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();/*www. j av a 2 s . c om*/ batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.backgroundRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.yourMove, 160 - 240 / 2, 480 - 40 - 52, 240, 52); batcher.draw(Assets.newGame, 160 - 240 / 2, 480 - 92 - 50, 240, 50); //batcher.draw(Assets.yourMove, 2, 200, 240, 50); //batcher.draw(Assets.yourMove, 2, 200, 240, 50); //batcher.draw(Assets.mainMenu, 10, 200 - 110 / 2, 300, 110); //batcher.draw(Settings.soundEnabled ? Assets.soundOn : Assets.soundOff, 0, 0, 64, 64); batcher.end(); }
From source file:com.badlogicgames.superjumper.MainMenuScreen.java
License:Apache License
public void draw(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClearColor(1, 0, 0, 1); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();/*from w w w .j av a2 s . c o m*/ batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.backgroundRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.logo, 160 - 274 / 2, 480 - 10 - 142, 274, 142); batcher.draw(Assets.mainMenu, 10, 200 - 110 / 2, 300, 110); batcher.draw(Settings.soundEnabled ? Assets.soundOn : Assets.soundOff, 0, 0, 64, 64); batcher.end(); }
From source file:com.dgcgames.balloonblast.MainMenuScreen.java
License:Apache License
@Override public void present(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClearColor(1, 0, 0, 1); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();//w ww.j av a2 s. c om batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.backgroundRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.logo, 160 - 274 / 2, 480 - 10 - 142, 274, 142); batcher.draw(Assets.mainMenu, 10, (int) (200 - 110 / 2), 300, 110); batcher.draw(Settings.soundEnabled ? Assets.soundOn : Assets.soundOff, 0, 0, 64, 64); batcher.end(); }
From source file:es.eucm.ead.mockup.core.control.ScreenController.java
License:Open Source License
private void clearColor() { GLCommon gl = Gdx.gl20; gl.glClearColor(r, g, b, a); gl.glClear(GL20.GL_COLOR_BUFFER_BIT); }