Example usage for org.lwjgl.opengl GL15 glBindBuffer

List of usage examples for org.lwjgl.opengl GL15 glBindBuffer

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL15 glBindBuffer.

Prototype

public static void glBindBuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int buffer) 

Source Link

Document

Binds a named buffer object.

Usage

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferData(int vboID, ByteBuffer byteBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ARRAY_BUFFER, byteBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferData(int vboID, FloatBuffer floatBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ARRAY_BUFFER, floatBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferData(int vboID, IntBuffer intBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ARRAY_BUFFER, intBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferData(int vboID, ShortBuffer shortBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ARRAY_BUFFER, shortBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferElementData(int vboID, ByteBuffer byteBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, byteBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferElementData(int vboID, IntBuffer intBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, intBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void setBufferElementData(int vboID, ShortBuffer shortBuffer, int usage) {
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, vboID);
    GL15.glBufferData(GL15.GL_ELEMENT_ARRAY_BUFFER, shortBuffer, usage);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void unbind() {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
    GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, 0);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void updateBufferData(int vboID, int offsetBytes, ByteBuffer byteBuffer) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL15.glBufferSubData(GL15.GL_ARRAY_BUFFER, offsetBytes, byteBuffer);
}

From source file:net.smert.frameworkgl.opengl.helpers.VertexBufferObjectHelper.java

License:Apache License

public void updateBufferData(int vboID, int offsetBytes, FloatBuffer floatBuffer) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL15.glBufferSubData(GL15.GL_ARRAY_BUFFER, offsetBytes, floatBuffer);
}