Java Code Examples for com.badlogic.gdx.graphics.Pixmap.Format#RGBA4444

The following examples show how to use com.badlogic.gdx.graphics.Pixmap.Format#RGBA4444 . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransitionManager.java    From uracer-kotd with Apache License 2.0 6 votes vote down vote up
public TransitionManager (Rectangle viewport, boolean use32Bits, boolean useAlphaChannel, boolean useDepth) {
	this.viewport.set(viewport);
	transition = null;
	paused = false;
	fbFormat = Format.RGB565;
	usedepth = useDepth;

	if (use32Bits) {
		if (useAlphaChannel) {
			fbFormat = Format.RGBA8888;
		} else {
			fbFormat = Format.RGB888;
		}
	} else {
		if (useAlphaChannel) {
			fbFormat = Format.RGBA4444;
		} else {
			fbFormat = Format.RGB565;
		}
	}

	fbFrom = new FrameBuffer(fbFormat, (int)viewport.width, (int)viewport.height, useDepth);
	fbTo = new FrameBuffer(fbFormat, (int)viewport.width, (int)viewport.height, useDepth);
}
 
Example 2
Source File: PostProcessor.java    From RuinsOfRevenge with MIT License 6 votes vote down vote up
public PostProcessor( int fboWidth, int fboHeight, boolean useDepth, boolean useAlphaChannel, boolean use32Bits,
		TextureWrap u, TextureWrap v ) {
	if( use32Bits ) {
		if( useAlphaChannel ) {
			fbFormat = Format.RGBA8888;
		} else {
			fbFormat = Format.RGB888;
		}
	} else {
		if( useAlphaChannel ) {
			fbFormat = Format.RGBA4444;
		} else {
			fbFormat = Format.RGB565;
		}
	}

	composite = newPingPongBuffer( fboWidth, fboHeight, fbFormat, useDepth );
	setBufferTextureWrap( u, v );

	pipelineState = new PipelineState();

	capturing = false;
	hasCaptured = false;
	enabled = true;
	this.useDepth = useDepth;
}
 
Example 3
Source File: PostProcessor.java    From uracer-kotd with Apache License 2.0 5 votes vote down vote up
/** Construct a new PostProcessor with the given parameters and the specified texture wrap mode */
public PostProcessor (int fboWidth, int fboHeight, boolean useDepth, boolean useAlphaChannel, boolean use32Bits,
	TextureWrap u, TextureWrap v) {
	if (use32Bits) {
		if (useAlphaChannel) {
			fbFormat = Format.RGBA8888;
		} else {
			fbFormat = Format.RGB888;
		}
	} else {
		if (useAlphaChannel) {
			fbFormat = Format.RGBA4444;
		} else {
			fbFormat = Format.RGB565;
		}
	}

	composite = newPingPongBuffer(fboWidth, fboHeight, fbFormat, useDepth);
	setBufferTextureWrap(u, v);

	pipelineState = new PipelineState();

	capturing = false;
	hasCaptured = false;
	enabled = true;
	this.useDepth = useDepth;
	if (useDepth) {
		clearBits |= GL20.GL_DEPTH_BUFFER_BIT;
	}

	setViewport(null);
}
 
Example 4
Source File: BGDrawer.java    From libGDX-Path-Editor with Apache License 2.0 5 votes vote down vote up
public BGDrawer() {
	renderer = new ShapeRenderer();
	
	Pixmap p = new Pixmap(4, 4, Format.RGBA4444);
	p.setColor(0.698f, 0.698f, 0.698f, 1f);
	p.fill();
	overlay = new Texture(p);
	p.dispose();
	
	t = new Sprite(overlay);
	b = new Sprite(overlay);
	l = new Sprite(overlay);
	r = new Sprite(overlay);
}
 
Example 5
Source File: VirtualRealityRenderer.java    From gdx-vr with Apache License 2.0 4 votes vote down vote up
public void resize(int screenWidth, int screenHeight) {
	// TODO: set up the FBOs
	// TODO: what happens in case the FBO size won't be PoT?
	FrameBuffer fbo = new FrameBuffer(Format.RGBA4444, screenWidth, screenHeight, false);
}