|
From: Elias N. <eli...@us...> - 2003-06-24 12:24:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv25896/src/java/org/lwjgl Modified Files: Display.java Sys.java Log Message: Ported OpenGL to Buffers Index: Display.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Display.java 1 Jun 2003 17:26:02 -0000 1.29 +++ Display.java 24 Jun 2003 12:24:54 -0000 1.30 @@ -234,7 +234,7 @@ rampEntry = 0.0f; gammaRamp.put(i, rampEntry); } - if (!setGammaRamp(Sys.getDirectBufferAddress(gammaRamp))) + if (!setGammaRamp(gammaRamp)) return false; if (Sys.DEBUG) { System.out.println("Gamma set, gamma = " + gamma + ", brightness = " + brightness + ", contrast = " + contrast); @@ -253,5 +253,5 @@ /** * Native method to set the gamma ramp. */ - private static native boolean setGammaRamp(int gammaRampAddress); + private static native boolean setGammaRamp(FloatBuffer gammaRamp); } Index: Sys.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Sys.java 12 Jun 2003 14:07:36 -0000 1.19 +++ Sys.java 24 Jun 2003 12:24:54 -0000 1.20 @@ -84,9 +84,9 @@ public static final boolean DEBUG; /** - * The integer equivalent of the native NULL constant + * The ByteBuffer equivalent of the native NULL constant */ - public static final int NULL; + public static final ByteBuffer NULL; private static boolean _debug; @@ -133,29 +133,7 @@ /** * Gets the native NULL constant value */ - private static native int nGetNULLValue(); - - /** - * Gets the address of a buffer. If the address cannot be obtained for any reason - * then this method returns 0. - * - * @param buffer The buffer for which you want the - * @return the address of the direct buffer passed in - */ - public static native int getDirectBufferAddress(Buffer buffer); - - /** - * Create a direct byte buffer at the specified address with the specified - * capacity. Note that no actual memory allocation is performed. The returned - * direct byte buffer is in native endian order. - * - * @param address The address of the buffer - * @param length The length in bytes that the buffer should have - * @return a direct ByteBuffer - * @throws IllegalArgumentException if address <1 or length <1 - */ - public static native ByteBuffer createDirectBuffer(int address, int length) - throws IllegalArgumentException; + private static native ByteBuffer nGetNULLValue(); /** * Obtains the number of ticks that the hires timer does in a second. |