Example usage for org.lwjgl.opengl GL30 glGenFramebuffers

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

Introduction

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

Prototype

public static void glGenFramebuffers(@NativeType("GLuint *") int[] framebuffers) 

Source Link

Document

Array version of: #glGenFramebuffers GenFramebuffers

Usage

From source file:com.badlogic.gdx.backends.jglfw.JglfwGL30.java

License:Apache License

@Override
public void glGenFramebuffers(int n, IntBuffer framebuffers) {
    GL30.glGenFramebuffers(framebuffers);
}

From source file:ion2d.INGrabber.java

License:Open Source License

/**
 * Default constructor/*from   ww w .  j a  va 2  s.  c o  m*/
 */
public INGrabber() {
    this.bufferObject = BufferUtils.createIntBuffer(1);
    this.oldBufferObject = BufferUtils.createIntBuffer(1);

    GL30.glGenFramebuffers(this.bufferObject);
}

From source file:org.terasology.rendering.opengl.LwjglFrameBufferObject.java

License:Apache License

public LwjglFrameBufferObject(AssetUri uri, Vector2i size) {
    this.size = size;

    IntBuffer fboId = BufferUtils.createIntBuffer(1);
    GL30.glGenFramebuffers(fboId);
    frame = fboId.get(0);// w  w  w.java 2  s. co m

    Texture texture = generateTexture(uri);

    GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, frame);
    GL30.glFramebufferTexture2D(GL30.GL_FRAMEBUFFER, GL30.GL_COLOR_ATTACHMENT0, GL11.GL_TEXTURE_2D,
            texture.getId(), 0);

    int result = GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER);
    if (result != GL30.GL_FRAMEBUFFER_COMPLETE) {
        throw new IllegalStateException("Something went wrong with framebuffer! " + result);
    }

    GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);

    GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0);
}

From source file:processing.lwjgl.PGL.java

License:Open Source License

public void genFramebuffers(int n, IntBuffer ids) {
    GL30.glGenFramebuffers(ids);
}

From source file:processing.lwjgl.PLWJGL.java

License:Open Source License

public void genFramebuffers(int n, IntBuffer framebuffers) {
    GL30.glGenFramebuffers(framebuffers);
}

From source file:processing.opengl.PLWJGL.java

License:Open Source License

@Override
public void genFramebuffers(int n, IntBuffer framebuffers) {
    GL30.glGenFramebuffers(framebuffers);
}