AL.create and AL.destroy nonexistant (beginner question)

Started by david37370, February 14, 2015, 14:32:09

Previous topic - Next topic

david37370

I started to look at openAL for sound handling in my game. it may sound wierd, but AL.create() and AL.destroy() dont exist in the class AL, apparently! and all of the tutorials i tried code from, used those functions. i tried both nightly and stable builds, but nothing works and im feeling stupid. is the official tutorial in the lwjgl site outdated??

SHC

Those are the functions available in LWJGL 2.X. In LWJGL 3, the system has changed a lot. You have to do this instead of those two methods.

private ALContext context;

public void myALCreate()
{
    context = ALContext.create(null, 48000, 60, false);
}

public void myALDestroy()
{
    ALDevice device = context.getDevice();
    context.destroy();
    device.destroy();
}


Everything else should be the same as in those tutorials. Hope this helps.

david37370

Thanks! I also want to say that i learned the first steps of VBOs from your tutorials, and i give you credit for that :)