本文整理汇总了Java中com.badlogic.gdx.graphics.GLCommon.glDisable方法的典型用法代码示例。如果您正苦于以下问题:Java GLCommon.glDisable方法的具体用法?Java GLCommon.glDisable怎么用?Java GLCommon.glDisable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.graphics.GLCommon
的用法示例。
在下文中一共展示了GLCommon.glDisable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderGridLines
import com.badlogic.gdx.graphics.GLCommon; //导入方法依赖的package包/类
private void renderGridLines() {
GLCommon gl = Gdx.graphics.getGLCommon();
gl.glEnable(GL10.GL_BLEND);
shapeRenderer.begin(ShapeType.Line);
shapeRenderer.setColor(1f, 1f, 1f, 0.15f);
for (int i = 0; i <= gameGrid.getGridSize().x; i++) {
shapeRenderer.line(i * GRID_UNIT_SIZE, 0, i * GRID_UNIT_SIZE, gameGrid.getGridSize().y * GRID_UNIT_SIZE);
}
for (int i = 0; i <= gameGrid.getGridSize().y; i++) {
shapeRenderer.line(0, i * GRID_UNIT_SIZE, gameGrid.getGridSize().x * GRID_UNIT_SIZE, i * GRID_UNIT_SIZE);
}
shapeRenderer.end();
gl.glDisable(GL10.GL_BLEND);
}
示例2: draw
import com.badlogic.gdx.graphics.GLCommon; //导入方法依赖的package包/类
public void draw (float deltaTime) {
GLCommon gl = Gdx.gl;
gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
guiCam.update();
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);
}
示例3: end
import com.badlogic.gdx.graphics.GLCommon; //导入方法依赖的package包/类
public void end()
{
if (!this.drawing)
throw new IllegalStateException("SpriteBatch.begin must be called before end.");
if (this.idx > 0)
renderMesh();
this.lastTexture = null;
this.idx = 0;
this.drawing = false;
this.indexBuffer.unbind();
GLCommon localGLCommon = Gdx.gl;
localGLCommon.glDepthMask(true);
if (isBlendingEnabled())
localGLCommon.glDisable(3042);
if (Gdx.graphics.isGL20Available())
{
if (this.customShader != null)
{
this.customShader.end();
return;
}
this.shader.end();
return;
}
localGLCommon.glDisable(3553);
}
示例4: end
import com.badlogic.gdx.graphics.GLCommon; //导入方法依赖的package包/类
public void end()
{
if (!this.drawing)
throw new IllegalStateException("PolygonSpriteBatch.begin must be called before end.");
if (this.idx > 0)
renderMesh();
this.lastTexture = null;
this.idx = 0;
this.drawing = false;
GLCommon localGLCommon = Gdx.gl;
localGLCommon.glDepthMask(true);
if (isBlendingEnabled())
localGLCommon.glDisable(3042);
if (Gdx.graphics.isGL20Available())
{
if (this.customShader != null)
{
this.customShader.end();
return;
}
this.shader.end();
return;
}
localGLCommon.glDisable(3553);
}
示例5: renderGL2
import com.badlogic.gdx.graphics.GLCommon; //导入方法依赖的package包/类
@Override
public void renderGL2(float gameTime)
{
GLCommon gl = Gdx.gl;
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
SpriteBatch batch = getSpriteBatch();
viewMatrix.setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
batch.setProjectionMatrix(viewMatrix);
batch.begin();
batch.disableBlending();
batch.setColor(Color.WHITE);
//begin render background
renderBackground(gameTime);
batch.enableBlending();
batch.end();
gl.glEnable(GL10.GL_DEPTH_TEST);
gl.glEnable(GL10.GL_CULL_FACE);
camera.update();
for(IDrawable3D obj : collection)
if(obj.isVisible())
{
obj.renderGL2(gameTime);
}
gl.glDisable(GL10.GL_CULL_FACE);
gl.glDisable(GL10.GL_DEPTH_TEST);
batch.setProjectionMatrix(viewMatrix);
batch.begin();
//begin render foreground
renderForeground(gameTime);
//batch.enableBlending();
//batch.setBlendFunction(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA);
batch.end();
}