Function calls are not used in context. Only objects. And only some objects.
In general, shared objects are those that are obviously not permissible for re-creation in a different context. Either due to the storage of a large amount of data, or the relatively long setup time.
If you need a list, the following are common objects:
- Show Lists
- textures
- Renderbuffers
- Buffer objects
- Shaders and programs
Known objects that are not shared:
- Vertex array objects (the buffer objects that go into them are shared, but not by the object itself)
- Framebuffer objects (as in VAO, general information only).
A shared resource means that it supports all states in contexts. Therefore, if you change state from one context, you will see it in another. However, this also means that you must synchronize your access to shared GL objects if you use multiple threads. Otherwise, race conditions and other troubles may arise.
source share