@Override
    public void bind() {
        int offset = 0;
        
        // 4 bytes per float
        int stride = totalNumComponents * 4;
        
        for(int i = 0; i < attributes.length; i++) {
            VertexAttrib a = attributes[i];
            buffer.position(offset);
            GL20.glEnableVertexAttribArray(a.location);
            GL20.glVertexAttribPointer(a.location, a.numComponents, false, stride, buffer);
            offset += a.numComponents;
        }
    }