The spec doesn't say what the behaviour for e.g. alGetString should be when
no context is current. A quick look into the OpenAL repository shows that
the different implementations handle this in almost all possible ways, e.g.
* BeOS: If no context is current, it is always an AL_ILLEGAL_OPERATION.
* OpenAL32 & Mac: Don't care about the context at all.
* Linux: Only flags an error when it is not a known enum (and then it set
an ALC_INVALID_CONTEXT when there is no context, and an AL_ILLEGAL_ENUM
otherwise. An ALC error from an AL function?? Mega-strange...)
IMHO the BeOS way is the right thing because different contexts could belong
to different devices using different implementations, so without a context
at hand there is not really much to report.
I don't have a strong preference here, but at least it should be clarified
somehow in the spec and the implementations should be unified accordingly.
Cheers,
S.
|