I\'m new to OpenGL and Graphics Programming. I\'ve been reading a textbook which has been really thorough and well-written so far.However, I\'ve hit a point in the code that
Your interpretation of the book is not completely correct. Vertex Array Objects store no data. They are a class of objects known as containers, like Framebuffer Objects. You may attach/associate other objects with them, but they never store data themselves. As such they are not a context shareable resource.
Basically Vertex Array Objects encapsulate vertex array state in OpenGL 3.0. Beginning with OpenGL 3.1 (in lieu of GL_ARB_compatibility) and OpenGL 3.2+ Core profiles, you must have a non-zero VAO bound at all times for commands like glVertexAttribPointer (...) or glDrawArrays (...) to function. The bound VAO forms the necessary context for these commands, and stores the state persistently.
In older versions of GL (and compatibility), the state stored by VAOs was a part of the global state machine.
It is also worth mentioning that the "current" binding for GL_ARRAY_BUFFER is not one of the states that VAOs track. While this binding is used by commands such as glVertexAttribPointer (...), VAOs do not store the binding they only store pointers (the GL_ARB_vertex_attrib_binding extension introduced alongside GL 4.3 complicates this a bit, so let us ignore it for simplicity).
VAOs do remember what is bound to GL_ELEMENT_ARRAY_BUFFER, however, so that indexed drawing commands such as glDrawElements (...) function as you would expect (e.g. VAOs re-use the last element array buffer bound).