Example usage for org.lwjgl.opengl GL30 GL_RASTERIZER_DISCARD

List of usage examples for org.lwjgl.opengl GL30 GL_RASTERIZER_DISCARD

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL30 GL_RASTERIZER_DISCARD.

Prototype

int GL_RASTERIZER_DISCARD

To view the source code for org.lwjgl.opengl GL30 GL_RASTERIZER_DISCARD.

Click Source Link

Document

Accepted by the cap parameter of Enable, Disable, and IsEnabled, and by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

Usage

From source file:com.xrbpowered.gl.res.shaders.FeedbackVertices.java

License:Open Source License

public void transform() {
    GL30.glBindVertexArray(vaoId);/*from  w  ww  .  jav a  2s.co  m*/
    GL11.glEnable(GL30.GL_RASTERIZER_DISCARD);
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboId);

    transformShader.use();
    transformShader.info.initAttribPointers();
    transformShader.info.enableAttribs();

    GL30.glBindBufferBase(GL30.GL_TRANSFORM_FEEDBACK_BUFFER, 0, vboFeedbackId);
    GL30.glBeginTransformFeedback(GL11.GL_POINTS);
    GL11.glDrawArrays(GL11.GL_POINTS, 0, countElements);
    GL30.glEndTransformFeedback();

    transformShader.info.disableAttribs();
    transformShader.unuse();
    GL11.glDisable(GL30.GL_RASTERIZER_DISCARD);
}