List of usage examples for com.badlogic.gdx.graphics GLCommon glDisable
public void glDisable(int cap);
From source file:app.badlogicgames.superjumper.HelpScreen.java
License:Apache License
public void draw() { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();/*from w w w . ja v a2 s. c o m*/ batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(helpRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.arrow, 320, 0, -64, 64); batcher.end(); gl.glDisable(GL10.GL_BLEND); }
From source file:com.badlogicgames.superjumper.CharScreen.java
License:Apache License
public void draw(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();// www . j av a2 s. co m batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.welcome, 0, 0, 512, 512); //MainMenuScreen.drawGradient(batcher, Assets.rect, 0, 0, 320, 480,Color.BLACK,Color.BLUE, false); batcher.end(); batcher.enableBlending(); batcher.begin(); ruota.draw(batcher, Assets.ruotaRegion, 512 + 128, 512 + 128); batcher.draw(Assets.choose, 0, 0, 512, 512); batcher.draw(Assets.icontext, 275, 10, 45, 45); batcher.draw(Assets.icontextback, 0, 10, 45, 45); //int len = buttons.size(); /* for (int i = 0; i < len; i++) { Button button = buttons.get(i); Texture keyFrame =Assets.lock; if(i==1)keyFrame=Assets.locked; //batcher.draw(keyFrame,button.position.x,button.position.y,145,145); }*/ for (Button button : buttons) { button.draw(batcher); } Assets.fontsmall.draw(batcher, "GO", 285, 40); stateTime = stateTime + 0.020f; TextureRegion keyFrame1 = Assets.swipeAnim.getKeyFrame(stateTime, Animation.ANIMATION_LOOPING); if (stateTime > 4) stateTime = 0; if (swipedeactive == 0) { batcher.draw(Assets.swipetext, 10, 0, 320, 256); batcher.draw(keyFrame1, 10, 0, 320, 256); } batcher.draw(Assets.backgroundRegion, bob.position.x, bob.position.y, 130, 130); batcher.draw(Assets.backgroundRegion10, bobfem.position.x, bobfem.position.y, 130, 130); batcher.draw(Assets.backgroundRegion11, bobmil.position.x - 20, bobmil.position.y, 170, 170); if (Settings.firstScore() < 20000 && state == 0) { batcher.draw(Assets.lock, bobfem.position.x - 10, bobfem.position.y + 30, 100, 100); batcher.draw(Assets.locked, bobfem.position.x - 45, bobfem.position.y - 70, 170, 150); Assets.fontsmall.draw(batcher, "need 20000 scores", guiCam.position.x - 90, guiCam.position.y - 150); } if (Settings.firstScore() < 70000 && state == 2) { batcher.draw(Assets.lock, bobmil.position.x + 26, bobmil.position.y + 30, 85, 100); batcher.draw(Assets.locked, bobmil.position.x - 18, bobmil.position.y - 70, 170, 150); Assets.fontsmall.draw(batcher, "need 70000 scores", guiCam.position.x - 90, guiCam.position.y - 150); } //batcher.draw(Assets.backgroundRegion,bob.position.x ,bob.position.y ,25, 35, 120, 150, 1, 1, 180); //batcher.draw(Assets.backgroundRegion10,bobfem.position.x ,bobfem.position.y ,25, 35, 120, 150, 1, 1, 180); batcher.end(); gl.glDisable(GL10.GL_BLEND); }
From source file:com.badlogicgames.superjumper.FirstScreen.java
License:Apache License
public void draw(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();//from w w w .ja va 2 s . co m batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(Assets.welcome, 0, 0, UI.SCREENPOSITIONX, UI.SCREENPOSITIONY); batcher.end(); batcher.enableBlending(); batcher.begin(); ruota.draw(batcher, Assets.ruotaRegion, UI.RUOTASIZE, UI.RUOTASIZE); Assets.handfontsmall.scale(-UI.FIRSTSCREENTEXTSCALE); Assets.handfontsmall.getRegion().getTexture().setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.MipMapLinearNearest); for (int i = 0; i < testo.size(); i++) testo.get(i).drawAnim(batcher); Assets.handfontsmall.getRegion().getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear); Assets.handfontsmall.scale(UI.FIRSTSCREENTEXTSCALE); batcher.end(); gl.glDisable(GL10.GL_BLEND); }
From source file:com.badlogicgames.superjumper.HelpScreen.java
License:Apache License
public void draw(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();// w ww.ja v a 2 s . c om batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(helpRegion, 0, 0, 320, 480); batcher.end(); batcher.enableBlending(); batcher.begin(); batcher.draw(Assets.arrow, 320, 0, -64, 64); batcher.end(); gl.glDisable(GL10.GL_BLEND); }
From source file:com.balloongame.handlers.CustomSpriteBatch.java
License:Apache License
/** Finishes off rendering. Enables depth writes, disables blending and texturing. Must always be called after a call to * {@link #begin()} *///from w ww . j a v a 2 s. c om public void end() { if (!drawing) throw new IllegalStateException("SpriteBatch.begin must be called before end."); if (idx > 0) renderMesh(); lastTexture = null; idx = 0; drawing = false; GLCommon gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL10.GL_BLEND); if (Gdx.graphics.isGL20Available()) { if (customShader != null) customShader.end(); else shader.end(); } else { gl.glDisable(GL10.GL_TEXTURE_2D); } }
From source file:com.dgcgames.balloonblast.HelpScreen.java
License:Apache License
@Override public void present(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();/*from w w w . java 2s . c o m*/ guiCam.apply(Gdx.gl10); gl.glEnable(GL10.GL_TEXTURE_2D); batcher.disableBlending(); batcher.begin(); batcher.draw(helpRegion, 0, 0, 1024, 768); batcher.end(); batcher.enableBlending(); batcher.begin(); //batcher.draw(Assets.arrow, 320, 0, -64, 64); batcher.end(); gl.glDisable(GL10.GL_BLEND); }
From source file:com.jwatson.omnigame.graphics.CustomBatch.java
License:Apache License
/** Finishes off rendering. Enables depth writes, disables blending and texturing. Must always be called after a call to * {@link #begin()} *//*w w w .ja v a 2 s. c om*/ public void end() { if (!drawing) throw new IllegalStateException("CustomBatch.begin must be called before end."); if (idx > 0) renderMesh(); lastTexture = null; idx = 0; drawing = false; GLCommon gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL10.GL_BLEND); if (Gdx.graphics.isGL20Available()) { if (customShader != null) customShader.end(); else shader.end(); } else { gl.glDisable(GL10.GL_TEXTURE_2D); } }
From source file:com.kingx.dungeons.graphics.cube.CubeRenderer.java
License:Apache License
/** * Finishes off rendering. Enables depth writes, disables blending and * texturing. Must always be called after a call to {@link #begin()} */// w w w . java2 s.c om public void end() { if (!drawing) throw new IllegalStateException("SpriteBatch.begin must be called before end."); if (idx > 0) renderMesh(); idx = 0; drawing = false; GLCommon gl = Gdx.gl; gl.glDepthMask(true); if (isBlendingEnabled()) gl.glDisable(GL10.GL_BLEND); if (customShader != null) customShader.end(); else shader.end(); }
From source file:com.mrljdx.llk.HelpScreen.java
License:Apache License
public void draw(float deltaTime) { GLCommon gl = Gdx.gl; gl.glClear(GL10.GL_COLOR_BUFFER_BIT); guiCam.update();//from w w w.j a va2 s . c om batcher.setProjectionMatrix(guiCam.combined); batcher.disableBlending(); batcher.begin(); batcher.draw(helpRegion, 0, 0, 480, 800); batcher.end(); batcher.enableBlending(); batcher.begin(); switch (helppage) { case 1: batcher.draw(Assets.helpscreen[0], 40, 800 - 680, 400, 600); break; case 2: batcher.draw(Assets.helpscreen[1], 40, 800 - 680, 400, 600); break; case 3: batcher.draw(Assets.helpscreen[2], 40, 800 - 680, 400, 600); break; } batcher.end(); gl.glDisable(GL10.GL_BLEND); }