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


Java PostProcessor.isStateEnabled方法代码示例

本文整理汇总了Java中com.bitfire.postprocessing.PostProcessor.isStateEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java PostProcessor.isStateEnabled方法的具体用法?Java PostProcessor.isStateEnabled怎么用?Java PostProcessor.isStateEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.bitfire.postprocessing.PostProcessor的用法示例。


在下文中一共展示了PostProcessor.isStateEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: render

import com.bitfire.postprocessing.PostProcessor; //导入方法依赖的package包/类
@Override
public void render (final FrameBuffer src, final FrameBuffer dest) {
	Texture texsrc = src.getColorBufferTexture();

	boolean blendingWasEnabled = PostProcessor.isStateEnabled(GL20.GL_BLEND);
	Gdx.gl.glDisable(GL20.GL_BLEND);

	pingPongBuffer.begin();
	{
		// threshold / high-pass filter
		// only areas with pixels >= threshold are blit to smaller fbo
		threshold.setInput(texsrc).setOutput(pingPongBuffer.getSourceBuffer()).render();

		// blur pass
		blur.render(pingPongBuffer);
	}
	pingPongBuffer.end();

	if (blending || blendingWasEnabled) {
		Gdx.gl.glEnable(GL20.GL_BLEND);
	}

	if (blending) {
		// TODO support for Gdx.gl.glBlendFuncSeparate(sfactor, dfactor, GL20.GL_ONE, GL20.GL_ONE );
		Gdx.gl.glBlendFunc(sfactor, dfactor);
	}

	restoreViewport(dest);

	// mix original scene and blurred threshold, modulate via
	// set(Base|Bloom)(Saturation|Intensity)
	combine.setOutput(dest).setInput(texsrc, pingPongBuffer.getResultTexture()).render();
}
 
开发者ID:Osaris31,项目名称:exterminate,代码行数:34,代码来源:Bloom.java

示例2: render

import com.bitfire.postprocessing.PostProcessor; //导入方法依赖的package包/类
@Override
public void render( final FrameBuffer src, final FrameBuffer dest ) {
	Texture texsrc = src.getColorBufferTexture();

	boolean blendingWasEnabled = PostProcessor.isStateEnabled( GL20.GL_BLEND );
	Gdx.gl.glDisable( GL20.GL_BLEND );

	pingPongBuffer.begin();
	{
		// threshold / high-pass filter
		// only areas with pixels >= threshold are blit to smaller fbo
		threshold.setInput( texsrc ).setOutput( pingPongBuffer.getSourceBuffer() ).render();

		// blur pass
		blur.render( pingPongBuffer );
	}
	pingPongBuffer.end();

	if( blending || blendingWasEnabled ) {
		Gdx.gl.glEnable( GL20.GL_BLEND );
	}

	if( blending ) {
		Gdx.gl.glBlendFunc( sfactor, dfactor );
	}

	// mix original scene and blurred threshold, modulate via
	// set(Base|Bloom)(Saturation|Intensity)
	combine.setOutput( dest ).setInput( texsrc, pingPongBuffer.getResultTexture() ).render();
}
 
开发者ID:matheus23,项目名称:RuinsOfRevenge,代码行数:31,代码来源:Bloom.java

示例3: render

import com.bitfire.postprocessing.PostProcessor; //导入方法依赖的package包/类
@Override
public void render (FrameBuffer src, FrameBuffer dest) {
	// the original scene
	Texture in = src.getColorBufferTexture();

	boolean blendingWasEnabled = PostProcessor.isStateEnabled(GL20.GL_BLEND);
	Gdx.gl.glDisable(GL20.GL_BLEND);

	Texture out = null;

	if (doblur) {

		pingPongBuffer.begin();
		{
			// crt pass
			crt.setInput(in).setOutput(pingPongBuffer.getSourceBuffer()).render();

			// blur pass
			blur.render(pingPongBuffer);
		}
		pingPongBuffer.end();

		out = pingPongBuffer.getResultTexture();
	} else {
		// crt pass
		crt.setInput(in).setOutput(buffer).render();

		out = buffer.getColorBufferTexture();
	}

	if (blending || blendingWasEnabled) {
		Gdx.gl.glEnable(GL20.GL_BLEND);
	}

	if (blending) {
		Gdx.gl.glBlendFunc(sfactor, dfactor);
	}

	restoreViewport(dest);

	// do combine pass
	combine.setOutput(dest).setInput(in, out).render();
}
 
开发者ID:Osaris31,项目名称:exterminate,代码行数:44,代码来源:CrtMonitor.java

示例4: render

import com.bitfire.postprocessing.PostProcessor; //导入方法依赖的package包/类
@Override
public void render( FrameBuffer src, FrameBuffer dest ) {
	// the original scene
	Texture in = src.getColorBufferTexture();

	boolean blendingWasEnabled = PostProcessor.isStateEnabled( GL20.GL_BLEND );
	Gdx.gl.glDisable( GL10.GL_BLEND );

	Texture out = null;

	if( doblur ) {

		pingPongBuffer.begin();
		{
			// crt pass
			crt.setInput( in ).setOutput( pingPongBuffer.getSourceBuffer() ).render();

			// blur pass
			blur.render( pingPongBuffer );
		}
		pingPongBuffer.end();

		out = pingPongBuffer.getResultTexture();
	} else {
		// crt pass
		crt.setInput( in ).setOutput( buffer ).render();

		out = buffer.getColorBufferTexture();
	}

	if( blending || blendingWasEnabled ) {
		Gdx.gl.glEnable( GL20.GL_BLEND );
	}

	if( blending ) {
		Gdx.gl.glBlendFunc( sfactor, dfactor );
	}

	// do combine pass
	combine.setOutput( dest ).setInput( in, out ).render();
}
 
开发者ID:matheus23,项目名称:RuinsOfRevenge,代码行数:42,代码来源:CrtMonitor.java


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