org.lwjgl.opengl.ARBMultisample Java Examples

The following examples show how to use org.lwjgl.opengl.ARBMultisample. 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: Renderer.java    From tribaltrouble with GNU General Public License v2.0 5 votes vote down vote up
public final static void dumpWindowInfo() {
	int r = GLUtils.getGLInteger(GL11.GL_RED_BITS);
	int g = GLUtils.getGLInteger(GL11.GL_GREEN_BITS);
	int b = GLUtils.getGLInteger(GL11.GL_BLUE_BITS);
	int a = GLUtils.getGLInteger(GL11.GL_ALPHA_BITS);
	int depth = GLUtils.getGLInteger(GL11.GL_DEPTH_BITS);
	int stencil = GLUtils.getGLInteger(GL11.GL_STENCIL_BITS);
	int sample_buffers = 0;
	int samples = 0;
	if (GLContext.getCapabilities().GL_ARB_multisample) {
		sample_buffers = GLUtils.getGLInteger(ARBMultisample.GL_SAMPLE_BUFFERS_ARB);
		samples = GLUtils.getGLInteger(ARBMultisample.GL_SAMPLES_ARB);
	}
	System.out.println("r = " + r + " | g = " + g + " | b = " + b + " | a = " + a + " | depth = " + depth + " | stencil = " + stencil + " | sample_buffers = " + sample_buffers + " | samples = " + samples);
}
 
Example #2
Source File: LwjglRenderer.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void setAlphaToCoverage(boolean value) {
    if (value) {
        glEnable(ARBMultisample.GL_SAMPLE_ALPHA_TO_COVERAGE_ARB);
    } else {
        glDisable(ARBMultisample.GL_SAMPLE_ALPHA_TO_COVERAGE_ARB);
    }
}