Open mleise opened 11 years ago
I'll look into it.
If you add it would that include the efx-utils header? I would use the presets defined there and the conversion routine from legacy EAX to OpenAL. :) Thanks for the good bindings collection at this point. I think it has a big influence on the D ecosystem.
I've read up a bit on extensions and they are generally either device or context specific, so you need to add a function pointer table to whatever wrapper you end up writing around devices and contexts. I don't say Derelict3 should provide such a wrapper, being low level and all, but I could imagine a struct that contains all the EFX function pointers and you could integrate with your own wrappers. The inconvenient part about it is that for everything else Derelict does the loading and binding, and here you are suddenly on your own. So thinking a bit further you might extend the DerelictAL loader with a method that assumes a current AL context (or takes a context pointer and makes it active) and an EFX function pointer struct: loadEfx(ALCcontext* ctx, ref EfxFuncs funcs).
Anyway I've decided to write my own wrapper. OpenAL is not too big, and then I can easily experiment with other extensions.
The reload method in the OpenGL binding exists because a context needs to be created before functions 1.2+ and extensions can be loaded. It may be possible, and worthwhile, to add something similar here. Thanks for digging in to this.
Is it possible to add the OpenAL Effects Extension to Derelict? The OpenAL core does not offer effects common to other sound libraries like FMOD or DirectSound3D. Most importantly reverb effects to simulate sound reflecting from walls around you.