|
24 | 24 |
|
25 | 25 | import javax.annotation.Nullable; |
26 | 26 |
|
27 | | -import com.badlogic.gdx.Gdx; |
28 | 27 | import com.badlogic.gdx.InputProcessor; |
29 | 28 | import com.badlogic.gdx.Screen; |
30 | | -import com.badlogic.gdx.graphics.GL20; |
31 | 29 | import com.badlogic.gdx.graphics.Pixmap.Format; |
32 | 30 | import com.badlogic.gdx.graphics.Texture; |
33 | 31 | import com.badlogic.gdx.graphics.g2d.TextureRegion; |
34 | 32 | import com.badlogic.gdx.graphics.glutils.FrameBuffer; |
35 | 33 | import com.badlogic.gdx.graphics.glutils.HdpiUtils; |
36 | 34 | import com.badlogic.gdx.utils.Array; |
37 | 35 | import com.badlogic.gdx.utils.Disposable; |
| 36 | +import com.badlogic.gdx.utils.ScreenUtils; |
38 | 37 |
|
39 | 38 | import de.damios.guacamole.Preconditions; |
40 | 39 | import de.damios.guacamole.gdx.graphics.NestableFrameBuffer; |
@@ -336,12 +335,7 @@ public void render(float delta) { |
336 | 335 | /* |
337 | 336 | * RENDER THE CURRENT SCREEN; no transition is going on |
338 | 337 | */ |
339 | | - Gdx.gl.glClearColor(currScreen.getClearColor().r, |
340 | | - currScreen.getClearColor().g, |
341 | | - currScreen.getClearColor().b, |
342 | | - currScreen.getClearColor().a); |
343 | | - Gdx.gl.glClear( |
344 | | - GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); |
| 338 | + ScreenUtils.clear(currScreen.getClearColor(), true); |
345 | 339 | this.currScreen.render(delta); |
346 | 340 | } |
347 | 341 | } else { |
@@ -499,9 +493,7 @@ public boolean inTransition() { |
499 | 493 | TextureRegion screenToTexture(ManagedScreen screen, FrameBuffer fbo, |
500 | 494 | float delta) { |
501 | 495 | fbo.begin(); |
502 | | - Gdx.gl.glClearColor(screen.getClearColor().r, screen.getClearColor().g, |
503 | | - screen.getClearColor().b, screen.getClearColor().a); |
504 | | - Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); |
| 496 | + ScreenUtils.clear(screen.getClearColor(), true); |
505 | 497 | screen.render(delta); |
506 | 498 | fbo.end(); |
507 | 499 |
|
|
0 commit comments