package speiger.src.coreengine.rendering.models;

import org.lwjgl.opengl.GL15;

public class RenderBuffer extends VertexBuffer
{
	BufferAttribute[] attributes;
	int totalBytes;
	
	public RenderBuffer(BufferAttribute...attr)
	{
		super(GL15.GL_ARRAY_BUFFER);
		attributes = attr;
		totalBytes = VertexArray.countBytes(attr);
	}
	
	public RenderBuffer bindVAO()
	{
		super.bind();
		VertexArray.finishAttributes(totalBytes, attributes);
		return this;
	}
}
