Example usage for org.lwjgl.opengl GL11 glReadPixels

List of usage examples for org.lwjgl.opengl GL11 glReadPixels

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glReadPixels.

Prototype

public static void glReadPixels(@NativeType("GLint") int x, @NativeType("GLint") int y,
        @NativeType("GLsizei") int width, @NativeType("GLsizei") int height, @NativeType("GLenum") int format,
        @NativeType("GLenum") int type, @NativeType("void *") float[] pixels) 

Source Link

Document

Array version of: #glReadPixels ReadPixels

Usage

From source file:zsawyer.mods.stereoscopic3d.renderers.StencilingRenderer.java

License:Open Source License

protected boolean isReinitRequired() {
    stencilMap.rewind();/*from  ww  w.ja va2 s . c  om*/

    GL11.glPixelStorei(GL11.GL_PACK_SWAP_BYTES, GL11.GL_TRUE);
    GL11.glReadPixels(0, 0, stencilTestWidth, stencilTestHeight, GL11.GL_STENCIL_INDEX, GL11.GL_INT,
            stencilMap);
    DebugUtil.checkGLError();

    return stencilMap.get(0) != 1;
}