Example usage for org.lwjgl.opengl GL15 GL_ARRAY_BUFFER

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

Introduction

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

Prototype

int GL_ARRAY_BUFFER

To view the source code for org.lwjgl.opengl GL15 GL_ARRAY_BUFFER.

Click Source Link

Document

Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, GetBufferParameteriv, and GetBufferPointerv.

Usage

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

License:Apache License

public void bindVertexAttrib(int vboID, int index, int size, int type, int strideBytes, int offsetBytes) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL20.glVertexAttribPointer(index, size, type, false, strideBytes, offsetBytes);
}

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

License:Apache License

public void bindVertexAttribNormalized(int vboID, int index, int size, int type, int strideBytes,
        int offsetBytes) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL20.glVertexAttribPointer(index, size, type, true, strideBytes, offsetBytes);
}

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

License:Apache License

public void bindVertices(int vboID, int size, int type, int strideBytes, int offsetBytes) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL11.glVertexPointer(size, type, strideBytes, offsetBytes);
}

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

License:Apache License

public void bindTexCoords(int vboID, int size, int type, int strideBytes, int offsetBytes) {
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);
    GL11.glTexCoordPointer(size, type, strideBytes, offsetBytes);
}

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 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);
}