mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-07 23:44:06 +00:00
New buffer code
This commit is contained in:
parent
f625bea9f0
commit
eb7e231172
8 changed files with 398 additions and 566 deletions
|
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
package org.lwjgl.openal;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
|
|
@ -57,16 +57,16 @@ final class ALCcontext {
|
|||
this.context = context;
|
||||
}
|
||||
|
||||
static Buffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) {
|
||||
ByteBuffer attribList = ByteBuffer.allocateDirect(7*4).order(ByteOrder.nativeOrder());
|
||||
static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) {
|
||||
IntBuffer attribList = ByteBuffer.allocateDirect(7*4).order(ByteOrder.nativeOrder()).asIntBuffer();
|
||||
|
||||
attribList.putInt(ALC.ALC_FREQUENCY);
|
||||
attribList.putInt(contextFrequency);
|
||||
attribList.putInt(ALC.ALC_REFRESH);
|
||||
attribList.putInt(contextRefresh);
|
||||
attribList.putInt(ALC.ALC_SYNC);
|
||||
attribList.putInt(contextSynchronized);
|
||||
attribList.putInt(0); //terminating int
|
||||
attribList.put(ALC.ALC_FREQUENCY);
|
||||
attribList.put(contextFrequency);
|
||||
attribList.put(ALC.ALC_REFRESH);
|
||||
attribList.put(contextRefresh);
|
||||
attribList.put(ALC.ALC_SYNC);
|
||||
attribList.put(contextSynchronized);
|
||||
attribList.put(0); //terminating int
|
||||
|
||||
return attribList;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue