我该如何在LWJGL3中创建OpenAL上下文?
我看到过需要使用“ALcontext”,但在当前版本的发布构建中,该类不存在。
(LWJGL 3.0.0 构建 90)
问题#152提供了示例代码:
- 删除了OpenAL的ALDevice/ALContext包装器和OpenCL的CLPlatform/CLDevice包装器。(#152)
Opening the default device and creating a default context with the above changes and no error checks:
// Can call "alc" functions at any time long device = alcOpenDevice((ByteBuffer)null); ALCCapabilities deviceCaps = ALC.createCapabilities(device); long context = alcCreateContext(device, (ByteBuffer)null); alcMakeContextCurrent(context); AL.createCapabilities(deviceCaps); // Can now call "al" functions