From 928c9e59205874d1e9f73591514273d6d5608cd4 Mon Sep 17 00:00:00 2001 From: athomas Date: Tue, 24 Jun 2003 20:08:27 +0000 Subject: added missing native calls git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@28 03bf7f67-59de-4072-a415-9a990d468a3f --- src/java/net/java/games/joal/ALImpl.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/java/net/java/games/joal/ALImpl.java b/src/java/net/java/games/joal/ALImpl.java index 9ac8301..14362de 100644 --- a/src/java/net/java/games/joal/ALImpl.java +++ b/src/java/net/java/games/joal/ALImpl.java @@ -300,7 +300,11 @@ final class ALImpl implements AL { public native void alSourcef(int sourcename, int pname, float value); - public native void alSourcefv(int sourcename, int pname, float[] value); + public void alSourcefv(int sourcename, int pname, float[] value) { + alSourcefvNative(sourcename,pname,value); + } + + private native void alSourcefvNative(int sourcename, int pname, float[] value); public void alSourcefv(int sourcename, int pname, FloatBuffer value) { if ((value != null) && !value.isDirect()) { @@ -669,9 +673,21 @@ final class ALImpl implements AL { public native void alListener3f(int pname, float v1, float v2, float v3); - public native void alListenerfv(int pname, float[] values); + public void alListenerfv(int pname, float[] values) { + alListenerfvNative(pname,values); + } + + private native void alListenerfvNative(int pname, float[] value); + + public void alListenerfv(int pname, FloatBuffer value) { + if ((value != null) && !value.isDirect()) { + throw new IllegalArgumentException("buffer must be direct"); + } else { + alListenerfvNative(pname, value); + } + } - public native void alListenerfv(int pname, FloatBuffer values); + private native void alListenerfvNative(int pname, FloatBuffer value); public native void alListeneri(int pname, int value); -- cgit v1.2.3