package speiger.src.coreengine.rendering.models.buffers;

import speiger.src.coreengine.rendering.utils.values.GLBuffer;

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