当前位置: 首页>>代码示例>>Java>>正文


Java GLCommon.glDisable方法代码示例

本文整理汇总了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);
}
 
开发者ID:frigidplanet,项目名称:droidtowers,代码行数:20,代码来源:GameGridRenderer.java

示例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);
}
 
开发者ID:Nextpeer,项目名称:Nextpeer-libgdx-Sample,代码行数:19,代码来源:HelpScreen2.java

示例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);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:27,代码来源:SpriteBatch.java

示例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);
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:26,代码来源:PolygonSpriteBatch.java

示例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();
}
 
开发者ID:game-libgdx-unity,项目名称:GDX-Engine,代码行数:39,代码来源:BaseGameScene3D.java


注:本文中的com.badlogic.gdx.graphics.GLCommon.glDisable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。