Java Code Examples for com.badlogic.gdx.graphics.GL20#GL_BLEND

The following examples show how to use com.badlogic.gdx.graphics.GL20#GL_BLEND . 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: VfxGLUtils.java    From gdx-vfx with Apache License 2.0 6 votes vote down vote up
/**
 * Provides a simple mechanism to query OpenGL pipeline states.
 * Note: state queries are costly and stall the pipeline, especially on mobile devices!
 * <br/>
 * Queries switched off by default. Update {@link #enableGLQueryStates} flag to enable them.
 */
public static boolean isGLEnabled(int pName) {
    if (!enableGLQueryStates) return false;

    boolean result;

    switch (pName) {
        case GL20.GL_BLEND:
            Gdx.gl20.glGetBooleanv(GL20.GL_BLEND, tmpByteBuffer);
            result = (tmpByteBuffer.get() == 1);
            tmpByteBuffer.clear();
            break;
        default:
            result = false;
    }

    return result;
}
 
Example 2
Source File: PipelineState.java    From uracer-kotd with Apache License 2.0 5 votes vote down vote up
public boolean isEnabled (int pname) {
	boolean ret = false;

	switch (pname) {
	case GL20.GL_BLEND:
		Gdx.gl20.glGetBooleanv(GL20.GL_BLEND, byteBuffer);
		ret = (byteBuffer.get() == 1);
		byteBuffer.clear();
		break;
	default:
		ret = false;
	}

	return ret;
}
 
Example 3
Source File: PipelineState.java    From RuinsOfRevenge with MIT License 5 votes vote down vote up
public boolean isEnabled( int pname ) {
	boolean ret = false;

	switch( pname ) {
	case GL20.GL_BLEND:
		Gdx.gl20.glGetBooleanv( GL20.GL_BLEND, byteBuffer );
		ret = (byteBuffer.get() == 1);
		byteBuffer.clear();
		break;
	default:
		ret = false;
	}

	return ret;
}