public void updateVertexArray(Mesh mesh, VertexBuffer instanceData) {
        int id = mesh.getId();
        if (id == -1) {
            IntBuffer temp = intBuf1;
            gl3.glGenVertexArrays(temp);
            id = temp.get(0);
            mesh.setId(id);
        }

        if (context.boundVertexArray != id) {
            gl3.glBindVertexArray(id);
            context.boundVertexArray = id;
        }

        VertexBuffer interleavedData = mesh.getBuffer(Type.InterleavedData);
        if (interleavedData != null && interleavedData.isUpdateNeeded()) {
            updateBufferData(interleavedData);
        }

        if (instanceData != null) {
            setVertexAttrib(instanceData, null);
        }

        for (VertexBuffer vb : mesh.getBufferList().getArray()) {
            if (vb.getBufferType() == Type.InterleavedData
                    || vb.getUsage() == Usage.CpuOnly // ignore cpu-only buffers
                    || vb.getBufferType() == Type.Index) {
                continue;
            }

            if (vb.getStride() == 0) {
                // not interleaved
                setVertexAttrib(vb);
            } else {
                // interleaved
                setVertexAttrib(vb, interleavedData);
            }
        }
    }
Convert a mesh mode to the corresponding GL value.

@param mode input enum value (not null)
@return the corresponding GL value
jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java