fix: now using Int- & Float- Buffers

fix: to small iteration when unqueing buffers
fix: nulling of buffer
This commit is contained in:
Brian Matzon 2002-08-29 12:44:32 +00:00
parent 7bd04b6719
commit c18e8bd28a
5 changed files with 458 additions and 570 deletions

View file

@ -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
*