List of usage examples for com.badlogic.gdx.graphics GL20 glClear
public void glClear(int mask);
From source file:com.steelkiwi.patheditor.gdx.GdxApp.java
License:Apache License
@Override public void render() { if (uiHandler != null) { uiHandler.updateMemoryInfo(getMemoryConsumption()); }/*w ww .j av a2s . c o m*/ if (screen != null) { screen.update(Gdx.graphics.getDeltaTime()); screen.present(Gdx.graphics.getDeltaTime()); } else { GL20 gl = Gdx.graphics.getGL20(); gl.glClear(GL20.GL_COLOR_BUFFER_BIT); gl.glClearColor(0.698f, 0.698f, 0.698f, 1f); } }
From source file:com.steelkiwi.patheditor.gdx.GdxScreen.java
License:Apache License
@Override public void present(float deltaTime) { GL20 gl = Gdx.graphics.getGL20(); gl.glClear(GL20.GL_COLOR_BUFFER_BIT); gl.glClearColor(0.698f, 0.698f, 0.698f, 1f); camera.update();/*from www . ja v a 2 s . c o m*/ bgDrawer.presentFakeBG(screenW, screenH, camera.combined); stage.act(deltaTime); stage.draw(); bgDrawer.presentOverlayBG(screenW, screenH, (int) camera.position.x, (int) camera.position.y, (int) camera.viewportWidth, (int) camera.viewportHeight, stage.getSpriteBatch()); if (splineBuilder != null) { splineBuilder.present(camera.combined); } }
From source file:com.uwsoft.editor.gdx.screen.Overlap2DScreen.java
License:Apache License
@Override public void render(float deltaTime) { if (paused) { return;/* w w w .ja va 2 s . c om*/ } GL20 gl = Gdx.gl; gl.glClearColor(0.129f, 0.129f, 0.129f, 1.0f); gl.glClear(GL20.GL_COLOR_BUFFER_BIT); sandboxStage.act(deltaTime); sandboxStage.draw(); uiStage.act(deltaTime); uiStage.draw(); }
From source file:com.uwsoft.editor.view.Overlap2DScreen.java
License:Apache License
@Override public void render(float deltaTime) { if (paused) { return;//from w w w.j a v a 2s . c om } GL20 gl = Gdx.gl; gl.glClearColor(bgColor.r, bgColor.g, bgColor.b, bgColor.a); gl.glClear(GL20.GL_COLOR_BUFFER_BIT); if (isDrawingBgLogo) { batch.begin(); batch.setColor(1, 1, 1, 0.12f); batch.draw(bgLogo, screenSize.x / 2 - bgLogo.getWidth() / 2, screenSize.y / 2 - bgLogo.getHeight() / 2); batch.end(); } else { if (sandboxBackUI != null) sandboxBackUI.render(deltaTime); engine.update(deltaTime); } uiStage.act(deltaTime); uiStage.draw(); }
From source file:com.wilson.game.Screen.HelpScreen.java
License:Apache License
public void draw() { GL20 gl = Gdx.gl; gl.glClear(GL20.GL_COLOR_BUFFER_BIT); gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); guiCam.update();/*from ww w . j a v a 2 s. c o m*/ game.batcher.setProjectionMatrix(guiCam.combined); game.batcher.disableBlending(); game.batcher.begin(); game.batcher.draw(helpRegion, 0, 0); game.batcher.end(); game.batcher.enableBlending(); game.batcher.begin(); game.batcher.draw(Assets.arrow, 320, 0, -30, 30); game.batcher.end(); }
From source file:com.wilson.game.Screen.HelpScreen2.java
License:Apache License
public void draw() { GL20 gl = Gdx.gl; gl.glClear(GL20.GL_COLOR_BUFFER_BIT); guiCam.update();//w ww.j a va 2s . c o m game.batcher.setProjectionMatrix(guiCam.combined); game.batcher.disableBlending(); game.batcher.begin(); game.batcher.draw(helpRegion, 0, 0, 320, 480); game.batcher.end(); game.batcher.enableBlending(); game.batcher.begin(); game.batcher.draw(Assets.arrow, 320, 0, -30, 30); game.batcher.end(); gl.glDisable(GL20.GL_BLEND); }
From source file:com.wilson.game.Screen.MainMenuScreen.java
License:Apache License
public void draw() { GL20 gl = Gdx.gl; gl.glClearColor(1, 0, 0, 1);/*from ww w . j a v a2 s .c o m*/ gl.glClear(GL20.GL_COLOR_BUFFER_BIT); guiCam.update(); game.batcher.setProjectionMatrix(guiCam.combined); game.batcher.disableBlending(); game.batcher.begin(); game.batcher.draw(Assets.menuBackground, 0, 0, 320, 480); game.batcher.end(); game.batcher.enableBlending(); game.batcher.begin(); game.batcher.draw(Assets.mainMenu, 67, 230 - 90 / 2, 192, 160); game.batcher.draw(Settings.soundEnabled ? Assets.soundOn : Assets.soundOff, 0, 0, 64, 64); game.batcher.end(); }
From source file:dorkbox.tweenengine.demo.Launcher.java
License:Apache License
public void render() { tweenManager.update(Gdx.graphics.getDeltaTime()); GL20 gl = Gdx.gl20; gl.glClearColor(1, 1, 1, 1);//from w w w .j av a 2 s . c om gl.glClear(GL20.GL_COLOR_BUFFER_BIT); gl.glEnable(GL20.GL_BLEND); gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); int w = Gdx.graphics.getWidth(); int h = Gdx.graphics.getHeight(); if (selectedTile == null) { batch.getProjectionMatrix().setToOrtho2D(0, 0, w, h); batch.begin(); batch.disableBlending(); background.draw(batch); batch.end(); batch.setProjectionMatrix(camera.combined); batch.begin(); batch.enableBlending(); for (int i = 0; i < tiles.size(); i++) { tiles.get(i).draw(batch); } batch.end(); batch.getProjectionMatrix().setToOrtho2D(0, 0, w, h); batch.begin(); batch.disableBlending(); title.draw(batch); titleLeft.draw(batch); titleRight.draw(batch); batch.enableBlending(); if (veil.getColor().a > 0.1f) { veil.draw(batch); } batch.end(); } else { selectedTile.getTest().render(); } }
From source file:dorkbox.tweenengine.demo.SplashScreen.java
License:Apache License
public void render() { tweenManager.update(Gdx.graphics.getDeltaTime()); if (gdx.getRotation() > 360 * 15 - 20) { gdx.setRegion(gdxTex);//from ww w. ja v a 2 s . co m } GL20 gl = Gdx.gl20; gl.glClearColor(0, 0, 0, 1); gl.glClear(GL20.GL_COLOR_BUFFER_BIT); gl.glEnable(GL20.GL_BLEND); gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); batch.setProjectionMatrix(camera.combined); batch.begin(); strip.draw(batch); universal.draw(batch); tween.draw(batch); engine.draw(batch); logo.draw(batch); powered.draw(batch); gdx.draw(batch); if (veil.getColor().a > 0.1f) { veil.draw(batch); } batch.end(); if (finishedAnimation) { callback.onEvent(null); } }
From source file:Exemplos.JanelaExemplo.java
@Override public void render(float delta) { GL20 gl = Gdx.gl; gl.glClearColor(0, 0, 0, 1);/*from w ww .j a va 2 s . c o m*/ gl.glClear(GL20.GL_COLOR_BUFFER_BIT); camera.update(); estagio.act(Gdx.graphics.getDeltaTime()); estagio.draw(); }