Skip to content

alext.h does not define macros for absent extensions #22649

Open
@sergeyext

Description

@sergeyext

OpenAL does not require all extensions to work and provides alIsExtensionPresent to check if an extension works. My codebase (and I suppose many others) handles this situation like

if (alIsExtensionPresent("AL_SOFT_direct_channels")) {
	alSourcei(id, AL_DIRECT_CHANNELS_SOFT, AL_TRUE);
}

This code fails to compile with emscripten after cf8a0d0 and requires additional macros to fix. On the other hand, if you unconditionlessly call alSourcei(id, AL_DIRECT_CHANNELS_SOFT, AL_TRUE);, it will raise an AL_INVALID_ENUM error on a platform with no such extension, which is expected behavior.

I would like to suggest adding macros of unsupported extensions for compatibility with native code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions