Hi,
the first question:
is it possible to create and switch multiple contexts for one device? Daniel PEACOCK says: http://www.nabble.com/Multiple-Contexts-On-One-Device-tf4107112.html Is there a wokaround to solve this problem? My code throws a EXCEPTION_ACCESS_VIOLATION when I try this:
AL al = ALFactory.getAL();
ALC alc = ALFactory.getALC();
ALCdevice dev = alc.alcOpenDevice(null);
ALCcontext con = alc.alcCreateContext(dev, null);
if (alc.alcGetError(dev) == ALC.ALC_TRUE) {
System.out.println("Error...");
}
ALCcontext con1 = alc.alcCreateContext(dev, null);
if (alc.alcGetError(dev) == ALC.ALC_TRUE) {
System.out.println("Error....");
}
System.out.println("is con current? : " + alc.alcMakeContextCurrent(con) + "\n");
System.out.println("is con1 current? : " + alc.alcMakeContextCurrent(con1));
System.out.println("Version: " + al.alGetString(al.AL_VERSION));
System.out.println("Device: " + al.alGetString(al.AL_RENDERER));
the next question:
is it possible to create and switch multiple contexts for different devices (each device has one context)? I have tried this unsuccessfully:
AL al = ALFactory.getAL();
ALC alc = ALFactory.getALC();
ALCdevice dev = alc.alcOpenDevice(null);
ALCdevice dev1 = alc.alcOpenDevice("Generic Hardware");
ALCcontext con = alc.alcCreateContext(dev, null);
if (alc.alcGetError(dev) == ALC.ALC_TRUE) {
System.out.println("Error...");
}
ALCcontext con1 = alc.alcCreateContext(dev1, null);
if (alc.alcGetError(dev1) == ALC.ALC_TRUE) {
System.out.println("Error...");
}
System.out.println("is con current? : " + alc.alcMakeContextCurrent(con));
System.out.println("Version: " + al.alGetString(al.AL_VERSION));
System.out.println("Device - Name: " + al.alGetString(al.AL_RENDERER) + "\n");
System.out.println("is con1 current? : " + alc.alcMakeContextCurrent(con1));
System.out.println("Version: " + al.alGetString(al.AL_VERSION));
System.out.println("Name: " + al.alGetString(al.AL_RENDERER));