You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(8) |
2
(34) |
|
3
(15) |
4
(17) |
5
(7) |
6
(2) |
7
(4) |
8
|
9
|
|
10
(1) |
11
(8) |
12
(5) |
13
(7) |
14
|
15
|
16
(1) |
|
17
(70) |
18
|
19
(5) |
20
(1) |
21
|
22
|
23
(7) |
|
24
(3) |
25
(3) |
26
(1) |
27
|
28
(1) |
29
(4) |
30
(3) |
|
31
|
|
|
|
|
|
|
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-08-01 20:57:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv11523/src/java/org/lwjgl/opengl Modified Files: CoreGL12.java CoreGL11.java Log Message: Index: CoreGL12.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL12.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL12.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CoreGL12.java 1 Aug 2003 16:53:10 -0000 1.5 +++ CoreGL12.java 1 Aug 2003 20:57:09 -0000 1.6 @@ -47,23 +47,6 @@ */ public class CoreGL12 extends CoreGL11 implements CoreGL12Constants { - /** - * A helper function which is used to get the byte offset in an arbitrary buffer - * based on its position - * @return the position of the buffer, in BYTES - */ - static int getOffset(Buffer buffer) { - if (buffer instanceof FloatBuffer || buffer instanceof IntBuffer) - return buffer.position() << 2; - else if (buffer instanceof ShortBuffer || buffer instanceof CharBuffer) - return buffer.position() << 1; - else if (buffer instanceof DoubleBuffer || buffer instanceof LongBuffer) - return buffer.position() << 3; - else - return buffer.position(); - } - - public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { nglColorTable(target, internalFormat, width, format, type, data, data.position()); } @@ -200,11 +183,11 @@ } private static native void nglGetConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset); public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, Buffer column) { - nglSeparableFilter2D(target, internalformat, width, height, format, type, row, getOffset(row), column, getOffset(column)); + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, Util.getOffset(row), column, Util.getOffset(column)); } private static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset); public static void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span) { - nglGetSeparableFilter(target, format, type, row, getOffset(row), column, getOffset(column), span, getOffset(span)); + nglGetSeparableFilter(target, format, type, row, Util.getOffset(row), column, Util.getOffset(column), span, Util.getOffset(span)); } private static native void nglGetSeparableFilter(int target, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset, Buffer span, int span_offset); public static void glDrawRangeElements(int mode, int start, int end, int count, int type, ByteBuffer indices) { Index: CoreGL11.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL11.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CoreGL11.java 1 Aug 2003 15:34:54 -0000 1.5 +++ CoreGL11.java 1 Aug 2003 20:57:09 -0000 1.6 @@ -66,10 +66,10 @@ private static native void nglCallLists(int n, int type, Buffer lists, int lists_offset); public static native void glCallList(int list); public static native void glBlendFunc(int sfactor, int dfactor); - private static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap) { + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap) { nglBitmap(width, height, xorig, yorig, xmove, ymove, bitmap, bitmap.position()); } - public static native void nglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap, int bitmap_offset); + private static native void nglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap, int bitmap_offset); public static native void glBindTexture(int target, int texture); public static native void glBegin(int mode); public static native void glEnd(); @@ -89,7 +89,7 @@ public static void glColorPointer(int size, int stride, FloatBuffer pointer) { nglColorPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); } - public static native void nglColorPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); + private static native void nglColorPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static native void glColorMaterial(int face, int mode); public static native void glColorMask(boolean red, boolean green, boolean blue, boolean alpha); public static native void glColor3b(byte red, byte green, byte blue); @@ -235,6 +235,15 @@ public static native boolean glIsEnabled(int cap); public static void glInterleavedArrays(int format, int stride, ByteBuffer pointer) { nglInterleavedArrays(format, stride, pointer, pointer.position()); + } + public static void glInterleavedArrays(int format, int stride, ShortBuffer pointer) { + nglInterleavedArrays(format, stride, pointer, pointer.position() << 1); + } + public static void glInterleavedArrays(int format, int stride, IntBuffer pointer) { + nglInterleavedArrays(format, stride, pointer, pointer.position() << 2); + } + public static void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { + nglInterleavedArrays(format, stride, pointer, pointer.position() << 2); } private static native void nglInterleavedArrays(int format, int stride, Buffer pointer, int pointer_offset); public static native void glInitNames(); |
|
From: Elias N. <eli...@us...> - 2003-08-01 19:34:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv24840/src/java/org/lwjgl/opengl Modified Files: GL.java Log Message: Converted GL to the new overloaded system Index: GL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- GL.java 25 Jul 2003 13:09:33 -0000 1.31 +++ GL.java 1 Aug 2003 19:34:21 -0000 1.32 @@ -34,9 +34,8 @@ import java.nio.ByteBuffer; import java.nio.IntBuffer; -import java.nio.CharBuffer; +import java.nio.ShortBuffer; import java.nio.FloatBuffer; -import java.nio.DoubleBuffer; import java.nio.Buffer; /** @@ -85,10 +84,10 @@ [...1601 lines suppressed...] + nglBufferSubDataARB(target, offset, size, data, data.position()<<2); + } + public static void glBufferSubDataARB(int target, int offset, int size, IntBuffer data) { + nglBufferSubDataARB(target, offset, size, data, data.position()<<2); + } + private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset); public static native void glGetBufferSubDataARB(int target, int offset, int size, Buffer data); /** * glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in @@ -1291,6 +1501,9 @@ */ public static native ByteBuffer glMapBufferARB(int target, int access, int size, ByteBuffer oldBuffer); public static native boolean glUnmapBufferARB(int target); - public static native void glGetBufferParameterivARB(int target, int pname, IntBuffer params); + public static void glGetBufferParameterivARB(int target, int pname, IntBuffer params) { + nglGetBufferParameterivARB(target, pname, params, params.position()); + } + private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_offset); public static native ByteBuffer glGetBufferPointervARB(int target, int pname, int size); } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-08-01 18:42:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv419/src/java/org/lwjgl/opengl Modified Files: GLU.java GLUConstants.java Log Message: Major change to use overloaded buffer functions and buffer positions. In addition, quadrics and default shapes have been removed from GLU. Index: GLU.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLU.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLU.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- GLU.java 20 Jul 2003 16:25:05 -0000 1.12 +++ GLU.java 1 Aug 2003 17:53:44 -0000 1.13 @@ -93,7 +93,7 @@ double upy, double upz); - public static native int gluProject( + public static int gluProject( double objx, double objy, double objz, @@ -101,9 +101,25 @@ DoubleBuffer projMatrix, IntBuffer viewport, DoubleBuffer win + ) { + return ngluProject(objx, objy, objz, modelMatrix, modelMatrix.position(), projMatrix, projMatrix.position(), viewport, viewport.position(), win, win.position()); + } + + private static native int ngluProject( + double objx, + double objy, + double objz, + DoubleBuffer modelMatrix, + int modelMatrix_offset, + DoubleBuffer projMatrix, + int projMatrix_offset, + IntBuffer viewport, + int viewport_ofset, + DoubleBuffer win, + int win_offset ); - public static native int gluUnProject( + public static int gluUnProject( double winx, double winy, double winz, @@ -111,27 +127,67 @@ DoubleBuffer projMatrix, IntBuffer viewport, DoubleBuffer obj + ) { + return ngluUnProject(winx, winy, winz, modelMatrix, modelMatrix.position(), projMatrix, projMatrix.position(), viewport, viewport.position(), obj, obj.position()); + } + + private static native int ngluUnProject( + double winx, + double winy, + double winz, + DoubleBuffer modelMatrix, + int modelMatrix_offset, + DoubleBuffer projMatrix, + int projMatrix_offset, + IntBuffer viewport, + int viewport_offset, + DoubleBuffer obj, + int obj_offset ); - public static native int gluScaleImage( + public static int gluScaleImage( int format, int widthin, int heightin, int typein, ByteBuffer datain, int widthout, int heightout, int typeout, ByteBuffer dataout + ) { + return ngluScaleImage(format, widthin, heightin, typein, datain, datain.position(), widthout, heightout, typeout, dataout, dataout.position()); + } + + private static native int ngluScaleImage( + int format, + int widthin, + int heightin, + int typein, + ByteBuffer datain, + int datain_offset, + int widthout, int heightout, int typeout, ByteBuffer dataout, int dataout_offset ); - public static native int gluBuild1DMipmaps( + public static int gluBuild1DMipmaps( int target, int components, int width, int format, int type, ByteBuffer data + ) { + return ngluBuild1DMipmaps(target, components, width, format, type, data, data.position()); + } + + private static native int ngluBuild1DMipmaps( + int target, + int components, + int width, + int format, + int type, + ByteBuffer data, + int data_offset ); - public static native int gluBuild2DMipmaps( + public static int gluBuild2DMipmaps( int target, int components, int width, @@ -139,228 +195,19 @@ int format, int type, ByteBuffer data - ); - - /** - * creates and returns a pointer to a new quadrics object. This - * object must be referred to when calling quadrics rendering and control - * functions. A return value of null means that there is not enough memory to - * allocate the object - * - * @return ByteBuffer representing a new quadrics object - */ - public static native ByteBuffer gluNewQuadric(); - - /** - * draws a cylinder oriented along the z axis. The base of the - * cylinder is placed at z = 0, and the top at z=height. Like a sphere, a - * cylinder is subdivided around the z axis into slices, and along the z axis - * into stacks. - * - * Note that if topRadius is set to zero, then this routine will generate a - * cone. - * - * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then - * any generated normals point away from the z axis. Otherwise, they point - * toward the z axis. - * - * If texturing is turned on (with glu.quadricTexture), then texture - * coordinates are generated so that t ranges linearly from 0.0 at z = 0 to - * 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x - * axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the - * +y axis. - * - * @param target Specifies the quadrics object (created with glu.newQuadric). - * - * @param baseRadius Specifies the radius of the cylinder at z = 0. - * - * @param topRadius Specifies the radius of the cylinder at z = height. - * - * @param height Specifies the height of the cylinder. - * - * @param slices Specifies the number of subdivisions around the z axis. - * - * @param stacks Specifies the number of subdivisions along the z axis. - */ - public static native void gluCylinder( - ByteBuffer target, - double baseRadius, - double topRadius, - double height, - int slices, - int stacks - ); - - /** - * destroys the quadrics object and frees any memory used by - * it. Once glu.deleteQuadric has been called, the object cannot be used again. - * - * @param qobj pecifies the quadrics object to be destroyed (created with - * glu.newQuadric). - */ - public static native void gluDeleteQuadric( - ByteBuffer qobj - ); - - - /** - * renders a disk on the z = 0 plane. The disk has a radius of - * outerRadius, and contains a concentric circular hole with a radius of - * innerRadius. If innerRadius is 0, then no hole is generated. The disk is - * subdivided around the z axis into slices (like pizza slices), and also - * about the z axis into rings (as specified by slices and loops, - * respectively). - * - * With respect to orientation, the +z side of the disk is considered to be - * "outside" (see glu.quadricOrientation). This means that if the orientation - * is set to GLU.OUTSIDE, then any normals generated point along the +z axis. - * Otherwise, they point along the -z axis. - * - * If texturing is turned on (with glu.quadricTexture), texture coordinates are - * generated linearly such that where r=outerRadius, the value at (r, 0, 0) is - * (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and at - * (0, -r, 0) it is (0.5, 0). - */ - public static native void gluDisk( - ByteBuffer target, - double innerRadius, - double outerRadius, - int slices, - int loops - ); - - /** - * renders a partial disk on the z=0 plane. A partial disk is - * similar to a full disk, except that only the subset of the disk from - * startAngle through startAngle + sweepAngle is included (where 0 degrees is - * along the +y axis, 90 degrees along the +x axis, 180 along the -y axis, and - * 270 along the -x axis). - * - * The partial disk has a radius of outerRadius, and contains a concentric - * circular hole with a radius of innerRadius. If innerRadius is zero, then - * no hole is generated. The partial disk is subdivided around the z axis - * into slices (like pizza slices), and also about the z axis into rings (as - * specified by slices and loops, respectively). - * - * With respect to orientation, the +z side of the partial disk is considered - * to be outside (see gluQuadricOrientation). This means that if the - * orientation is set to GLU_OUTSIDE, then any normals generated point along - * the +z axis. Otherwise, they point along the -z axis. - * - * If texturing is turned on (with gluQuadricTexture), texture coordinates are - * generated linearly such that where r=outerRadius, the value at (r, 0, 0) is - * (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and at - * (0, -r, 0) it is (0.5, 0). - */ - public static native void gluPartialDisk( - ByteBuffer target, - double innerRadius, - double outerRadius, - int slices, - int loops, - double startAngle, - double sweepAngle - ); - - /** - * specifies the draw style for quadrics rendered with - * qobj. The legal values are as follows: - * - * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons - * are drawn in a counterclockwise fashion with respect to - * their normals (as defined with glu.quadricOrientation). - * - * GLU.LINE: Quadrics are rendered as a set of lines. - * - * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges - * separating coplanar faces will not be drawn. - * - * GLU.POINT: Quadrics are rendered as a set of points. - */ - public static native void gluQuadricDrawStyle( - ByteBuffer target, - int drawStyle - ); - - /** - * specifies what kind of normals are desired for quadrics - * rendered with qobj. The legal values are as follows: - * - * GLU.NONE: No normals are generated. - * - * GLU.FLAT: One normal is generated for every facet of a quadric. - * - * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This - * is the default. - */ - public static native void gluQuadricNormals( - ByteBuffer target, - int normals - ); - - /** - * specifies what kind of orientation is desired for - * quadrics rendered with qobj. The orientation values are as follows: - * - * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. - * - * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. - * - * Note that the interpretation of outward and inward depends on the quadric - * being drawn. - */ - public static native void gluQuadricOrientation( - ByteBuffer target, - int orientation - ); - - /** - * specifies if texture coordinates should be generated for - * quadrics rendered with qobj. If the value of textureCoords is true, - * then texture coordinates are generated, and if textureCoords is false, - * they are not.. The default is false. - * - * The manner in which texture coordinates are generated depends upon the - * specific quadric rendered. - */ - public static native void gluQuadricTexture( - ByteBuffer target, - boolean textureCoords - ); - - /** - * draws a sphere of the given radius centered around the origin. - * The sphere is subdivided around the z axis into slices and along the z axis - * into stacks (similar to lines of longitude and latitude). - * - * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then - * any normals generated point away from the center of the sphere. Otherwise, - * they point toward the center of the sphere. + ) { + return ngluBuild2DMipmaps(target, components, width, height, format, type, data, data.position()); + } - * If texturing is turned on (with glu.quadricTexture), then texture - * coordinates are generated so that t ranges from 0.0 at z=-radius to 1.0 at - * z=radius (t increases linearly along longitudinal lines), and s ranges from - * 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 - * at the -x axis, and back to 1.0 at the +y axis. - */ - public static native void gluSphere( - ByteBuffer target, - double radius, - int slices, - int stacks - ); - -/* public static native void gluQuadricCallback( - ByteBuffer target, - int type, - String method - ); -*/ - public static native void gluQuadricCallback( - ByteBuffer target, - int type, - Object obj, - String method - ); + private static native int ngluBuild2DMipmaps( + int target, + int components, + int width, + int height, + int format, + int type, + ByteBuffer data, + int data_offset + ); } Index: GLUConstants.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLUConstants.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLUConstants.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- GLUConstants.java 25 Jul 2003 13:09:33 -0000 1.10 +++ GLUConstants.java 1 Aug 2003 17:53:44 -0000 1.11 @@ -56,165 +56,4 @@ public static final int GLU_FALSE = CoreGL11Constants.GL_FALSE; - /**** Quadric constants ****/ - - /* QuadricNormal */ - public static final int GLU_SMOOTH = 100000; - public static final int GLU_FLAT = 100001; - public static final int GLU_NONE = 100002; - - /* QuadricDrawStyle */ - public static final int GLU_POINT = 100010; - public static final int GLU_LINE = 100011; - public static final int GLU_FILL = 100012; - public static final int GLU_SILHOUETTE = 100013; - - /* QuadricOrientation */ - public static final int GLU_OUTSIDE = 100020; - public static final int GLU_INSIDE = 100021; - - /* Callback types: */ - /* GLU_ERROR = 100103 */ - - - /**** Tesselation constants ****/ - - public static final double GLU_TESS_MAX_COORD = 1.0e150; - - /* TessProperty */ - public static final int GLU_TESS_WINDING_RULE = 100140; - public static final int GLU_TESS_BOUNDARY_ONLY = 100141; - public static final int GLU_TESS_TOLERANCE = 100142; - - /* TessWinding */ - public static final int GLU_TESS_WINDING_ODD = 100130; - public static final int GLU_TESS_WINDING_NONZERO = 100131; - public static final int GLU_TESS_WINDING_POSITIVE = 100132; - public static final int GLU_TESS_WINDING_NEGATIVE = 100133; - public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; - - /* TessCallback */ - public static final int GLU_TESS_BEGIN = 100100; /* void (CALLBACK*)(GLenum type) */ - public static final int GLU_TESS_VERTEX = 100101; /* void (CALLBACK*)(void *data) */ - public static final int GLU_TESS_END = 100102; /* void (CALLBACK*)(void) */ - public static final int GLU_TESS_ERROR = 100103; /* void (CALLBACK*)(GLenum errno) */ - public static final int GLU_TESS_EDGE_FLAG = 100104; /* void (CALLBACK*)(GLboolean boundaryEdge) */ - public static final int GLU_TESS_COMBINE = 100105; /* void (CALLBACK*)(GLdouble coords[3], - void *data[4], - GLfloat weight[4], - void **dataOut) */ - public static final int GLU_TESS_BEGIN_DATA = 100106; /* void (CALLBACK*)(GLenum type, - void *polygon_data) */ - public static final int GLU_TESS_VERTEX_DATA = 100107; /* void (CALLBACK*)(void *data, - void *polygon_data) */ - public static final int GLU_TESS_END_DATA = 100108; /* void (CALLBACK*)(void *polygon_data) */ - public static final int GLU_TESS_ERROR_DATA = 100109; /* void (CALLBACK*)(GLenum errno, - void *polygon_data) */ - public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; /* void (CALLBACK*)(GLboolean boundaryEdge, - void *polygon_data) */ - public static final int GLU_TESS_COMBINE_DATA = 100111; /* void (CALLBACK*)(GLdouble coords[3], - void *data[4], - GLfloat weight[4], - void **dataOut, - void *polygon_data) */ - - /* TessError */ - public static final int GLU_TESS_ERROR1 = 100151; - public static final int GLU_TESS_ERROR2 = 100152; - public static final int GLU_TESS_ERROR3 = 100153; - public static final int GLU_TESS_ERROR4 = 100154; - public static final int GLU_TESS_ERROR5 = 100155; - public static final int GLU_TESS_ERROR6 = 100156; - public static final int GLU_TESS_ERROR7 = 100157; - public static final int GLU_TESS_ERROR8 = 100158; - - public static final int GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1; - public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2; - public static final int GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3; - public static final int GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4; - public static final int GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5; - public static final int GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6; - - /**** NURBS constants ****/ - - /* NurbsProperty */ - public static final int GLU_AUTO_LOAD_MATRIX = 100200; - public static final int GLU_CULLING = 100201; - public static final int GLU_SAMPLING_TOLERANCE = 100203; - public static final int GLU_DISPLAY_MODE = 100204; - public static final int GLU_PARAMETRIC_TOLERANCE = 100202; - public static final int GLU_SAMPLING_METHOD = 100205; - public static final int GLU_U_STEP = 100206; - public static final int GLU_V_STEP = 100207; - - /* NurbsSampling */ - public static final int GLU_PATH_LENGTH = 100215; - public static final int GLU_PARAMETRIC_ERROR = 100216; - public static final int GLU_DOMAIN_DISTANCE = 100217; - - - /* NurbsTrim */ - public static final int GLU_MAP1_TRIM_2 = 100210; - public static final int GLU_MAP1_TRIM_3 = 100211; - - /* NurbsDisplay */ - /* GLU_FILL = 100012 */ - public static final int GLU_OUTLINE_POLYGON = 100240; - public static final int GLU_OUTLINE_PATCH = 100241; - - /* NurbsCallback */ - /* GLU_ERROR = 100103 */ - - /* NurbsErrors */ - public static final int GLU_NURBS_ERROR1 = 100251; - public static final int GLU_NURBS_ERROR2 = 100252; - public static final int GLU_NURBS_ERROR3 = 100253; - public static final int GLU_NURBS_ERROR4 = 100254; - public static final int GLU_NURBS_ERROR5 = 100255; - public static final int GLU_NURBS_ERROR6 = 100256; - public static final int GLU_NURBS_ERROR7 = 100257; - public static final int GLU_NURBS_ERROR8 = 100258; - public static final int GLU_NURBS_ERROR9 = 100259; - public static final int GLU_NURBS_ERROR10 = 100260; - public static final int GLU_NURBS_ERROR11 = 100261; - public static final int GLU_NURBS_ERROR12 = 100262; - public static final int GLU_NURBS_ERROR13 = 100263; - public static final int GLU_NURBS_ERROR14 = 100264; - public static final int GLU_NURBS_ERROR15 = 100265; - public static final int GLU_NURBS_ERROR16 = 100266; - public static final int GLU_NURBS_ERROR17 = 100267; - public static final int GLU_NURBS_ERROR18 = 100268; - public static final int GLU_NURBS_ERROR19 = 100269; - public static final int GLU_NURBS_ERROR20 = 100270; - public static final int GLU_NURBS_ERROR21 = 100271; - public static final int GLU_NURBS_ERROR22 = 100272; - public static final int GLU_NURBS_ERROR23 = 100273; - public static final int GLU_NURBS_ERROR24 = 100274; - public static final int GLU_NURBS_ERROR25 = 100275; - public static final int GLU_NURBS_ERROR26 = 100276; - public static final int GLU_NURBS_ERROR27 = 100277; - public static final int GLU_NURBS_ERROR28 = 100278; - public static final int GLU_NURBS_ERROR29 = 100279; - public static final int GLU_NURBS_ERROR30 = 100280; - public static final int GLU_NURBS_ERROR31 = 100281; - public static final int GLU_NURBS_ERROR32 = 100282; - public static final int GLU_NURBS_ERROR33 = 100283; - public static final int GLU_NURBS_ERROR34 = 100284; - public static final int GLU_NURBS_ERROR35 = 100285; - public static final int GLU_NURBS_ERROR36 = 100286; - public static final int GLU_NURBS_ERROR37 = 100287; - - /* Contours types -- obsolete! */ - public static final int GLU_CW = 100120; - public static final int GLU_CCW = 100121; - public static final int GLU_INTERIOR = 100122; - public static final int GLU_EXTERIOR = 100123; - public static final int GLU_UNKNOWN = 100124; - - /* Names without "TESS_" prefix */ - public static final int GLU_BEGIN = GLU_TESS_BEGIN; - public static final int GLU_VERTEX = GLU_TESS_VERTEX; - public static final int GLU_END = GLU_TESS_END; - public static final int GLU_ERROR = GLU_TESS_ERROR; - public static final int GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG; } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-08-01 17:35:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv29637/src/java/org/lwjgl/opengl Modified Files: CoreGL14.java Log Message: Major change to use overloaded buffer functions and buffer positions Index: CoreGL14.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL14.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL14.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- CoreGL14.java 26 Jul 2003 02:01:53 -0000 1.7 +++ CoreGL14.java 1 Aug 2003 17:35:47 -0000 1.8 @@ -32,6 +32,7 @@ package org.lwjgl.opengl; +import java.nio.*; import java.nio.IntBuffer; import java.nio.FloatBuffer; import java.nio.Buffer; @@ -46,30 +47,35 @@ */ public class CoreGL14 extends CoreGL13 implements CoreGL14Constants { public static native void glFogCoordf (float coord); - public static native void glFogCoordd (double coord); - public static native void glFogCoordPointer (int type, int stride, Buffer data); - public static native void glMultiDrawArrays(int mode, IntBuffer piFirst, IntBuffer piCount, int primcount); + public static void glFogCoordPointer (int stride, FloatBuffer data) { + nglFogCoordPointer(GL_FLOAT, stride, data, data.position() << 2); + } + private static native void nglFogCoordPointer (int type, int stride, Buffer data, int data_offset); + public static void glMultiDrawArrays(int mode, IntBuffer piFirst, IntBuffer piCount, int primcount) { + nglMultiDrawArrays(mode, piFirst, piFirst.position(), piCount, piCount.position(), primcount); + } + private static native void nglMultiDrawArrays(int mode, IntBuffer piFirst, int piFirst_offset, IntBuffer piCount, int piCount_offset, int primcount); /* public static native void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount);*/ public static native void glPointParameterf (int pname, float param); - public static native void glPointParameterfv (int pname, FloatBuffer params); + public static void glPointParameterfv (int pname, FloatBuffer params) { + nglPointParameter(pname, params, params.position()); + } + private static native void nglPointParameter (int pname, FloatBuffer params, int params_offset); public static native void glSecondaryColor3b (byte red, byte green, byte blue); - public static native void glSecondaryColor3d (double red, double green, double blue); public static native void glSecondaryColor3f (float red, float green, float blue); - public static native void glSecondaryColor3i (int red, int green, int blue); - public static native void glSecondaryColor3s (short red, short green, short blue); public static native void glSecondaryColor3ub (byte red, byte green, byte blue); - public static native void glSecondaryColor3ui (int red, int green, int blue); - public static native void glSecondaryColor3us (short red, short green, short blue); - public static native void glSecondaryColorPointer (int size, int type, int stride, Buffer data); + public static void glSecondaryColorPointer (int size, boolean unsigned, int stride, ByteBuffer data) { + nglSecondaryColorPointer(size, unsigned ? GL_UNSIGNED_BYTE : GL_BYTE, stride, data, data.position()); + } + public static void glSecondaryColorPointer (int size, int stride, FloatBuffer data) { + nglSecondaryColorPointer(size, GL_FLOAT, stride, data, data.position() << 2); + } + private static native void nglSecondaryColorPointer (int size, int type, int stride, Buffer data, int data_offset); public static native void glBlendFuncSeparate (int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha); - public static native void glWindowPos2d (double x, double y); public static native void glWindowPos2f (float x, float y); public static native void glWindowPos2i (int x, int y); - public static native void glWindowPos2s (short x, short y); - public static native void glWindowPos3d (double x, double y, double z); public static native void glWindowPos3f (float x, float y, float z); public static native void glWindowPos3i (int x, int y, int z); - public static native void glWindowPos3s (short x, short y, short z); } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-08-01 17:05:39
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv23290/src/java/org/lwjgl/opengl Modified Files: CoreGL13.java Log Message: Major change to use overloaded buffer functions and buffer positions Index: CoreGL13.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL13.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL13.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CoreGL13.java 26 Jul 2003 02:01:53 -0000 1.4 +++ CoreGL13.java 1 Aug 2003 17:05:36 -0000 1.5 @@ -32,9 +32,7 @@ package org.lwjgl.opengl; -import java.nio.FloatBuffer; -import java.nio.DoubleBuffer; -import java.nio.Buffer; +import java.nio.*; /** * $Id$ @@ -47,33 +45,88 @@ public class CoreGL13 extends CoreGL12 implements CoreGL13Constants { public static native void glActiveTexture(int texture); public static native void glClientActiveTexture(int texture); - public static native void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, Buffer data); - public static native void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data); - public static native void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer data); - public static native void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, Buffer data); - public static native void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data); - public static native void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, Buffer data); - public static native void glGetCompressedTexImage(int target, int lod, Buffer img); - public static native void glMultiTexCoord1d(int target, double s); + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer data) { + nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position()); + } + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer data) { + nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 1); + } + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, FloatBuffer data) { + nglCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data, data.position() << 2); + } + private static native void nglCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, Buffer data, int data_offset); + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ByteBuffer data) { + nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position()); + } + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer data) { + nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 1); + } + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, IntBuffer data) { + nglCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data, data.position() << 2); + } + private static native void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data, int data_offset); + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer data) { + nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position()); + } + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer data) { + nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 1); + } + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, IntBuffer data) { + nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data, data.position() << 2); + } + private static native void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, Buffer data, int data_offset); + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ByteBuffer data) { + nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position()); + } + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer data) { + nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 1); + } + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, IntBuffer data) { + nglCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data, data.position() << 2); + } + private static native void nglCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, Buffer data, int data_offset); + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer data) { + nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position()); + } + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer data) { + nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 1); + } + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, IntBuffer data) { + nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data, data.position() << 2); + } + private static native void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data, int data_offset); + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer data) { + nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position()); + } + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer data) { + nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 1); + } + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, IntBuffer data) { + nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data, data.position() << 2); + } + private static native void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, Buffer data, int data_offset); + public static void glGetCompressedTexImage(int target, int lod, ByteBuffer img) { + nglGetCompressedTexImage(target, lod, img, img.position()); + } + public static void glGetCompressedTexImage(int target, int lod, ShortBuffer img) { + nglGetCompressedTexImage(target, lod, img, img.position() << 1); + } + public static void glGetCompressedTexImage(int target, int lod, IntBuffer img) { + nglGetCompressedTexImage(target, lod, img, img.position() << 2); + } + private static native void nglGetCompressedTexImage(int target, int lod, Buffer img, int img_offset); public static native void glMultiTexCoord1f(int target, float s); - public static native void glMultiTexCoord1i(int target, int s); - public static native void glMultiTexCoord1s(int target, short s); - public static native void glMultiTexCoord2d(int target, double s, double t); public static native void glMultiTexCoord2f(int target, float s, float t); - public static native void glMultiTexCoord2i(int target, int s, int t); - public static native void glMultiTexCoord2s(int target, short s, short t); - public static native void glMultiTexCoord3d(int target, double s, double t, double r); public static native void glMultiTexCoord3f(int target, float s, float t, float r); - public static native void glMultiTexCoord3i(int target, int s, int t, int r); - public static native void glMultiTexCoord3s(int target, short s, short t, short r); - public static native void glMultiTexCoord4d(int target, double s, double t, double r, double q); public static native void glMultiTexCoord4f(int target, float s, float t, float r, float q); - public static native void glMultiTexCoord4i(int target, int s, int t, int r, int q); - public static native void glMultiTexCoord4s(int target, short s, short t, short r, short q); - public static native void glLoadTransposeMatrixd(DoubleBuffer m); - public static native void glLoadTransposeMatrixf(FloatBuffer m); - public static native void glMultTransposeMatrixd(DoubleBuffer m); - public static native void glMultTransposeMatrixf(FloatBuffer m); + public static void glLoadTransposeMatrix(FloatBuffer m) { + nglLoadTransposeMatrixf(m, m.position()); + } + private static native void nglLoadTransposeMatrixf(FloatBuffer m, int m_offset); + public static void glMultTransposeMatrix(FloatBuffer m) { + nglMultTransposeMatrixf(m, m.position()); + } + private static native void nglMultTransposeMatrixf(FloatBuffer m, int m_offset); public static native void glSampleCoverage(float value, boolean invert); } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-08-01 16:53:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv21087/src/java/org/lwjgl/opengl Modified Files: CoreGL12.java Log Message: Major change to use overloaded buffer functions and buffer positions Index: CoreGL12.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL12.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL12.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CoreGL12.java 26 Jul 2003 02:01:53 -0000 1.4 +++ CoreGL12.java 1 Aug 2003 16:53:10 -0000 1.5 @@ -32,6 +32,7 @@ package org.lwjgl.opengl; +import java.nio.*; import java.nio.IntBuffer; import java.nio.FloatBuffer; import java.nio.Buffer; @@ -45,43 +46,197 @@ * @version $Revision$ */ public class CoreGL12 extends CoreGL11 implements CoreGL12Constants { - public static native void glColorTable(int target, int internalFormat, int width, int format, int type, Buffer data); - public static native void glColorSubTable(int target, int start, int count, int format, int type, Buffer data); - public static native void glColorTableParameteriv(int target, int pname, IntBuffer params); - public static native void glColorTableParameterfv(int target, int pname, FloatBuffer params); + + /** + * A helper function which is used to get the byte offset in an arbitrary buffer + * based on its position + * @return the position of the buffer, in BYTES + */ + static int getOffset(Buffer buffer) { + if (buffer instanceof FloatBuffer || buffer instanceof IntBuffer) + return buffer.position() << 2; + else if (buffer instanceof ShortBuffer || buffer instanceof CharBuffer) + return buffer.position() << 1; + else if (buffer instanceof DoubleBuffer || buffer instanceof LongBuffer) + return buffer.position() << 3; + else + return buffer.position(); + } + + + public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { + nglColorTable(target, internalFormat, width, format, type, data, data.position()); + } + public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { + nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2); + } + private static native void nglColorTable(int target, int internalFormat, int width, int format, int type, Buffer data, int data_offset); + public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) { + nglColorSubTable(target, start, count, format, type, data, data.position()); + } + public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) { + nglColorSubTable(target, start, count, format, type, data, data.position() << 2); + } + private static native void nglColorSubTable(int target, int start, int count, int format, int type, Buffer data, int data_offset); + public static void glColorTableParameter(int target, int pname, IntBuffer params) { + nglColorTableParameteriv(target, pname, params, params.position()); + } + private static native void nglColorTableParameteriv(int target, int pname, IntBuffer params, int data_offset); + public static void glColorTableParameter(int target, int pname, FloatBuffer params) { + nglColorTableParameterfv(target, pname, params, params.position()); + } + private static native void nglColorTableParameterfv(int target, int pname, FloatBuffer params, int data_offset); public static native void glCopyColorSubTable(int target, int start, int x, int y, int width); public static native void glCopyColorTable(int target, int internalformat, int x, int y, int width); - public static native void glGetColorTable(int target, int format, int type, Buffer data); - public static native void glGetColorTableParameteriv(int target, int pname, IntBuffer params); - public static native void glGetColorTableParameterfv(int target, int pname, FloatBuffer params); + public static void glGetColorTable(int target, int format, int type, ByteBuffer data) { + nglGetColorTable(target, format, type, data, data.position()); + } + public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { + nglGetColorTable(target, format, type, data, data.position()); + } + private static native void nglGetColorTable(int target, int format, int type, Buffer data, int data_offset); + public static void glGetColorTableParameter(int target, int pname, IntBuffer params) { + nglGetColorTableParameteriv(target, pname, params, params.position()); + } + private static native void nglGetColorTableParameteriv(int target, int pname, IntBuffer params, int params_offset); + public static void glGetColorTableParameter(int target, int pname, FloatBuffer params) { + nglGetColorTableParameterfv(target, pname, params, params.position()); + } + private static native void nglGetColorTableParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static native void glBlendEquation(int mode); public static native void glBlendColor(float red, float green, float blue, float alpha); public static native void glHistogram(int target, int width, int internalformat, boolean sink); public static native void glResetHistogram(int target); - public static native void glGetHistogram(int target, boolean reset, int format, int type, Buffer values); - public static native void glGetHistogramParameterfv(int target, int pname, FloatBuffer params); - public static native void glGetHistogramParameteriv(int target, int pname, IntBuffer params); + public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { + nglGetHistogram(target, reset, format, type, values, values.position()); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { + nglGetHistogram(target, reset, format, type, values, values.position() << 1); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) { + nglGetHistogram(target, reset, format, type, values, values.position() << 2); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) { + nglGetHistogram(target, reset, format, type, values, values.position() << 2); + } + private static native void nglGetHistogram(int target, boolean reset, int format, int type, Buffer values, int values_offset); + public static void glGetHistogramParameter(int target, int pname, FloatBuffer params) { + nglGetHistogramParameterfv(target, pname, params, params.position()); + } + private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_offset); + public static void glGetHistogramParameter(int target, int pname, IntBuffer params) { + nglGetHistogramParameteriv(target, pname, params, params.position()); + } + private static native void nglGetHistogramParameteriv(int target, int pname, IntBuffer params, int params_offset); public static native void glMinmax(int target, int internalformat, boolean sink); public static native void glResetMinmax(int target); - public static native void glGetMinmax(int target, boolean reset, int format, int types, Buffer values); - public static native void glGetMinmaxParameterfv(int target, int pname, FloatBuffer params); - public static native void glGetMinmaxParameteriv(int target, int pname, IntBuffer params); - public static native void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image); - public static native void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image); + public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) { + nglGetMinmax(target, reset, format, types, values, values.position()); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) { + nglGetMinmax(target, reset, format, types, values, values.position() << 1); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) { + nglGetMinmax(target, reset, format, types, values, values.position() << 2); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) { + nglGetMinmax(target, reset, format, types, values, values.position() << 2); + } + private static native void nglGetMinmax(int target, boolean reset, int format, int types, Buffer values, int values_offset); + public static void glGetMinmaxParameter(int target, int pname, FloatBuffer params) { + nglGetMinmaxParameterfv(target, pname, params, params.position()); + } + private static native void nglGetMinmaxParameterfv(int target, int pname, FloatBuffer params, int params_offset); + public static void glGetMinmaxParameter(int target, int pname, IntBuffer params) { + nglGetMinmaxParameteriv(target, pname, params, params.position()); + } + private static native void nglGetMinmaxParameteriv(int target, int pname, IntBuffer params, int params_offset); + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) { + nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) { + nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) { + nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) { + nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); + } + private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_offset); + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image) { + } + private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_offset); public static native void glConvolutionParameterf(int target, int pname, float params); - public static native void glConvolutionParameterfv(int target, int pname, FloatBuffer params); + public static void glConvolutionParameter(int target, int pname, FloatBuffer params) { + } + private static native void nglConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static native void glConvolutionParameteri(int target, int pname, int params); - public static native void glConvolutionParameteriv(int target, int pname, IntBuffer params); + public static void glConvolutionParameteriv(int target, int pname, IntBuffer params) { + nglConvolutionParameteriv(target, pname, params, params.position()); + } + private static native void nglConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset); public static native void glCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width); public static native void glCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height); - public static native void glGetConvolutionFilter(int target, int format, int type, Buffer image); - public static native void glGetConvolutionParameterfv(int target, int pname, FloatBuffer params); - public static native void glGetConvolutionParameteriv(int target, int pname, IntBuffer params); - public static native void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, Buffer column); - public static native void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span); - public static native void glDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices); - public static native void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels); - public static native void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels); + public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) { + nglGetConvolutionFilter(target, format, type, image, image.position()); + } + public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) { + nglGetConvolutionFilter(target, format, type, image, image.position() << 1); + } + public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) { + nglGetConvolutionFilter(target, format, type, image, image.position() << 2); + } + public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) { + nglGetConvolutionFilter(target, format, type, image, image.position() << 2); + } + private static native void nglGetConvolutionFilter(int target, int format, int type, Buffer image, int image_offset); + public static void glGetConvolutionParameter(int target, int pname, FloatBuffer params) { + nglGetConvolutionParameterfv(target, pname, params, params.position()); + } + private static native void nglGetConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_offset); + public static void glGetConvolutionParameter(int target, int pname, IntBuffer params) { + nglGetConvolutionParameteriv(target, pname, params, params.position()); + } + private static native void nglGetConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset); + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, Buffer column) { + nglSeparableFilter2D(target, internalformat, width, height, format, type, row, getOffset(row), column, getOffset(column)); + } + private static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset); + public static void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span) { + nglGetSeparableFilter(target, format, type, row, getOffset(row), column, getOffset(column), span, getOffset(span)); + } + private static native void nglGetSeparableFilter(int target, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset, Buffer span, int span_offset); + public static void glDrawRangeElements(int mode, int start, int end, int count, int type, ByteBuffer indices) { + nglDrawRangeElements(mode, start, end, count, type, indices, indices.position()); + } + public static void glDrawRangeElements(int mode, int start, int end, int count, int type, ShortBuffer indices) { + nglDrawRangeElements(mode, start, end, count, type, indices, indices.position() << 1); + } + public static void glDrawRangeElements(int mode, int start, int end, int count, int type, IntBuffer indices) { + nglDrawRangeElements(mode, start, end, count, type, indices, indices.position() << 2); + } + private static native void nglDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices, int indices_offset); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position()); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 1); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels, int pixels_offset); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position()); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 1); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels, int pixels_offset); public static native void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2003-08-01 15:34:57
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv6789/src/java/org/lwjgl/opengl Modified Files: CoreGL11.java Log Message: Major change to use overloaded buffer functions and buffer positions Index: CoreGL11.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL11.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CoreGL11.java 25 Jul 2003 13:09:33 -0000 1.4 +++ CoreGL11.java 1 Aug 2003 15:34:54 -0000 1.5 @@ -32,8 +32,8 @@ package org.lwjgl.opengl; +import java.nio.*; import java.nio.ByteBuffer; -import java.nio.CharBuffer; import java.nio.IntBuffer; import java.nio.FloatBuffer; import java.nio.DoubleBuffer; @@ -48,20 +48,32 @@ * @version $Revision$ */ public class CoreGL11 implements CoreGL11Constants { + public static native void glAccum(int op, float value); public static native void glAlphaFunc(int func, float ref); public static native void glClearColor(float red, float green, float blue, float alpha); public static native void glClearAccum(float red, float green, float blue, float alpha); public static native void glClear(int mask); - public static native void glCallLists(int n, int type, Buffer lists); + public static void glCallLists(int n, ByteBuffer lists) { + nglCallLists(n, GL_UNSIGNED_BYTE, lists, lists.position()); + } + public static void glCallLists(int n, ShortBuffer lists) { + nglCallLists(n, GL_UNSIGNED_SHORT, lists, lists.position() << 1); + } + public static void glCallLists(int n, IntBuffer lists) { + nglCallLists(n, GL_UNSIGNED_INT, lists, lists.position() << 2); + } + private static native void nglCallLists(int n, int type, Buffer lists, int lists_offset); public static native void glCallList(int list); public static native void glBlendFunc(int sfactor, int dfactor); - public static native void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap); + private static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap) { + nglBitmap(width, height, xorig, yorig, xmove, ymove, bitmap, bitmap.position()); + } + public static native void nglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap, int bitmap_offset); public static native void glBindTexture(int target, int texture); public static native void glBegin(int mode); public static native void glEnd(); public static native void glArrayElement(int i); - public static native boolean glAreTexturesResident(int n, IntBuffer textureNames, ByteBuffer residences); public static native void glClearDepth(double depth); public static native void glDeleteLists(int list, int range); public static native void glDeleteTextures(int n, IntBuffer textures); @@ -71,74 +83,145 @@ public static native void glCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, int border); public static native void glCopyTexImage1D(int target, int level, int internalFormat, int x, int y, int width, int border); public static native void glCopyPixels(int x, int y, int width, int height, int type); - public static native void glColorPointer(int size, int type, int stride, Buffer pointer); + public static void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { + nglColorPointer(size, unsigned ? GL_UNSIGNED_BYTE : GL_BYTE, stride, pointer, pointer.position()); + } + public static void glColorPointer(int size, int stride, FloatBuffer pointer) { + nglColorPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); + } + public static native void nglColorPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static native void glColorMaterial(int face, int mode); public static native void glColorMask(boolean red, boolean green, boolean blue, boolean alpha); public static native void glColor3b(byte red, byte green, byte blue); - public static native void glColor3d(double red, double green, double blue); public static native void glColor3f(float red, float green, float blue); - public static native void glColor3i(int red, int green, int blue); - public static native void glColor3s(short red, short green, short blue); public static native void glColor3ub(byte red, byte green, byte blue); - public static native void glColor3ui(int red, int green, int blue); - public static native void glColor3us(short red, short green, short blue); public static native void glColor4b(byte red, byte green, byte blue, byte alpha); - public static native void glColor4d(double red, double green, double blue, double alpha); public static native void glColor4f(float red, float green, float blue, float alpha); - public static native void glColor4i(int red, int green, int blue, int alpha); - public static native void glColor4s(short red, short green, short blue, short alpha); public static native void glColor4ub(byte red, byte green, byte blue, byte alpha); - public static native void glColor4ui(int red, int green, int blue, int alpha); - public static native void glColor4us(short red, short green, short blue, short alpha); - public static native void glClipPlane(int plane, DoubleBuffer equation); + public static void glClipPlane(int plane, DoubleBuffer equation) { + nglClipPlane(plane, equation, equation.position() << 3); + } + private static native void nglClipPlane(int plane, DoubleBuffer equation, int equation_offset); public static native void glClearStencil(int s); public static native void glClearIndex(float c); public static native void glEvalPoint1(int i); public static native void glEvalPoint2(int i, int j); public static native void glEvalMesh1(int mode, int i1, int i2); public static native void glEvalMesh2(int mode, int i1, int i2, int j1, int j2); - public static native void glEvalCoord1d(double u); public static native void glEvalCoord1f(float u); - public static native void glEvalCoord2d(double u, double v); public static native void glEvalCoord2f(float u, float v); public static native void glEnableClientState(int cap); public static native void glDisableClientState(int cap); public static native void glEnable(int cap); public static native void glDisable(int cap); - public static native void glEdgeFlagPointer(int stride, Buffer pointer); + public static void glEdgeFlagPointer(int stride, ByteBuffer pointer) { + nglEdgeFlagPointer(stride, pointer, pointer.position()); + } + private static native void nglEdgeFlagPointer(int stride, Buffer pointer, int pointer_offset); public static native void glEdgeFlag(boolean flag); - public static native void glDrawPixels(int width, int height, int format, int type, Buffer pixels); - public static native void glDrawElements(int mode, int count, int type, Buffer indices); + public static void glDrawPixels(int width, int height, int format, int type, ByteBuffer pixels) { + nglDrawPixels(width, height, format, type, pixels, pixels.position()); + } + public static void glDrawPixels(int width, int height, int format, int type, ShortBuffer pixels) { + nglDrawPixels(width, height, format, type, pixels, pixels.position() << 1); + } + public static void glDrawPixels(int width, int height, int format, int type, IntBuffer pixels) { + nglDrawPixels(width, height, format, type, pixels, pixels.position() << 2); + } + private static native void nglDrawPixels(int width, int height, int format, int type, Buffer pixels, int pixels_offset); + public static void glDrawElements(int mode, int count, ByteBuffer indices) { + nglDrawElements(mode, count, GL_UNSIGNED_BYTE, indices, indices.position()); + } + public static void glDrawElements(int mode, int count, ShortBuffer indices) { + nglDrawElements(mode, count, GL_UNSIGNED_SHORT, indices, indices.position() << 1); + } + public static void glDrawElements(int mode, int count, IntBuffer indices) { + nglDrawElements(mode, count, GL_UNSIGNED_INT, indices, indices.position() << 2); + } + private static native void nglDrawElements(int mode, int count, int type, Buffer indices, int indices_offset); public static native void glDrawBuffer(int mode); public static native void glDrawArrays(int mode, int first, int count); public static native void glDepthRange(double zNear, double zFar); public static native void glDepthMask(boolean flag); public static native void glDepthFunc(int func); - public static native void glFeedbackBuffer(int size, int type, FloatBuffer buffer); - public static native void glGetPixelMapfv(int map, FloatBuffer values); - public static native void glGetPixelMapuiv(int map, IntBuffer values); - public static native void glGetPixelMapusv(int map, CharBuffer values); - public static native void glGetMaterialfv(int face, int pname, FloatBuffer params); - public static native void glGetMaterialiv(int face, int pname, IntBuffer params); - public static native void glGetMapdv(int target, int query, DoubleBuffer v); - public static native void glGetMapfv(int target, int query, FloatBuffer v); - public static native void glGetMapiv(int target, int query, IntBuffer v); - public static native void glGetLightfv(int light, int pname, FloatBuffer params); - public static native void glGetLightiv(int light, int pname, IntBuffer params); + public static void glFeedbackBuffer(int size, int type, FloatBuffer buffer) { + nglFeedbackBuffer(size, type, buffer, buffer.position()); + } + private static native void nglFeedbackBuffer(int size, int type, FloatBuffer buffer, int buffer_offset); + public static void glGetPixelMap(int map, FloatBuffer values) { + nglGetPixelMapfv(map, values, values.position()); + } + private static native void nglGetPixelMapfv(int map, FloatBuffer values, int values_offset); + public static void glGetPixelMap(int map, IntBuffer values) { + nglGetPixelMapuiv(map, values, values.position()); + } + private static native void nglGetPixelMapuiv(int map, IntBuffer values, int values_offset); + public static void glGetPixelMap(int map, ShortBuffer values) { + nglGetPixelMapusv(map, values, values.position()); + } + private static native void nglGetPixelMapusv(int map, ShortBuffer values, int values_offset); + public static void glGetMaterial(int face, int pname, FloatBuffer params) { + nglGetMaterialfv(face, pname, params, params.position()); + } + private static native void nglGetMaterialfv(int face, int pname, FloatBuffer params, int params_offset); + public static void glGetMaterial(int face, int pname, IntBuffer params) { + nglGetMaterialiv(face, pname, params, params.position()); + } + private static native void nglGetMaterialiv(int face, int pname, IntBuffer params, int params_offset); + public static void glGetMap(int target, int query, FloatBuffer v) { + nglGetMapfv(target, query, v, v.position()); + } + public static void glGetMap(int target, int query, IntBuffer v) { + nglGetMapiv(target, query, v, v.position()); + } + private static native void nglGetMapfv(int target, int query, FloatBuffer v, int v_offset); + private static native void nglGetMapiv(int target, int query, IntBuffer v, int v_offset); + public static void glGetLight(int light, int pname, FloatBuffer params) { + nglGetLightfv(light, pname, params, params.position()); + } + private static native void nglGetLightfv(int light, int pname, FloatBuffer params, int params_offset); + public static void glGetLight(int light, int pname, IntBuffer params) { + nglGetLightiv(light, pname, params, params.position()); + } + private static native void nglGetLightiv(int light, int pname, IntBuffer params, int params_offset); public static native int glGetError(); - public static native void glGetClipPlane(int plane, DoubleBuffer equation); - public static native void glGetBooleanv(int pname, ByteBuffer params); - public static native void glGetDoublev(int pname, DoubleBuffer params); - public static native void glGetFloatv(int pname, FloatBuffer params); - public static native void glGetIntegerv(int pname, IntBuffer params); - public static native void glGenTextures(int n, IntBuffer textures); + public static void glGetClipPlane(int plane, DoubleBuffer equation) { + nglGetClipPlane(plane, equation, equation.position()); + } + private static native void nglGetClipPlane(int plane, DoubleBuffer equation, int equation_offset); + public static void glGetBoolean(int pname, ByteBuffer params) { + nglGetBooleanv(pname, params, params.position()); + } + private static native void nglGetBooleanv(int pname, ByteBuffer params, int params_offset); + public static void glGetDouble(int pname, DoubleBuffer params) { + nglGetDoublev(pname, params, params.position()); + } + private static native void nglGetDoublev(int pname, DoubleBuffer params, int params_offset); + public static void glGetFloat(int pname, FloatBuffer params) { + nglGetFloatv(pname, params, params.position()); + } + private static native void nglGetFloatv(int pname, FloatBuffer params, int params_offset); + public static void glGetInteger(int pname, IntBuffer params) { + nglGetIntegerv(pname, params, params.position()); + } + private static native void nglGetIntegerv(int pname, IntBuffer params, int params_offset); + public static void glGenTextures(int n, IntBuffer textures) { + nglGenTextures(n, textures, textures.position()); + } + private static native void nglGenTextures(int n, IntBuffer textures, int textures_offset); public static native int glGenLists(int range); public static native void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar); public static native void glFrontFace(int mode); public static native void glFogf(int pname, float param); public static native void glFogi(int pname, int param); - public static native void glFogfv(int pname, FloatBuffer params); - public static native void glFogiv(int pname, IntBuffer params); + public static void glFog(int pname, FloatBuffer params) { + nglFogfv(pname, params, params.position()); + } + private static native void nglFogfv(int pname, FloatBuffer params, int params_offset); + public static void glFog(int pname, IntBuffer params) { + nglFogiv(pname, params, params.position()); + } + private static native void nglFogiv(int pname, IntBuffer params, int params_offset); public static native void glFlush(); public static native void glFinish(); /** @@ -150,60 +233,115 @@ */ public static native ByteBuffer glGetPointerv(int pname, int size); public static native boolean glIsEnabled(int cap); - public static native void glInterleavedArrays(int format, int stride, Buffer pointer); + public static void glInterleavedArrays(int format, int stride, ByteBuffer pointer) { + nglInterleavedArrays(format, stride, pointer, pointer.position()); + } + private static native void nglInterleavedArrays(int format, int stride, Buffer pointer, int pointer_offset); public static native void glInitNames(); - public static native void glIndexPointer(int type, int stride, Buffer pointer); - public static native void glIndexMask(int mask); - public static native void glIndexd(double c); - public static native void glIndexf(float c); - public static native void glIndexi(int c); - public static native void glIndexs(short c); - public static native void glIndexub(byte c); public static native void glHint(int target, int mode); - public static native void glGetTexParameterfv(int target, int pname, FloatBuffer params); - public static native void glGetTexParameteriv(int target, int pname, IntBuffer params); - public static native void glGetTexLevelParameterfv(int target, int level, int pname, FloatBuffer params); - public static native void glGetTexLevelParameteriv(int target, int level, int pname, IntBuffer params); - public static native void glGetTexImage(int target, int level, int format, int type, Buffer pixels); - public static native void glGetTexGendv(int coord, int pname, DoubleBuffer params); - public static native void glGetTexGenfv(int coord, int pname, FloatBuffer params); - public static native void glGetTexGeniv(int coord, int pname, IntBuffer params); - public static native void glGetTexEnvfv(int target, int pname, FloatBuffer params); - public static native void glGetTexEnviv(int target, int pname, IntBuffer params); + public static void glGetTexParameter(int target, int pname, FloatBuffer params) { + nglGetTexParameterfv(target, pname, params, params.position()); + } + private static native void nglGetTexParameterfv(int target, int pname, FloatBuffer params, int params_offset); + public static void glGetTexParameter(int target, int pname, IntBuffer params) { + nglGetTexParameteriv(target, pname, params, params.position()); + } + private static native void nglGetTexParameteriv(int target, int pname, IntBuffer params, int params_offset); + public static void glGetTexLevelParameter(int target, int level, int pname, FloatBuffer params) { + nglGetTexLevelParameterfv(target, level, pname, params, params.position()); + } + private static native void nglGetTexLevelParameterfv(int target, int level, int pname, FloatBuffer params, int params_offset); + public static void glGetTexLevelParameter(int target, int level, int pname, IntBuffer params) { + nglGetTexLevelParameteriv(target, level, pname, params, params.position()); + } + private static native void nglGetTexLevelParameteriv(int target, int level, int pname, IntBuffer params, int params_offset); + public static void glGetTexImage(int target, int level, int format, int type, ByteBuffer pixels) { + nglGetTexImage(target, level, format, type, pixels, pixels.position()); + } + public static void glGetTexImage(int target, int level, int format, int type, ShortBuffer pixels) { + nglGetTexImage(target, level, format, type, pixels, pixels.position() << 1); + } + public static void glGetTexImage(int target, int level, int format, int type, IntBuffer pixels) { + nglGetTexImage(target, level, format, type, pixels, pixels.position() << 2); + } + private static native void nglGetTexImage(int target, int level, int format, int type, Buffer pixels, int pixels_offset); + + public static void glGetTexGen(int coord, int pname, FloatBuffer params) { + nglGetTexGenfv(coord, pname, params, params.position()); + } + private static native void nglGetTexGenfv(int coord, int pname, FloatBuffer params, int params_offset); + + public static void glGetTexEnv(int coord, int pname, IntBuffer params) { + nglGetTexEnviv(coord, pname, params, params.position()); + } + private static native void nglGetTexEnviv(int coord, int pname, IntBuffer params, int params_offset); + public static void glGetTexEnv(int coord, int pname, FloatBuffer params) { + nglGetTexEnvfv(coord, pname, params, params.position()); + } + private static native void nglGetTexEnvfv(int coord, int pname, FloatBuffer params, int params_offset); + public static native String glGetString(int name); - public static native void glGetPolygonStipple(ByteBuffer mask); + public static void glGetPolygonStipple(ByteBuffer mask) { + nglGetPolygonStipple(mask, mask.position()); + } + private static native void nglGetPolygonStipple(ByteBuffer mask, int mask_offset); public static native boolean glIsList(int list); public static native void glMaterialf(int face, int pname, float param); public static native void glMateriali(int face, int pname, int param); - public static native void glMaterialfv(int face, int pname, FloatBuffer params); - public static native void glMaterialiv(int face, int pname, IntBuffer params); - public static native void glMapGrid1d(int un, double u1, double u2); + public static void glMaterial(int face, int pname, FloatBuffer params) { + nglMaterialfv(face, pname, params, params.position()); + } + private static native void nglMaterialfv(int face, int pname, FloatBuffer params, int params_offset); + public static void glMaterial(int face, int pname, IntBuffer params) { + nglMaterialiv(face, pname, params, params.position()); + } + private static native void nglMaterialiv(int face, int pname, IntBuffer params, int params_offset); public static native void glMapGrid1f(int un, float u1, float u2); - public static native void glMapGrid2d(int un, double u1, double u2, int vn, double v1, double v2); public static native void glMapGrid2f(int un, float u1, float u2, int vn, float v1, float v2); - public static native void glMap2d(int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, DoubleBuffer points); - public static native void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points); - public static native void glMap1d(int target, double u1, double u2, int stride, int order, DoubleBuffer points); - public static native void glMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points); + public static void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) { + nglMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points, points.position()); + } + private static native void nglMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points, int points_offset); + public static void glMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points) { + nglMap1f(target, u1, u2, stride, order, points, points.position()); + } + private static native void nglMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points, int points_offset); public static native void glLogicOp(int opcode); public static native void glLoadName(int name); - public static native void glLoadMatrixd(DoubleBuffer m); - public static native void glLoadMatrixf(FloatBuffer m); + public static void glLoadMatrixf(FloatBuffer m) { + nglLoadMatrixf(m, m.position()); + } + private static native void nglLoadMatrixf(FloatBuffer m, int m_offset); public static native void glLoadIdentity(); public static native void glListBase(int base); public static native void glLineWidth(float width); public static native void glLineStipple(int factor, short pattern); public static native void glLightModelf(int pname, float param); public static native void glLightModeli(int pname, int param); - public static native void glLightModelfv(int pname, FloatBuffer params); - public static native void glLightModeliv(int pname, IntBuffer params); + public static void glLightModel(int pname, FloatBuffer params) { + nglLightModelfv( pname, params, params.position()); + } + private static native void nglLightModelfv(int pname, FloatBuffer params, int params_offset); + public static void glLightModel(int pname, IntBuffer params) { + nglLightModeliv(pname, params, params.position()); + } + private static native void nglLightModeliv(int pname, IntBuffer params, int params_offset); public static native void glLightf(int light, int pname, float param); public static native void glLighti(int light, int pname, int param); - public static native void glLightfv(int light, int pname, FloatBuffer params); - public static native void glLightiv(int light, int pname, IntBuffer params); + public static void glLightfv(int light, int pname, FloatBuffer params) { + nglLightfv(light, pname, params, params.position()); + } + private static native void nglLightfv(int light, int pname, FloatBuffer params, int params_offset); + public static void glLightiv(int light, int pname, IntBuffer params) { + nglLightiv(light, pname, params, params.position()); + } + private static native void nglLightiv(int light, int pname, IntBuffer params, int params_offset); public static native boolean glIsTexture(int texture); public static native void glMatrixMode(int mode); - public static native void glPolygonStipple(ByteBuffer mask); + public static void glPolygonStipple(ByteBuffer mask) { + nglPolygonStipple(mask, mask.position()); + } + private static native void nglPolygonStipple(ByteBuffer mask, int mask_offset); public static native void glPolygonOffset(float factor, float units); public static native void glPolygonMode(int face, int mode); public static native void glPointSize(float size); @@ -212,48 +350,71 @@ public static native void glPixelTransferi(int pname, int param); public static native void glPixelStoref(int pname, float param); public static native void glPixelStorei(int pname, int param); - public static native void glPixelMapfv(int map, int mapsize, FloatBuffer values); - public static native void glPixelMapuiv(int map, int mapsize, IntBuffer values); - public static native void glPixelMapusv(int map, int mapsize, CharBuffer values); + public static void glPixelMap(int map, int mapsize, FloatBuffer values) { + nglPixelMapfv(map, mapsize, values, values.position()); + } + private static native void nglPixelMapfv(int map, int mapsize, FloatBuffer values, int values_offset); + public static void glPixelMap(int map, int mapsize, IntBuffer values) { + nglPixelMapuiv(map, mapsize, values, values.position()); + } + private static native void nglPixelMapuiv(int map, int mapsize, IntBuffer values, int values_offset); + public static void glPixelMap(int map, int mapsize, ShortBuffer values) { + nglPixelMapusv(map, mapsize, values, values.position()); + } + private static native void nglPixelMapusv(int map, int mapsize, ShortBuffer values, int values_offset); public static native void glPassThrough(float token); public static native void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar); - public static native void glNormalPointer(int type, int stride, Buffer pointer); + public static void glNormalPointer(int stride, ByteBuffer pointer) { + nglNormalPointer(GL_BYTE, stride, pointer, pointer.position()); + } + public static void glNormalPointer(int stride, ShortBuffer pointer) { + nglNormalPointer(GL_SHORT, stride, pointer, pointer.position() << 1); + } + public static void glNormalPointer(int stride, IntBuffer pointer) { + nglNormalPointer(GL_INT, stride, pointer, pointer.position() << 2); + } + public static void glNormalPointer(int stride, FloatBuffer pointer) { + nglNormalPointer(GL_FLOAT, stride, pointer, pointer.position() << 2); + } + private static native void nglNormalPointer(int type, int stride, Buffer pointer, int pointer_offset); public static native void glNormal3b(byte nx, byte ny, byte nz); - public static native void glNormal3d(double nx, double ny, double nz); public static native void glNormal3f(float nx, float ny, float nz); public static native void glNormal3i(int nx, int ny, int nz); public static native void glNormal3s(short nx, short ny, short nz); public static native void glNewList(int list, int mode); public static native void glEndList(); - public static native void glMultMatrixd(DoubleBuffer m); - public static native void glMultMatrixf(FloatBuffer m); - public static native void glPrioritizeTextures(int n, IntBuffer textureNames, FloatBuffer priorities); + public static void glMultMatrixf(FloatBuffer m) { + nglMultMatrixf(m, m.position()); + } + private static native void nglMultMatrixf(FloatBuffer m, int m_offset); public static native void glShadeModel(int mode); - public static native void glSelectBuffer(int size, IntBuffer buffer); + public static void glSelectBuffer(int size, IntBuffer buffer) { + nglSelectBuffer(size, buffer, buffer.position()); + } + private static native void nglSelectBuffer(int size, IntBuffer buffer, int buffer_offset); public static native void glScissor(int x, int y, int width, int height); - public static native void glScaled(double x, double y, double z); public static native void glScalef(float x, float y, float z); - public static native void glRotated(double angle, double x, double y, double z); public static native void glRotatef(float angle, float x, float y, float z); public static native int glRenderMode(int mode); - public static native void glRectd(double x1, double y1, double x2, double y2); public static native void glRectf(float x1, float y1, float x2, float y2); public static native void glRecti(int x1, int y1, int x2, int y2); - public static native void glRects(short x1, short y1, short x2, short y2); - public static native void glReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels); + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { + nglReadPixels(x, y, width, height, format, type, pixels, pixels.position()); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) { + nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 1); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) { + nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 2); + } + private static native void nglReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels, int pixels_offset); public static native void glReadBuffer(int mode); - public static native void glRasterPos2d(double x, double y); public static native void glRasterPos2f(float x, float y); public static native void glRasterPos2i(int x, int y); - public static native void glRasterPos2s(short x, short y); - public static native void glRasterPos3d(double x, double y, double z); public static native void glRasterPos3f(float x, float y, float z); public static native void glRasterPos3i(int x, int y, int z); - public static native void glRasterPos3s(short x, short y, short z); - public static native void glRasterPos4d(double x, double y, double z, double w); public static native void glRasterPos4f(float x, float y, float z, float w); public static native void glRasterPos4i(int x, int y, int z, int w); - public static native void glRasterPos4s(short x, short y, short z, short w); public static native void glPushName(int name); public static native void glPopName(); public static native void glPushMatrix(); @@ -263,54 +424,85 @@ public static native void glPushAttrib(int mask); public static native void glPopAttrib(); public static native void glStencilFunc(int func, int ref, int mask); - public static native void glVertexPointer(int size, int type, int stride, Buffer pointer); - public static native void glVertex2d(double x, double y); + public static void glVertexPointer(int size, int stride, FloatBuffer pointer) { + nglVertexPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); + } + public static void glVertexPointer(int size, int stride, IntBuffer pointer) { + nglVertexPointer(size, GL_INT, stride, pointer, pointer.position() << 2); + } + private static native void nglVertexPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static native void glVertex2f(float x, float y); public static native void glVertex2i(int x, int y); - public static native void glVertex2s(short x, short y); - public static native void glVertex3d(double x, double y, double z); public static native void glVertex3f(float x, float y, float z); public static native void glVertex3i(int x, int y, int z); - public static native void glVertex3s(short x, short y, short z); - public static native void glVertex4d(double x, double y, double z, double w); public static native void glVertex4f(float x, float y, float z, float w); public static native void glVertex4i(int x, int y, int z, int w); - public static native void glVertex4s(short x, short y, short z, short w); - public static native void glTranslated(double x, double y, double z); public static native void glTranslatef(float x, float y, float z); - public static native void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels); - public static native void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels); + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position()); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 1); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels, int pixels_offset); + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { + nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position()); + } + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { + nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 1); + } + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { + nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels, int pixels_offset); public static native void glTexParameterf(int target, int pname, float param); public static native void glTexParameteri(int target, int pname, int param); - public static native void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels); - public static native void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels); - public static native void glTexGend(int coord, int pname, double param); + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position()); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 1); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels, int pixels_offset); + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position()); + } + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 1); + } + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels, int pixels_offset); public static native void glTexGenf(int coord, int pname, float param); - public static native void glTexGeni(int coord, int pname, int param); - public static native void glTexGendv(int coord, int pname, DoubleBuffer params); - public static native void glTexGenfv(int coord, int pname, FloatBuffer params); - public static native void glTexGeniv(int coord, int pname, IntBuffer params); + public static void glTexGen(int coord, int pname, FloatBuffer params) { + nglTexGenfv(coord, pname, params, params.position()); + } + private static native void nglTexGenfv(int coord, int pname, FloatBuffer params, int params_offset); public static native void glTexEnvf(int target, int pname, float param); public static native void glTexEnvi(int target, int pname, int param); - public static native void glTexEnvfv(int target, int pname, FloatBuffer params); - public static native void glTexEnviv(int target, int pname, IntBuffer params); - public static native void glTexCoordPointer(int size, int type, int stride, Buffer pointer); - public static native void glTexCoord1d(double s); + public static void glTexEnv(int target, int pname, FloatBuffer params) { + nglTexEnvfv(target, pname, params, params.position()); + } + private static native void nglTexEnvfv(int target, int pname, FloatBuffer params, int params_offset); + public static void glTexEnv(int target, int pname, IntBuffer params) { + nglTexEnviv(target, pname, params, params.position()); + } + private static native void nglTexEnviv(int target, int pname, IntBuffer params, int params_offset); + public static void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { + nglTexCoordPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); + } + private static native void nglTexCoordPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static native void glTexCoord1f(float s); - public static native void glTexCoord1i(int s); - public static native void glTexCoord1s(short s); - public static native void glTexCoord2d(double s, double t); public static native void glTexCoord2f(float s, float t); - public static native void glTexCoord2i(int s, int t); - public static native void glTexCoord2s(short s, short t); - public static native void glTexCoord3d(double s, double t, double r); public static native void glTexCoord3f(float s, float t, float r); - public static native void glTexCoord3i(int s, int t, int r); - public static native void glTexCoord3s(short s, short t, short r); - public static native void glTexCoord4d(double s, double t, double r, double q); public static native void glTexCoord4f(float s, float t, float r, float q); - public static native void glTexCoord4i(int s, int t, int r, int q); - public static native void glTexCoord4s(short s, short t, short r, short q); public static native void glStencilOp(int fail, int zfail, int zpass); public static native void glStencilMask(int mask); public static native void glViewport(int x, int y, int width, int height); |