[Openal] alcGetProcAddress question
Jason Daly
jdaly at ist.ucf.edu
Mon May 14 08:51:28 PDT 2007
Chris Robinson wrote:
> I suppose this is a question more for this list. The spec says about
> alcGetProcAddress:
> "Entry points can be device specific, but are not context specific. Using a
> NULL device handle does not guarantee that the entry point is returned, even
> if available for one of the available devices."
>
> Does the first part there imply that different devices can return different
> entry points for the same function (entry points that are specific per
> device)? Such that:
>
> p_alcExtFunc = alcGetProcAddress(device1, "alcExtFunc");
>
> can return a different function pointer than
>
> p_alcExtFunc = alcGetProcAddress(device2, "alcExtFunc");
>
> with both pointing to valid functions? Or does it just mean some devices can
> return a function entry point and others not? If the latter is the case, a
> little clarification in the spec may be nice.
>
I believe the former is the case. In theory, you could have two
devices, each with their own native OpenAL implementation. When you
query for an extension, you'd have to get the entry point from that
device's driver, which would obviously need to be different for each device.
> I'm trying to set this up in a way that I can dynamicly load OpenAL and grab
> all known functions (both base and extensions) when initializing, then use
> them throughout the program. But if different devices can return different
> valid functions, that won't really be possible
Unless you assume that you'll only be using one device/implementation at
a time.
> (I'd also iamgine that such
> extensions promoted to core would cause problems with trying to export two
> functions of the same name; one for each device that uses a different one).
>
This shouldn't be an issue if the extension naming scheme is followed
properly (alFooEXT would just become alFoo, as in OpenGL).
--
--"J"
"I'm a castaway stranded in a desolate land,
I can see the footprints in the virtual sand."
--Neil Peart
More information about the Openal
mailing list