View Full Version : Extension Entry Points per Context?

01-10-2006, 12:32 AM
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?

01-10-2006, 05:39 AM
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.

01-10-2006, 11:54 AM
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.

01-10-2006, 12:23 PM
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.

01-10-2006, 12:28 PM
Note that this is not necessary in Linux as the ABI spec does state that entrypoints are valid for all contexts.

01-10-2006, 06:56 PM
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.