I have recently learned that one needs to obtain the extension function pointers for each context separately. I didn´t do this yet but never encountered any problems related to that (Neither in Windows, nor in Linux) either.
So, what shall I do? Ignore the ‘problem’ or try to fix it?
GLEW has support for multiple contexts. i had the same “problem” and i choosed to solve it with GLEW, but i didn’t have any problems neither.
I believe its only the windowing system specific (eg. wgl) functions that you need to get per context… someone correct me if I’m wrong.
Haven’t really had problems with reusing the wgl functions across contexts and threads either… would love to hear from Nvidia/ATI driver writers if this is something that is ever relevant or an empty portion of the spec.
Usually, you should querry the extension pointers for each context separately because this contexts may belong to different implementations. So actually you can ignore this “problem”, but you should take it into the consideration if you want 100% stability on all possible drivers. Maybe some future drivers will have own entry points for different pixel formats, etc.
You should refresh your function table after you bind the context, this is the safest way to do it.
Note that this is not necessary in Linux as the ABI spec does state that entrypoints are valid for all contexts.
for windows it’s documented that you can rely on the function pointers being the same if the pixel formats of the contexts are identical, otherwise it’s implementation dependent.