mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 23:14:19 +00:00
fix: now using Int- & Float- Buffers
fix: to small iteration when unqueing buffers fix: nulling of buffer
This commit is contained in:
parent
7bd04b6719
commit
c18e8bd28a
5 changed files with 458 additions and 570 deletions
|
|
@ -37,6 +37,10 @@ import org.lwjgl.openal.ALCcontext;
|
|||
import org.lwjgl.openal.ALCdevice;
|
||||
import org.lwjgl.openal.ALUT;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
|
|
@ -95,6 +99,20 @@ public abstract class BasicTest {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an integer buffer to hold specified ints
|
||||
* - strictly a utility method
|
||||
*
|
||||
* @param size how many int to contain
|
||||
* @return created IntBuffer
|
||||
*/
|
||||
protected IntBuffer createIntBuffer(int size) {
|
||||
ByteBuffer temp = ByteBuffer.allocateDirect(4*size);
|
||||
temp.order(ByteOrder.nativeOrder());
|
||||
|
||||
return temp.asIntBuffer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Exits the test NOW, printing errorcode to stdout
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue