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
|
2
|
3
|
4
(21) |
5
(8) |
6
|
7
(1) |
|
8
(24) |
9
|
10
(2) |
11
(1) |
12
(2) |
13
|
14
|
|
15
(25) |
16
(1) |
17
(8) |
18
(7) |
19
(2) |
20
|
21
|
|
22
|
23
(7) |
24
(6) |
25
(3) |
26
(8) |
27
(2) |
28
(1) |
|
29
(3) |
|
|
|
|
|
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26712/src/java/org/lwjgl/opengl Modified Files: BufferChecks.java ARBTransposeMatrix.java ARBImaging.java GL15.java NVEvaluators.java GL13.java GL11.java Log Message: Buffer checking code Index: BufferChecks.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BufferChecks.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- BufferChecks.java 16 Feb 2004 03:35:45 -0000 1.6 +++ BufferChecks.java 18 Feb 2004 22:31:00 -0000 1.7 @@ -48,45 +48,41 @@ /** Static methods only! */ private BufferChecks() { } - /** The minimum size we'll allow for glGet* operations */ - private static final int MIN_BUFFER_SIZE = 16; + /** - * The minimum size we'll allow for "large" glGet* operations that can - * return lots of data, eg. glGetPixelMap + * Default buffer size for most buffer checks. */ - private static final int MIN_LARGE_BUFFER_SIZE = 256; + private static final int DEFAULT_BUFFER_SIZE = 4; + /** * Helper method to ensure a buffer is big enough to receive data from a - * glGet* operation. To avoid unnecessarily complex buffer size checking - * we've just set the bar artificially high and insist that any receiving - * buffer has at least 16 remaining(). + * glGet* operation. * * @param buf * The buffer to check + * @param size + * The minimum buffer size * @throws BufferOverflowException */ - static void checkBuffer(Buffer buf) { - if (buf.remaining() < MIN_BUFFER_SIZE) { - // TODO: I don't think the default MIN_BUFFER_SIZE should be used for other than glGet* - // Others, like glTexEnvf, should use their individual buffer max size (like 4) -// throw new BufferOverflowException(); + static void checkBuffer(Buffer buf, int size) { + if (buf.remaining() < size) { + throw new BufferOverflowException(); } } /** * Helper method to ensure a buffer is big enough to receive data from a - * "large" glGet* operation. To avoid unnecessarily complex buffer size - * checking we've just set the bar artificially high and insist that any - * receiving buffer has at least 256 remaining(). + * glGet* operation. To avoid unnecessarily complex buffer size checking + * we've just set the bar artificially high and insist that any receiving + * buffer has at least 4 remaining(). * * @param buf * The buffer to check * @throws BufferOverflowException */ - static void checkLargeBuffer(Buffer buf) { - if (buf.remaining() < MIN_LARGE_BUFFER_SIZE) { - throw new BufferOverflowException(); - } + static void checkBuffer(Buffer buf) { + checkBuffer(buf, DEFAULT_BUFFER_SIZE); } + /** * Helper method to ensure that vertex buffer objects are disabled. If they * are enabled, we'll throw an OpenGLException Index: ARBTransposeMatrix.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ARBTransposeMatrix.java 15 Feb 2004 19:41:07 -0000 1.3 +++ ARBTransposeMatrix.java 18 Feb 2004 22:31:00 -0000 1.4 @@ -48,13 +48,13 @@ public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6; public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) { - BufferChecks.checkBuffer(pfMtx); + BufferChecks.checkBuffer(pfMtx, 16); nglLoadTransposeMatrixfARB(pfMtx, pfMtx.position()); } private static native void nglLoadTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset); public static void glMultTransposeMatrixfARB(FloatBuffer pfMtx) { - BufferChecks.checkBuffer(pfMtx); + BufferChecks.checkBuffer(pfMtx, 16); nglMultTransposeMatrixfARB(pfMtx, pfMtx.position()); } private static native void nglMultTransposeMatrixfARB(FloatBuffer pfMtx, int pfMtx_offset); Index: ARBImaging.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBImaging.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ARBImaging.java 17 Feb 2004 21:59:07 -0000 1.1 +++ ARBImaging.java 18 Feb 2004 22:31:00 -0000 1.2 @@ -126,51 +126,51 @@ public static final int GL_MINMAX_SINK = 0x8030; public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(data, 256); 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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(data, 256); 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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(data, 256); 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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(data, 256); 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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(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 void glGetColorTable(int target, int format, int type, ByteBuffer data) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position()); } public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(data, 256); 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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(params); nglGetColorTableParameterfv(target, pname, params, params.position()); } private static native void nglGetColorTableParameterfv(int target, int pname, FloatBuffer params, int params_offset); @@ -179,24 +179,24 @@ public static native void glHistogram(int target, int width, int internalformat, boolean sink); public static native void glResetHistogram(int target); public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position()); } public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 1); } public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2); } public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(values, 256); 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) { - BufferChecks.checkBuffer(params); + BufferChecks.checkBuffer(params, 256); nglGetHistogramParameterfv(target, pname, params, params.position()); } private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_offset); @@ -235,23 +235,47 @@ } 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) { - // TODO: check buffer size valid + if (image.remaining() < BufferChecks.calculateImageStorage(format, type, width, 1, 1)) { + throw new BufferUnderflowException(); + } 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) { - // TODO: check buffer size valid + if (image.remaining() * 2 < BufferChecks.calculateImageStorage(format, type, width, 1, 1)) { + throw new BufferUnderflowException(); + } 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) { - // TODO: check buffer size valid + if (image.remaining() * 4 < BufferChecks.calculateImageStorage(format, type, width, 1, 1)) { + throw new BufferUnderflowException(); + } 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) { - // TODO: check buffer size valid + if (image.remaining() * 4 < BufferChecks.calculateImageStorage(format, type, width, 1, 1)) { + throw new BufferUnderflowException(); + } 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) { + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) { + if (image.remaining() < BufferChecks.calculateImageStorage(format, type, width, height, 1)) { + throw new BufferUnderflowException(); + } + nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position()); + } + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) { + if (image.remaining() * 2 < BufferChecks.calculateImageStorage(format, type, width, height, 1)) { + throw new BufferUnderflowException(); + } + nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() <<1); + } + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) { + if (image.remaining() * 4 < BufferChecks.calculateImageStorage(format, type, width, height, 1)) { + throw new BufferUnderflowException(); + } + nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2); } 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); @@ -286,12 +310,12 @@ } 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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(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) { - // TODO: check buffer size valid + BufferChecks.checkBuffer(params); nglGetConvolutionParameteriv(target, pname, params, params.position()); } private static native void nglGetConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset); Index: GL15.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL15.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GL15.java 15 Feb 2004 15:16:57 -0000 1.1 +++ GL15.java 18 Feb 2004 22:31:00 -0000 1.2 @@ -40,7 +40,7 @@ import java.nio.*; -public class GL15 extends GL14 { +public abstract class GL15 extends GL14 { // ---------------------------------------------------------------------- // ---------------------- ARB_vertex_buffer_object ---------------------- @@ -205,7 +205,7 @@ public static native boolean glUnmapBuffer(int target); public static void glGetBufferParameter(int target, int pname, IntBuffer params) { - // TODO:check buffer size + BufferChecks.checkBuffer(params); nglGetBufferParameteriv(target, pname, params, params.position()); } @@ -274,7 +274,7 @@ // --------------------------- public static void glGetQueryObjecti(int id, int pname, IntBuffer params) { - // TODO: check buffer size + BufferChecks.checkBuffer(params); nglGetQueryObjectiv(id, pname, params, params.position()); } @@ -286,7 +286,7 @@ // --------------------------- public static void glGetQueryObjectui(int id, int pname, IntBuffer params) { - // TODO: check buffer size + BufferChecks.checkBuffer(params); nglGetQueryObjectuiv(id, pname, params, params.position()); } Index: NVEvaluators.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVEvaluators.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NVEvaluators.java 15 Feb 2004 19:41:08 -0000 1.2 +++ NVEvaluators.java 18 Feb 2004 22:31:00 -0000 1.3 @@ -70,12 +70,12 @@ public static final int GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7; public static void glGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, FloatBuffer pPoints) { - BufferChecks.checkLargeBuffer(pPoints); + // TODO:Check buffer size nglGetMapControlPointsNV(target, index, type, ustride, vstride, packed, pPoints, pPoints.position()<<2); } private static native void nglGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, Buffer pPoints, int pPoints_offset); public static void glMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, FloatBuffer pPoints) { - BufferChecks.checkLargeBuffer(pPoints); + // TODO:Check buffer size nglMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, pPoints, pPoints.position()<<2); } private static native void nglMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, Buffer pPoints, int pPoints_offset); Index: GL13.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL13.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GL13.java 15 Feb 2004 19:41:08 -0000 1.4 +++ GL13.java 18 Feb 2004 22:31:00 -0000 1.5 @@ -247,12 +247,12 @@ public static native void glMultiTexCoord3f(int target, float s, float t, float r); public static native void glMultiTexCoord4f(int target, float s, float t, float r, float q); public static void glLoadTransposeMatrix(FloatBuffer m) { - BufferChecks.checkBuffer(m); + BufferChecks.checkBuffer(m, 16); nglLoadTransposeMatrixf(m, m.position()); } private static native void nglLoadTransposeMatrixf(FloatBuffer m, int m_offset); public static void glMultTransposeMatrix(FloatBuffer m) { - BufferChecks.checkBuffer(m); + BufferChecks.checkBuffer(m, 16); nglMultTransposeMatrixf(m, m.position()); } private static native void nglMultTransposeMatrixf(FloatBuffer m, int m_offset); Index: GL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL11.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- GL11.java 16 Feb 2004 03:35:45 -0000 1.8 +++ GL11.java 18 Feb 2004 22:31:00 -0000 1.9 @@ -862,17 +862,17 @@ private static native void nglFeedbackBuffer(int size, int type, FloatBuffer buffer, int buffer_offset); public static void glGetPixelMap(int map, FloatBuffer values) { - BufferChecks.checkLargeBuffer(values); + BufferChecks.checkBuffer(values, 256); 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) { - BufferChecks.checkLargeBuffer(values); + BufferChecks.checkBuffer(values, 256); 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) { - BufferChecks.checkLargeBuffer(values); + BufferChecks.checkBuffer(values, 256); nglGetPixelMapusv(map, values, values.position()); } private static native void nglGetPixelMapusv(int map, ShortBuffer values, int values_offset); @@ -887,11 +887,11 @@ } private static native void nglGetMaterialiv(int face, int pname, IntBuffer params, int params_offset); public static void glGetMap(int target, int query, FloatBuffer v) { - BufferChecks.checkLargeBuffer(v); + BufferChecks.checkBuffer(v, 256); nglGetMapfv(target, query, v, v.position()); } public static void glGetMap(int target, int query, IntBuffer v) { - BufferChecks.checkLargeBuffer(v); + BufferChecks.checkBuffer(v, 256); nglGetMapiv(target, query, v, v.position()); } private static native void nglGetMapfv(int target, int query, FloatBuffer v, int v_offset); @@ -913,22 +913,22 @@ } private static native void nglGetClipPlane(int plane, DoubleBuffer equation, int equation_offset); public static void glGetBoolean(int pname, ByteBuffer params) { - BufferChecks.checkBuffer(params); + BufferChecks.checkBuffer(params, 16); 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) { - BufferChecks.checkBuffer(params); + BufferChecks.checkBuffer(params, 16); 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) { - BufferChecks.checkBuffer(params); + BufferChecks.checkBuffer(params, 16); 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) { - BufferChecks.checkBuffer(params); + BufferChecks.checkBuffer(params, 16); nglGetIntegerv(pname, params, params.position()); } private static native void nglGetIntegerv(int pname, IntBuffer params, int params_offset); @@ -1054,11 +1054,7 @@ public static native String glGetString(int name); public static void glGetPolygonStipple(ByteBuffer mask) { - // TODO: check buffer size valid. This is a bit more fiddly than you might think; - // it looks like a 32x32 byte array but it might not be according to the spec :/ - if (mask.remaining() < 32 * 32) { - throw new BufferOverflowException(); - } + BufferChecks.checkBuffer(mask, 1024); nglGetPolygonStipple(mask, mask.position()); } private static native void nglGetPolygonStipple(ByteBuffer mask, int mask_offset); @@ -1090,7 +1086,7 @@ public static native void glLogicOp(int opcode); public static native void glLoadName(int name); public static void glLoadMatrix(FloatBuffer m) { - BufferChecks.checkBuffer(m); + BufferChecks.checkBuffer(m, 16); nglLoadMatrixf(m, m.position()); } private static native void nglLoadMatrixf(FloatBuffer m, int m_offset); @@ -1125,10 +1121,7 @@ public static native boolean glIsTexture(int texture); public static native void glMatrixMode(int mode); public static void glPolygonStipple(ByteBuffer mask) { - // TODO: check buffer size valid (again, possibly more complicated than it first appears) - if (mask.remaining() < 32 * 32) { - throw new BufferUnderflowException(); - } + BufferChecks.checkBuffer(mask, 1024); nglPolygonStipple(mask, mask.position()); } private static native void nglPolygonStipple(ByteBuffer mask, int mask_offset); @@ -1178,7 +1171,7 @@ public static native void glNewList(int list, int mode); public static native void glEndList(); public static void glMultMatrixf(FloatBuffer m) { - BufferChecks.checkBuffer(m); + BufferChecks.checkBuffer(m, 16); nglMultMatrixf(m, m.position()); } private static native void nglMultMatrixf(FloatBuffer m, int m_offset); |
|
From: <eli...@us...> - 2004-02-18 19:12:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/arb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7477/common/arb Modified Files: org_lwjgl_opengl_ARBVertexBufferObject.cpp Log Message: Index: org_lwjgl_opengl_ARBVertexBufferObject.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/arb/org_lwjgl_opengl_ARBVertexBufferObject.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_ARBVertexBufferObject.cpp 8 Feb 2004 20:31:36 -0000 1.1 +++ org_lwjgl_opengl_ARBVertexBufferObject.cpp 18 Feb 2004 19:02:49 -0000 1.2 @@ -180,15 +180,14 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_ARBVertexBufferObject_glMapBufferARB (JNIEnv * env, jclass clazz, jint target, jint access, jint size, jobject oldBuffer) { - CHECK_EXISTS(glMapBufferARB) - void *buffer_address = glMapBufferARB((GLenum)target, (GLenum)access); - CHECK_GL_ERROR - if (oldBuffer != NULL) { - void *old_buffer_address = env->GetDirectBufferAddress(oldBuffer); - if (old_buffer_address == buffer_address) - return oldBuffer; - } - return safeNewBuffer(env, buffer_address, size); + CHECK_EXISTS(glMapBufferARB) + void *buffer_address = glMapBufferARB((GLenum)target, (GLenum)access); + CHECK_GL_ERROR + void *old_buffer_address = safeGetBufferAddress(env, oldBuffer, 0); + if (old_buffer_address == buffer_address) + return oldBuffer; + else + return safeNewBuffer(env, buffer_address, size); } /* |
|
From: <ci...@us...> - 2004-02-18 17:58:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31973/src/java/org/lwjgl/opengl Modified Files: Window.java Pbuffer.java VBOTracker.java Added Files: GLContext.java Log Message: New Context stuff --- NEW FILE: GLContext.java --- /* * Copyright (c) 2003 Shaven Puppy Ltd * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Shaven Puppy' nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.opengl; /** * The interface for cross-API cross-platform GL contexts. */ public interface GLContext { /** * Make this context the current rendering context for the current Thread. */ public void makeCurrent(); /** * Get the width of the context in pixels * @return int */ public int getWidth(); /** * Get the height of the context in pixels * @return int */ public int getHeight(); } Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Window.java 15 Feb 2004 15:27:00 -0000 1.22 +++ Window.java 18 Feb 2004 17:48:25 -0000 1.23 @@ -58,9 +58,6 @@ System.loadLibrary(Sys.getLibraryName()); } - /** Whether the window is currently created, ie. has a native peer */ - private static boolean created; - /** X coordinate of the window */ private static int x; @@ -88,8 +85,24 @@ /** Tracks VBO state for the window context */ private static VBOTracker vbo_tracker; + /** Context: delegates calls to Window */ + private static class Context implements GLContext { + + public void makeCurrent() { + Window.makeCurrent(); + } + + public int getWidth() { + return width; + } + + public int getHeight() { + return height; + } + } + /** A unique context object, so we can track different contexts between creates() and destroys() */ - private static Window context; + private static Context context; /** * Only constructed by ourselves @@ -221,6 +234,20 @@ * Swap double buffers. */ private static native void swapBuffers(); + + /** + * Make the Window the current rendering context for GL calls. + */ + public static synchronized void makeCurrent() { + assert isCreated() : "No window has been created."; + nMakeCurrent(); + VBOTracker.setCurrent(context); + } + + /** + * Make the window the current rendering context for GL calls. + */ + private static native void nMakeCurrent(); /** * Create a fullscreen window. If the underlying OS does not @@ -304,26 +331,29 @@ private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws Exception { HashSet extensions = new HashSet(); nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples, extensions); + context = new Context(); + context.makeCurrent(); GLCaps.determineAvailableExtensions(extensions); - context = new Window(); - created = true; } /** - * Destroy the window. + * Destroy the Window. After this call, there will be no current GL rendering context, + * regardless of whether the Window was the current rendering context. */ - public static void destroy() { - if (!created) + public static synchronized void destroy() { + if (context == null) { return; + } + makeCurrent(); nDestroy(); - created = false; + VBOTracker.remove(context); context = null; } /** - * @return the unique Window context + * @return the unique Window context (or null, if the Window has not been created) */ - public static final Window getContext() { + public static GLContext getContext() { return context; } @@ -336,7 +366,7 @@ * @return true if the window's native peer has been created */ public static boolean isCreated() { - return created; + return context != null; } /** Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Pbuffer.java 15 Feb 2004 21:46:58 -0000 1.8 +++ Pbuffer.java 18 Feb 2004 17:48:25 -0000 1.9 @@ -47,7 +47,8 @@ * @author elias_naur <eli...@us...> * @version $Revision$ */ -public class Pbuffer { +public final class Pbuffer implements GLContext { + public static final int PBUFFER_SUPPORTED = 1; /** Current Pbuffer */ @@ -56,8 +57,11 @@ /** Handle to the native GL rendering context */ private final int handle; - /** Tracks VBO state */ - private final VBOTracker vbo_tracker; + /** Width */ + private final int width; + + /** Height */ + private final int height; static { System.loadLibrary(Sys.getLibraryName()); @@ -85,17 +89,9 @@ Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. */ public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { + this.width = width; + this.height = height; handle = nCreate(width, height, bpp, alpha, depth, stencil, samples); - vbo_tracker = new VBOTracker(); - } - - /** - * Method to release the current Pbuffer context and make the OpenGL window current. - */ - public static void releaseContext() { - currentBuffer = null; - VBOTracker.releaseCurrent(); - nReleaseContext(); } /** @@ -106,7 +102,7 @@ * * @return true if the buffer is lost and destroyed, false if the buffer is valid. */ - public boolean isBufferLost() { + public synchronized boolean isBufferLost() { return nIsBufferLost(handle); } @@ -116,18 +112,13 @@ private native static boolean nIsBufferLost(int handle); /** - * Native method to release the context. - */ - private native static void nReleaseContext(); - - /** * Method to make the Pbuffer context current. All subsequent OpenGL * calls will go to this buffer. */ - public void makeCurrent() { + public synchronized void makeCurrent() { currentBuffer = this; - VBOTracker.setCurrent(vbo_tracker); nMakeCurrent(handle); + VBOTracker.setCurrent(this); } /** @@ -156,11 +147,12 @@ int samples) throws Exception; /** - * Destroys the Pbuffer. The buffer must not be current. + * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - + * regardless of whether this Pbuffer was the current rendering context or not. */ - public void destroy() { - if (currentBuffer == this) - releaseContext(); + public synchronized void destroy() { + makeCurrent(); + VBOTracker.remove(this); nDestroy(handle); } @@ -168,4 +160,20 @@ * Natively destroy any GL-related stuff */ private native static void nDestroy(int handle); + + /** + * @return Returns the height. + */ + public int getHeight() { + return height; + } + + /** + * @return Returns the width. + */ + public int getWidth() { + return width; + } + + } Index: VBOTracker.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/VBOTracker.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- VBOTracker.java 15 Feb 2004 21:46:58 -0000 1.8 +++ VBOTracker.java 18 Feb 2004 17:48:25 -0000 1.9 @@ -32,38 +32,61 @@ package org.lwjgl.opengl; +import java.util.HashMap; +import java.util.Map; + +/** + * Track Vertex Buffer Objects by context. + */ class VBOTracker { - private static VBOTracker default_tracker = new VBOTracker(); - private static VBOTracker current_tracker = default_tracker; + private static VBOTracker current_tracker = null; + + private static final Map contextToTracker = new HashMap(3, 1.0f); private final StateStack vbo_array_stack; private final StateStack vbo_element_stack; private final StateStack attrib_stack; - public static void setCurrent(VBOTracker tracker) { - current_tracker = tracker; - } - - public static void releaseCurrent() { - current_tracker = default_tracker; - } - - VBOTracker() { + private VBOTracker() { int stack_size = Util.getGLInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH); vbo_array_stack = new StateStack(stack_size, 0); vbo_element_stack = new StateStack(stack_size, 0); attrib_stack = new StateStack(stack_size, 0); } - public static StateStack getVBOArrayStack() { + static StateStack getVBOArrayStack() { return current_tracker.vbo_array_stack; } - public static StateStack getVBOElementStack() { + static StateStack getVBOElementStack() { return current_tracker.vbo_element_stack; } - public static StateStack getClientAttribStack() { + static StateStack getClientAttribStack() { return current_tracker.attrib_stack; } + + /** + * Called after a GLContext has been made current. This will set up the current + * VBO tracker. + * @param context + */ + static synchronized void setCurrent(GLContext context) { + current_tracker = (VBOTracker) contextToTracker.get(context); + if (current_tracker == null) { + current_tracker = new VBOTracker(); + contextToTracker.put(context, current_tracker); + } + } + + /** + * Remove a context when it is about to be destroyed. + * @param context + */ + static synchronized void remove(GLContext context) { + contextToTracker.remove(context); + if (current_tracker == context) { + current_tracker = null; + } + } } |
|
From: <ci...@us...> - 2004-02-18 17:58:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31973/src/native/common Modified Files: org_lwjgl_opengl_Window.h org_lwjgl_opengl_Pbuffer.h Log Message: New Context stuff Index: org_lwjgl_opengl_Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_Window.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- org_lwjgl_opengl_Window.h 15 Feb 2004 15:27:01 -0000 1.10 +++ org_lwjgl_opengl_Window.h 18 Feb 2004 17:48:26 -0000 1.11 @@ -123,6 +123,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nSetVSyncEnabled (JNIEnv *, jclass, jboolean); +/* + * Class: org_lwjgl_opengl_Window + * Method: nMakeCurrent + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nMakeCurrent + (JNIEnv *, jclass); + #ifdef __cplusplus } #endif Index: org_lwjgl_opengl_Pbuffer.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_Pbuffer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_Pbuffer.h 15 Feb 2004 15:46:10 -0000 1.3 +++ org_lwjgl_opengl_Pbuffer.h 18 Feb 2004 17:48:26 -0000 1.4 @@ -20,14 +20,6 @@ /* * Class: org_lwjgl_opengl_Pbuffer - * Method: nReleaseContext - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nReleaseContext - (JNIEnv *, jclass); - -/* - * Class: org_lwjgl_opengl_Pbuffer * Method: nMakeCurrent * Signature: (I)V */ |
|
From: <ci...@us...> - 2004-02-18 17:58:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31973/src/java/org/lwjgl/test/opengl Modified Files: PbufferTest.java Log Message: New Context stuff Index: PbufferTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/PbufferTest.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- PbufferTest.java 15 Feb 2004 15:46:10 -0000 1.26 +++ PbufferTest.java 18 Feb 2004 17:48:26 -0000 1.27 @@ -180,7 +180,6 @@ private void render() { if (pbuffer.isBufferLost()) { System.out.println("Buffer contents lost - will recreate the buffer"); - Pbuffer.releaseContext(); pbuffer.destroy(); initPbuffer(); } @@ -206,7 +205,7 @@ } GL11.glPopMatrix(); GL11.glCopyTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, 0, 0, 512, 512, 0); - Pbuffer.releaseContext(); + Window.makeCurrent(); // OpenGL window rendering GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); @@ -238,7 +237,7 @@ pbuffer.makeCurrent(); initGLState(256, 256, 0.5f); GL11.glBindTexture(GL11.GL_TEXTURE_2D, tex_handle); - Pbuffer.releaseContext(); + Window.makeCurrent(); } catch (Exception e) { e.printStackTrace(); } @@ -256,8 +255,7 @@ try { destroyTexture(); Keyboard.destroy(); - Pbuffer.releaseContext(); - pbuffer.destroy(); + pbuffer.destroy(); Window.destroy(); Display.setDisplayMode(mode); @@ -276,8 +274,7 @@ try { destroyTexture(); Keyboard.destroy(); - Pbuffer.releaseContext(); - pbuffer.destroy(); + pbuffer.destroy(); Window.destroy(); Display.resetDisplayMode(); @@ -347,7 +344,6 @@ private void cleanup() { destroyTexture(); Keyboard.destroy(); - Pbuffer.releaseContext(); pbuffer.destroy(); Window.destroy(); } |
|
From: <ci...@us...> - 2004-02-18 17:58:09
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31973/src/native/linux Modified Files: org_lwjgl_opengl_Pbuffer.cpp org_lwjgl_opengl_Window.cpp Log Message: New Context stuff Index: org_lwjgl_opengl_Pbuffer.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_opengl_Pbuffer.cpp 15 Feb 2004 15:46:10 -0000 1.8 +++ org_lwjgl_opengl_Pbuffer.cpp 18 Feb 2004 17:48:26 -0000 1.9 @@ -1,35 +1,35 @@ -/* +/* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'Light Weight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + /** * $Id$ * @@ -148,17 +148,6 @@ /* * Class: org_lwjgl_opengl_Pbuffer - * Method: nReleaseContext - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nReleaseContext - (JNIEnv *env, jclass clazz) -{ - makeCurrent(); -} - -/* - * Class: org_lwjgl_opengl_Pbuffer * Method: nMakeCurrent * Signature: (I)V */ Index: org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- org_lwjgl_opengl_Window.cpp 15 Feb 2004 15:27:01 -0000 1.16 +++ org_lwjgl_opengl_Window.cpp 18 Feb 2004 17:48:26 -0000 1.17 @@ -265,6 +265,17 @@ handleMessages(); } +/* + * Class: org_lwjgl_Window + * Method: nMakeCurrent + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nMakeCurrent + (JNIEnv *env, jclass clazz) +{ + makeCurrent(); +} + void makeCurrent(void) { if (USEGLX13) glXMakeContextCurrent(getCurrentDisplay(), glx_window, glx_window, context); @@ -371,7 +382,7 @@ releaseContext(); if (USEGLX13) glXDestroyWindow(getCurrentDisplay(), glx_window); - glXDestroyContext(getCurrentDisplay(), context); + glXDestroyContext(getCurrentDisplay(), context); context = NULL; Display *disp = getCurrentDisplay(); destroyWindow(); |
|
From: <ci...@us...> - 2004-02-18 17:58:09
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31973/src/native/win32 Modified Files: org_lwjgl_opengl_Window.cpp Log Message: New Context stuff Index: org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- org_lwjgl_opengl_Window.cpp 17 Feb 2004 16:57:23 -0000 1.19 +++ org_lwjgl_opengl_Window.cpp 18 Feb 2004 17:48:25 -0000 1.20 @@ -675,3 +675,9 @@ vsync = sync; } } + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nMakeCurrent + (JNIEnv *env, jclass clazz) +{ + wglMakeCurrent(hdc, hglrc); +} |