if (colorBuf == null || colorBuf.capacity() < (4 * bufferLength)) {
if (colorBuf == null || colorBuf.capacity() < (bufferLength)) {
    public void updateColorBuffer() {        if (color == null) { return; }        int bufferLength;        if (vertQuantity >= 0)          bufferLength = vertQuantity * 4;        else          bufferLength = vertex.length * 4;        if (colorBuf == null || colorBuf.capacity() < (4 * bufferLength)) {            colorBuf = ByteBuffer.allocateDirect(4 * bufferLength).order(                    ByteOrder.nativeOrder()).asFloatBuffer();        }        colorBuf.clear();        ColorRGBA tempColor;        for (int i = 0, max = bufferLength>>2; i < max; i++) {          tempColor = color[i];          if (tempColor != null) {            colorBuf.put(tempColor.r).put(tempColor.g)                    .put(tempColor.b).put(tempColor.a);          }        }        colorBuf.flip();    }