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
(1) |
|
2
(15) |
3
(20) |
4
(9) |
5
(2) |
6
|
7
(8) |
8
(3) |
|
9
(1) |
10
(8) |
11
(27) |
12
(12) |
13
(1) |
14
(6) |
15
(15) |
|
16
|
17
(2) |
18
|
19
|
20
|
21
(1) |
22
(3) |
|
23
|
24
|
25
(1) |
26
|
27
|
28
|
29
|
|
30
|
31
(3) |
|
|
|
|
|
|
From: <eli...@us...> - 2006-07-31 22:54:29
|
Revision: 2539 Author: elias_naur Date: 2006-07-31 15:54:21 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2539&view=rev Log Message: ----------- Don't trust GL_MAX_CLIENT_ATTRIB_STACK_DEPTH since it is 0 on Xgl in linux. Instead make sure the state trackers are sized according to demand Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java trunk/LWJGL/src/java/org/lwjgl/opengl/StateStack.java trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java 2006-07-31 22:37:31 UTC (rev 2538) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java 2006-07-31 22:54:21 UTC (rev 2539) @@ -32,7 +32,7 @@ package org.lwjgl.opengl; class ReferencesStack { - private final References[] references_stack; + private References[] references_stack; private int stack_pos; public References getReferences() { @@ -41,6 +41,12 @@ public void pushState() { stack_pos++; + if (stack_pos == references_stack.length) { + References[] new_references_stack = new References[references_stack.length + 1]; + System.arraycopy(references_stack, 0, new_references_stack, 0, references_stack.length); + references_stack = new_references_stack; + references_stack[references_stack.length - 1] = new References(); + } references_stack[stack_pos].copy(references_stack[stack_pos - 1]); } @@ -51,8 +57,8 @@ return result; } - ReferencesStack(int stack_size) { - references_stack = new References[stack_size]; + ReferencesStack() { + references_stack = new References[1]; stack_pos = 0; for (int i = 0; i < references_stack.length; i++) references_stack[i] = new References(); Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/StateStack.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/StateStack.java 2006-07-31 22:37:31 UTC (rev 2538) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/StateStack.java 2006-07-31 22:54:21 UTC (rev 2539) @@ -32,9 +32,7 @@ package org.lwjgl.opengl; class StateStack { - - /** Only int state is tracked */ - private final int[] state_stack; + private int[] state_stack; private int stack_pos; public int getState() { @@ -47,6 +45,11 @@ public void pushState() { stack_pos++; + if (stack_pos == state_stack.length) { + int[] new_state_stack = new int[state_stack.length + 1]; + System.arraycopy(state_stack, 0, new_state_stack, 0, state_stack.length); + state_stack = new_state_stack; + } state_stack[stack_pos] = state_stack[stack_pos - 1]; } @@ -56,8 +59,8 @@ return result; } - StateStack(int stack_size, int initial_value) { - state_stack = new int[stack_size]; + StateStack(int initial_value) { + state_stack = new int[1]; stack_pos = 0; state_stack[stack_pos] = initial_value; } Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2006-07-31 22:37:31 UTC (rev 2538) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2006-07-31 22:54:21 UTC (rev 2539) @@ -31,19 +31,14 @@ */ package org.lwjgl.opengl; - -/** Track Vertex Buffer Objects by context. */ final class StateTracker { private final ReferencesStack references_stack; private final StateStack attrib_stack; StateTracker() { - int stack_size = Math.max(1, Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH)); - - references_stack = new ReferencesStack(stack_size); - - attrib_stack = new StateStack(stack_size, 0); + references_stack = new ReferencesStack(); + attrib_stack = new StateStack(0); } static void popAttrib() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-31 22:38:06
|
Revision: 2538 Author: elias_naur Date: 2006-07-31 15:37:31 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2538&view=rev Log Message: ----------- ReferencesStack now clears references when popping to avoid keeping buffer references around too long Modified Paths: -------------- trunk/LWJGL/src/generated/org/lwjgl/opengl/References.java trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/References.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/References.java 2006-07-31 01:22:33 UTC (rev 2537) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/References.java 2006-07-31 22:37:31 UTC (rev 2538) @@ -42,4 +42,24 @@ this.GL20_glVertexAttribPointer_buffer = references.GL20_glVertexAttribPointer_buffer; this.NV_vertex_program_glVertexAttribPointerNV_buffer = references.NV_vertex_program_glVertexAttribPointerNV_buffer; } + void clear() { + this.ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = null; + this.ARB_vertex_blend_glWeightPointerARB_pPointer = null; + this.ARB_vertex_program_glVertexAttribPointerARB_buffer = null; + this.ARB_vertex_shader_glVertexAttribPointerARB_buffer = null; + this.ATI_element_array_glElementPointerATI_pPointer = null; + this.EXT_fog_coord_glFogCoordPointerEXT_data = null; + this.EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = null; + this.EXT_vertex_shader_glVariantPointerEXT_pAddr = null; + this.EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer = null; + this.GL11_glColorPointer_pointer = null; + this.GL11_glEdgeFlagPointer_pointer = null; + this.GL11_glNormalPointer_pointer = null; + this.GL11_glSelectBuffer_buffer = null; + this.GL11_glVertexPointer_pointer = null; + this.GL11_glTexCoordPointer_pointer = null; + this.GL14_glFogCoordPointer_data = null; + this.GL20_glVertexAttribPointer_buffer = null; + this.NV_vertex_program_glVertexAttribPointerNV_buffer = null; + } } Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java 2006-07-31 01:22:33 UTC (rev 2537) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java 2006-07-31 22:37:31 UTC (rev 2538) @@ -46,6 +46,7 @@ public References popState() { References result = references_stack[stack_pos]; + references_stack[stack_pos].clear(); stack_pos--; return result; } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java 2006-07-31 01:22:33 UTC (rev 2537) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java 2006-07-31 22:37:31 UTC (rev 2538) @@ -105,6 +105,17 @@ } } + private static void generateClearsFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) { + for (ParameterDeclaration param : method.getParameters()) { + CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class); + if (cached_reference_annotation != null) { + Class nio_type = Utils.getNIOBufferType(param.getType()); + String reference_name = Utils.getReferenceName(interface_decl, method, param); + writer.println("\t\tthis." + reference_name + " = null;"); + } + } + } + private static void generateCopiesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) { for (ParameterDeclaration param : method.getParameters()) { CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class); @@ -117,6 +128,12 @@ } } + private static void generateClearsFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) { + for (MethodDeclaration method : interface_decl.getMethods()) { + generateClearsFromParameters(writer, interface_decl, method); + } + } + private static void generateCopiesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) { for (MethodDeclaration method : interface_decl.getMethods()) { generateCopiesFromParameters(writer, interface_decl, method); @@ -163,6 +180,12 @@ generateCopiesFromMethods(writer, interface_decl); } writer.println("\t}"); + writer.println("\tvoid clear() {"); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + generateClearsFromMethods(writer, interface_decl); + } + writer.println("\t}"); writer.println("}"); writer.close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-31 01:23:03
|
Revision: 2537 Author: elias_naur Date: 2006-07-30 18:22:33 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2537&view=rev Log Message: ----------- Linux: Don't free already freed XIC and XIM instances in LinuxKeyboard Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java 2006-07-25 15:31:16 UTC (rev 2536) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeyboard.java 2006-07-31 01:22:33 UTC (rev 2537) @@ -144,8 +144,10 @@ private static native ByteBuffer allocateComposeStatus(); public void destroy() { - destroyIC(xic); - closeIM(xim); + if (xic != 0) + destroyIC(xic); + if (xim != 0) + closeIM(xim); } private static native void destroyIC(long xic); private static native void closeIM(long xim); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sp...@us...> - 2006-07-25 15:31:50
|
Revision: 2536 Author: spasi Date: 2006-07-25 08:31:16 -0700 (Tue, 25 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2536&view=rev Log Message: ----------- Added SGIS_generate_mipmap & SGIS_texture_lod extensions Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c Added Paths: ----------- trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISTextureLOD.java trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2006-07-22 21:30:31 UTC (rev 2535) +++ trunk/LWJGL/build.xml 2006-07-25 15:31:16 UTC (rev 2536) @@ -15,7 +15,7 @@ <property name="lwjgl.res" location="res" /> <property name="lwjgl.version" value="1.0beta2" /> - <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java"/> + <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/> <!-- ================================================================== --> <!-- Filesets used for targets --> <!-- ================================================================== --> Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java 2006-07-22 21:30:31 UTC (rev 2535) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -1,24 +1,24 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -package org.lwjgl.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.BufferChecks; -import java.nio.*; - -public final class ATITextFragmentShader { - /** - * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, - * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, - * and GetDoublev, and by the <target> parameter of ProgramStringARB, - * BindProgramARB, ProgramEnvParameter4{d,dv,f,fv}ARB, - * ProgramLocalParameter4{d,dv,f,fv}ARB, - * GetProgramEnvParameter{dv,fv}ARB, GetProgramLocalParameter{dv,fv}ARB, - * GetProgramivARB, GetProgramfvATI, and GetProgramStringARB. - */ - public static final int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200; - - private ATITextFragmentShader() { - } - -} +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class ATITextFragmentShader { + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4{d,dv,f,fv}ARB, + * ProgramLocalParameter4{d,dv,f,fv}ARB, + * GetProgramEnvParameter{dv,fv}ARB, GetProgramLocalParameter{dv,fv}ARB, + * GetProgramivARB, GetProgramfvATI, and GetProgramStringARB. + */ + public static final int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200; + + private ATITextFragmentShader() { + } + +} Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-07-22 21:30:31 UTC (rev 2535) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/ContextCapabilities.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -144,6 +144,8 @@ public final boolean GL_NV_vertex_program2; public final boolean GL_NV_vertex_program2_option; public final boolean GL_NV_vertex_program3; + public final boolean GL_SGIS_generate_mipmap; + public final boolean GL_SGIS_texture_lod; public final boolean GL_SUN_slice_accum; long ARB_buffer_object_glBindBufferARB_pointer; @@ -2398,6 +2400,8 @@ this.GL_NV_vertex_program2 = supported_extensions.contains("GL_NV_vertex_program2"); this.GL_NV_vertex_program2_option = supported_extensions.contains("GL_NV_vertex_program2_option"); this.GL_NV_vertex_program3 = supported_extensions.contains("GL_NV_vertex_program3"); + this.GL_SGIS_generate_mipmap = supported_extensions.contains("GL_SGIS_generate_mipmap"); + this.GL_SGIS_texture_lod = supported_extensions.contains("GL_SGIS_texture_lod"); this.GL_SUN_slice_accum = supported_extensions.contains("GL_SUN_slice_accum"); } } Modified: trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java 2006-07-22 21:30:31 UTC (rev 2535) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/EXTTimerQuery.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -1,35 +1,35 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -package org.lwjgl.opengl; - -import org.lwjgl.LWJGLException; -import org.lwjgl.BufferChecks; -import java.nio.*; - -public final class EXTTimerQuery { - /** - * Accepted by the <target> parameter of BeginQuery, EndQuery, and - * GetQueryiv: - */ - public static final int GL_TIME_ELAPSED_EXT = 0x88bf; - - private EXTTimerQuery() { - } - - - public static void glGetQueryObjectEXT(int id, int pname, LongBuffer params) { - long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjecti64vEXT_pointer; - BufferChecks.checkFunctionAddress(function_pointer); - BufferChecks.checkBuffer(params, 1); - nglGetQueryObjecti64vEXT(id, pname, params, params.position(), function_pointer); - } - private static native void nglGetQueryObjecti64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); - - public static void glGetQueryObjectuEXT(int id, int pname, LongBuffer params) { - long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjectui64vEXT_pointer; - BufferChecks.checkFunctionAddress(function_pointer); - BufferChecks.checkBuffer(params, 1); - nglGetQueryObjectui64vEXT(id, pname, params, params.position(), function_pointer); - } - private static native void nglGetQueryObjectui64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); -} +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class EXTTimerQuery { + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_TIME_ELAPSED_EXT = 0x88bf; + + private EXTTimerQuery() { + } + + + public static void glGetQueryObjectEXT(int id, int pname, LongBuffer params) { + long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjecti64vEXT_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjecti64vEXT(id, pname, params, params.position(), function_pointer); + } + private static native void nglGetQueryObjecti64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); + + public static void glGetQueryObjectuEXT(int id, int pname, LongBuffer params) { + long function_pointer = GLContext.getCapabilities().EXT_timer_query_glGetQueryObjectui64vEXT_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectui64vEXT(id, pname, params, params.position(), function_pointer); + } + private static native void nglGetQueryObjectui64vEXT(int id, int pname, LongBuffer params, int params_position, long function_pointer); +} Added: trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java (rev 0) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class SGISGenerateMipmap { + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + public static final int GL_GENERATE_MIPMAP_SGIS = 0x8191; + /** + * Accepted by the <target> parameter of Hint, and by the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192; + + private SGISGenerateMipmap() { + } + +} Added: trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISTextureLOD.java =================================================================== --- trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISTextureLOD.java (rev 0) +++ trunk/LWJGL/src/generated/org/lwjgl/opengl/SGISTextureLOD.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; +import java.nio.*; + +public final class SGISTextureLOD { + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + public static final int GL_TEXTURE_MIN_LOD_SGIS = 0x813a; + public static final int GL_TEXTURE_MAX_LOD_SGIS = 0x813b; + public static final int GL_TEXTURE_BASE_LEVEL_SGIS = 0x813c; + public static final int GL_TEXTURE_MAX_LEVEL_SGIS = 0x813d; + + private SGISTextureLOD() { + } + +} Modified: trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c =================================================================== --- trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c 2006-07-22 21:30:31 UTC (rev 2535) +++ trunk/LWJGL/src/native/generated/org_lwjgl_opengl_EXTTimerQuery.c 2006-07-25 15:31:16 UTC (rev 2536) @@ -1,20 +1,20 @@ -/* MACHINE GENERATED FILE, DO NOT EDIT */ - -#include <jni.h> -#include "extgl.h" - -typedef void (APIENTRY *glGetQueryObjecti64vEXTPROC) (GLuint id, GLenum pname, GLint64EXT * params); -typedef void (APIENTRY *glGetQueryObjectui64vEXTPROC) (GLuint id, GLenum pname, GLuint64EXT * params); - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjecti64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { - GLint64EXT *params_address = ((GLint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; - glGetQueryObjecti64vEXTPROC glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTPROC)((intptr_t)function_pointer); - glGetQueryObjecti64vEXT(id, pname, params_address); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjectui64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { - GLuint64EXT *params_address = ((GLuint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; - glGetQueryObjectui64vEXTPROC glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTPROC)((intptr_t)function_pointer); - glGetQueryObjectui64vEXT(id, pname, params_address); -} - +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include <jni.h> +#include "extgl.h" + +typedef void (APIENTRY *glGetQueryObjecti64vEXTPROC) (GLuint id, GLenum pname, GLint64EXT * params); +typedef void (APIENTRY *glGetQueryObjectui64vEXTPROC) (GLuint id, GLenum pname, GLuint64EXT * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjecti64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { + GLint64EXT *params_address = ((GLint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; + glGetQueryObjecti64vEXTPROC glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTPROC)((intptr_t)function_pointer); + glGetQueryObjecti64vEXT(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjectui64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jobject params, jint params_position, jlong function_pointer) { + GLuint64EXT *params_address = ((GLuint64EXT *)(*env)->GetDirectBufferAddress(env, params)) + params_position; + glGetQueryObjectui64vEXTPROC glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTPROC)((intptr_t)function_pointer); + glGetQueryObjectui64vEXT(id, pname, params_address); +} + Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * 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 'LWJGL' 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; + +import org.lwjgl.util.generator.*; + +public interface SGIS_generate_mipmap { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + int GL_GENERATE_MIPMAP_SGIS = 0x8191; + + /** + * Accepted by the <target> parameter of Hint, and by the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + int GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java 2006-07-25 15:31:16 UTC (rev 2536) @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * 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 'LWJGL' 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; + +import org.lwjgl.util.generator.*; + +@Extension(postfix = "SGIS", className = "SGISTextureLOD") +public interface SGIS_texture_lod { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + int GL_TEXTURE_MIN_LOD_SGIS = 0x813A; + int GL_TEXTURE_MAX_LOD_SGIS = 0x813B; + int GL_TEXTURE_BASE_LEVEL_SGIS = 0x813C; + int GL_TEXTURE_MAX_LEVEL_SGIS = 0x813D; +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-22 21:31:04
|
Revision: 2535 Author: elias_naur Date: 2006-07-22 14:30:31 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2535&view=rev Log Message: ----------- Linux: Remove 32x32 icons size check, since other sizes seem to work alright. Document the fact that Display.setIcon use the icons from the icon array in order of decreasing preference Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2006-07-22 15:05:36 UTC (rev 2534) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2006-07-22 21:30:31 UTC (rev 2535) @@ -273,7 +273,7 @@ if(cached_icons != null) { setIcon(cached_icons); } else { - setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon16x16, LWJGLUtil.LWJGLIcon32x32 }); + setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon32x32, LWJGLUtil.LWJGLIcon16x16 }); } } @@ -879,7 +879,7 @@ * of recreating the icons when you go back and forth fullscreen mode. You therefore only need to * set the icon once per instance. * - * @param icons Array of icons in RGBA mode + * @param icons Array of icons in RGBA mode. Pass the icons in order of preference. * @return number of icons used, or 0 if display hasn't been created */ public static int setIcon(ByteBuffer[] icons) { Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-07-22 15:05:36 UTC (rev 2534) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-07-22 21:30:31 UTC (rev 2535) @@ -949,11 +949,9 @@ for (int i=0;i<icons.length;i++) { int size = icons[i].limit() / 4; int dimension = (int)Math.sqrt(size); - if (dimension == 32) { - ByteBuffer icon = convertIcon(icons[i], dimension, dimension); - nSetWindowIcon(icon, icon.capacity(), dimension, dimension); - return 1; - } + ByteBuffer icon = convertIcon(icons[i], dimension, dimension); + nSetWindowIcon(icon, icon.capacity(), dimension, dimension); + return 1; } return 0; } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-22 15:05:42
|
Revision: 2534 Author: elias_naur Date: 2006-07-22 08:05:36 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2534&view=rev Log Message: ----------- Make sure OpenGL versions with major >= 3 is properly supported. Make sure major >= 1 in any case Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-22 14:58:13 UTC (rev 2533) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-22 15:05:36 UTC (rev 2534) @@ -208,7 +208,7 @@ LWJGLUtil.log("The major and/or minor OpenGL version is malformed: " + e.getMessage()); } - if (majorVersion == 2) { + if (majorVersion >= 2) { // ----------------------[ 2.X ]---------------------- supported_extensions.add("OpenGL20"); // ----------------------[ 1.X ]---------------------- @@ -217,7 +217,7 @@ supported_extensions.add("OpenGL13"); supported_extensions.add("OpenGL14"); supported_extensions.add("OpenGL15"); - } else { + } else if (majorVersion == 1) { switch (minorVersion) { case 5: supported_extensions.add("OpenGL15"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-22 14:58:42
|
Revision: 2533 Author: elias_naur Date: 2006-07-22 07:58:13 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2533&view=rev Log Message: ----------- Fix comment Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-21 20:35:27 UTC (rev 2532) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2006-07-22 14:58:13 UTC (rev 2533) @@ -79,7 +79,7 @@ * * 'fast_path_cache' is the most recent ContextCapabilities (potentially null) and its owner. By * recent I mean the last thread setting the value in setCapabilities(). When getCapabilities() - * is called, a check to see if the current is the owner of the ContextCapabilities instance inf + * is called, a check to see if the current is the owner of the ContextCapabilities instance in * fast_path_cache. If so, the instance is returned, if not, some thread has since taken ownership * of the cache entry and the slower current_capabilities ThreadLocal is queried instead. * @@ -87,7 +87,7 @@ * from multiple threads at once, we are guaranteed by the JVM spec that its value is always valid. * Furthermore, if the ownership test in getCapabilities() succeeds, the cache entry can only contain * the correct ContextCapabilites (that is, the one from getThreadLocalCapabilites()), - * since no other thread can sets the owner to anyone else than itself. + * since no other thread can set the owner to anyone else than itself. */ private static CapabilitiesCacheEntry fast_path_cache = new CapabilitiesCacheEntry(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-21 20:36:00
|
Revision: 2532 Author: elias_naur Date: 2006-07-21 13:35:27 -0700 (Fri, 21 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2532&view=rev Log Message: ----------- Windows: Ingore DI_POLLEDDEVICE when setting buffer size of a directinput device Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java 2006-07-17 23:27:29 UTC (rev 2531) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInput.java 2006-07-21 20:35:27 UTC (rev 2532) @@ -46,6 +46,7 @@ public final static int DI_OK = 0x00000000; public final static int DI_NOEFFECT = 0x00000001; public final static int DI_PROPNOEFFECT = 0x00000001; + public final static int DI_POLLEDDEVICE = 0x00000002; public final static int DI_DOWNLOADSKIPPED = 0x00000003; public final static int DI_EFFECTRESTARTED = 0x00000004; Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java 2006-07-17 23:27:29 UTC (rev 2531) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDirectInputDevice.java 2006-07-21 20:35:27 UTC (rev 2532) @@ -94,7 +94,7 @@ public void setBufferSize(int buffer_size) throws LWJGLException { int ret = setBufferSize(di_device, buffer_size); - if (ret != WindowsDirectInput.DI_OK) + if (ret != WindowsDirectInput.DI_OK && ret != WindowsDirectInput.DI_PROPNOEFFECT && ret != WindowsDirectInput.DI_POLLEDDEVICE) throw new LWJGLException("Failed to set buffer size (" + ret + ")"); int event_buffer_size = getEventSize()*buffer_size; event_buffer = BufferUtils.createByteBuffer(event_buffer_size); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-17 23:27:37
|
Revision: 2531 Author: elias_naur Date: 2006-07-17 16:27:29 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2531&view=rev Log Message: ----------- glu: Remove unused Util.IntValue inner class Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java 2006-07-17 23:23:50 UTC (rev 2530) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java 2006-07-17 23:27:29 UTC (rev 2531) @@ -68,24 +68,4 @@ GL11.glGetInteger(gl_enum, int_buffer); return int_buffer.get(0); } - - /** Handy mutable integer value class */ - static final class IntValue { - - int value; - - IntValue(int value) { - this.value = value; - } - - public boolean equals(Object obj) { - return ((IntValue)obj).value == value; - } - - public int hashCode() { - return value; - } - } - - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-17 23:24:20
|
Revision: 2530 Author: elias_naur Date: 2006-07-17 16:23:50 -0700 (Mon, 17 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2530&view=rev Log Message: ----------- glu: Remove redundant initialization of PixelStoreState Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/glu/PixelStoreState.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/glu/PixelStoreState.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/glu/PixelStoreState.java 2006-07-15 23:31:37 UTC (rev 2529) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/glu/PixelStoreState.java 2006-07-17 23:23:50 UTC (rev 2530) @@ -42,14 +42,14 @@ */ class PixelStoreState extends Util { - public int unpackRowLength = glGetIntegerv(GL11.GL_UNPACK_ROW_LENGTH); - public int unpackAlignment = glGetIntegerv(GL11.GL_UNPACK_ALIGNMENT); - public int unpackSkipRows = glGetIntegerv(GL11.GL_UNPACK_SKIP_ROWS); - public int unpackSkipPixels = glGetIntegerv(GL11.GL_UNPACK_SKIP_PIXELS); - public int packRowLength = glGetIntegerv(GL11.GL_PACK_ROW_LENGTH); - public int packAlignment = glGetIntegerv(GL11.GL_PACK_ALIGNMENT); - public int packSkipRows = glGetIntegerv(GL11.GL_PACK_SKIP_ROWS); - public int packSkipPixels = glGetIntegerv(GL11.GL_PACK_SKIP_PIXELS); + public int unpackRowLength; + public int unpackAlignment; + public int unpackSkipRows; + public int unpackSkipPixels; + public int packRowLength; + public int packAlignment; + public int packSkipRows; + public int packSkipPixels; /** * Constructor for PixelStoreState. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 23:32:36
|
Revision: 2529 Author: elias_naur Date: 2006-07-15 16:31:37 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2529&view=rev Log Message: ----------- Windows: Use env.MSSdk, not MSSDK (the capitalization is important in ant). The MSVC compiler doesn't seem to mind if the PLTSDK is included or not, though (if it did, we would have noticed the incorrect env. variable) Modified Paths: -------------- trunk/LWJGL/platform_build/mingw_ant/build.xml trunk/LWJGL/platform_build/windows_ant/build.xml Modified: trunk/LWJGL/platform_build/mingw_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 23:20:06 UTC (rev 2528) +++ trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 23:31:37 UTC (rev 2529) @@ -4,7 +4,6 @@ <property name="native" location="../../src/native"/> <property environment="env"/> <property name="dxhome" location="${env.DXSDK_DIR}"/> - <property name="sdkhome" location="${env.MSSDK}"/> <property name="program_files" location="${env.ProgramFiles}"/> <property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/> <property name="chome" location="c:/MinGW"/> @@ -15,7 +14,6 @@ <target name="compile_dir"> <apply dir="." failonerror="true" executable="${gcc}" dest="." skipemptyfilesets="true"> <arg line="-c -Wall -O2 -std=gnu99"/> - <arg value="-I${sdkhome}/include"/> <arg value="-I${dxhome}/include"/> <arg value="-I${alhome}/include"/> <arg value="-I${java.home}/../include"/> @@ -37,7 +35,6 @@ <srcfile/> <arg value="-L${java.home}/../lib"/> <arg value="-L${dxhome}/lib/x86"/> - <arg value="-L${sdkhome}/lib"/> <arg value="-L${alhome}/libs"/> <arg line="${libs}"/> <fileset dir="." includes="*.o"/> Modified: trunk/LWJGL/platform_build/windows_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build.xml 2006-07-15 23:20:06 UTC (rev 2528) +++ trunk/LWJGL/platform_build/windows_ant/build.xml 2006-07-15 23:31:37 UTC (rev 2529) @@ -4,7 +4,7 @@ <property name="native" location="../../src/native"/> <property environment="env"/> <property name="dxhome" location="${env.DXSDK_DIR}"/> - <property name="sdkhome" location="${env.MSSDK}"/> + <property name="sdkhome" location="${env.MSSdk}"/> <property name="program_files" location="${env.ProgramFiles}"/> <property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/> <property name="dllname" value="lwjgl.dll"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 23:20:14
|
Revision: 2528 Author: elias_naur Date: 2006-07-15 16:20:06 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2528&view=rev Log Message: ----------- Windows: Make mingw build.xml strip the dll after linking. Delete optional build files from mingw_ant. Modified Paths: -------------- trunk/LWJGL/platform_build/mingw_ant/build.xml Removed Paths: ------------- trunk/LWJGL/platform_build/mingw_ant/build_devil.xml trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml Modified: trunk/LWJGL/platform_build/mingw_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 23:04:07 UTC (rev 2527) +++ trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 23:20:06 UTC (rev 2528) @@ -9,6 +9,7 @@ <property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/> <property name="chome" location="c:/MinGW"/> <property name="gcc" location="${chome}/bin/gcc"/> + <property name="strip" location="${chome}/bin/strip"/> <property name="dllname" value="lwjgl.dll"/> <target name="compile_dir"> @@ -54,6 +55,9 @@ <property name="libs" value="-lKernel32 -lole32 -ldinput -ldxguid -lOpenGL32 -lVersion -luser32 -lGdi32 -lAdvapi32 -ljawt -lwinmm"/> <antcall target="compile_dir"/> <antcall target="link"/> + <apply dir="." executable="${strip}"> + <fileset file="${dllname}"/> + </apply> </target> </project> Deleted: trunk/LWJGL/platform_build/mingw_ant/build_devil.xml =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build_devil.xml 2006-07-15 23:04:07 UTC (rev 2527) +++ trunk/LWJGL/platform_build/mingw_ant/build_devil.xml 2006-07-15 23:20:06 UTC (rev 2528) @@ -1,52 +0,0 @@ -<?xml version="1.0"?> - -<project name="devil" basedir="../../bin/devil" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="sdkhome" location="${env.MSSDK}"/> - <property name="fmodhome" location="${env.FMODHOME}"/> - <property name="dllname" value="lwjgl-devil.dll"/> - - <target name="compile_dir"> - <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> - <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> - <arg value="/I${sdkhome}\include"/> - <arg value="/I${java.home}\..\include"/> - <arg value="/I${java.home}\..\include\win32"/> - <arg value="/I${native}\common"/> - <srcfile/> - <fileset dir="${native}/common/devil" includes="*.c"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <mapper type="glob" from="*.c" to="*.obj"/> - </apply> - </target> - - <target name="link"> - <apply dir="." parallel="true" executable="cl" failonerror="true"> - <arg line="/LD /nologo"/> - <srcfile/> - <arg line="/Fe${dllname} /link"/> - <arg value="/LIBPATH:${java.home}\..\lib"/> - <arg value="/LIBPATH:${sdkhome}\lib"/> - <arg value="/OPT:REF"/> - <arg value="/OPT:ICF"/> - <fileset dir="." includes="*.obj"/> - </apply> - </target> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.obj"/> - <fileset dir="." includes="*.dll"/> - <fileset dir="." includes="*.exp"/> - <fileset dir="." includes="*.lib"/> - </delete> - </target> - - <target name="compile" depends="clean"> - <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> - <antcall target="compile_dir"/> - <antcall target="link"/> - </target> -</project> - Deleted: trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml 2006-07-15 23:04:07 UTC (rev 2527) +++ trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml 2006-07-15 23:20:06 UTC (rev 2528) @@ -1,53 +0,0 @@ -<?xml version="1.0"?> - -<project name="fmod3" basedir="../../bin/fmod3" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="sdkhome" location="${env.MSSDK}"/> - <property name="fmodhome" location="${env.FMODHOME}"/> - <property name="dllname" value="lwjgl-fmod3.dll"/> - - <target name="compile_dir"> - <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> - <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> - <arg value="/I${sdkhome}\include"/> - <arg value="/I${java.home}\..\include"/> - <arg value="/I${java.home}\..\include\win32"/> - <arg value="/I${native}\common"/> - <arg value="/I${fmodhome}\api\inc"/> - <srcfile/> - <fileset dir="${native}/common/fmod3" includes="*.c"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <mapper type="glob" from="*.c" to="*.obj"/> - </apply> - </target> - - <target name="link"> - <apply dir="." parallel="true" executable="cl" failonerror="true"> - <arg line="/LD /nologo"/> - <srcfile/> - <arg line="/Fe${dllname} /link"/> - <arg value="/LIBPATH:${java.home}\..\lib"/> - <arg value="/LIBPATH:${sdkhome}\lib"/> - <arg value="/OPT:REF"/> - <arg value="/OPT:ICF"/> - <fileset dir="." includes="*.obj"/> - </apply> - </target> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.obj"/> - <fileset dir="." includes="*.dll"/> - <fileset dir="." includes="*.exp"/> - <fileset dir="." includes="*.lib"/> - </delete> - </target> - - <target name="compile" depends="clean"> - <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> - <antcall target="compile_dir"/> - <antcall target="link"/> - </target> -</project> - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 23:04:15
|
Revision: 2527 Author: elias_naur Date: 2006-07-15 16:04:07 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2527&view=rev Log Message: ----------- Windows: mingw path fixes Modified Paths: -------------- trunk/LWJGL/platform_build/mingw_ant/build.xml Modified: trunk/LWJGL/platform_build/mingw_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 21:44:59 UTC (rev 2526) +++ trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 23:04:07 UTC (rev 2527) @@ -34,10 +34,10 @@ <arg value="-Wl,--kill-at"/> <arg line="-shared -o ${dllname}"/> <srcfile/> - <arg value="-L${java.home}\..\lib"/> - <arg value="-L${dxhome}\lib\x86"/> - <arg value="-L${sdkhome}\lib"/> - <arg value="-L${alhome}\libs"/> + <arg value="-L${java.home}/../lib"/> + <arg value="-L${dxhome}/lib/x86"/> + <arg value="-L${sdkhome}/lib"/> + <arg value="-L${alhome}/libs"/> <arg line="${libs}"/> <fileset dir="." includes="*.o"/> </apply> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 21:45:18
|
Revision: 2526 Author: elias_naur Date: 2006-07-15 14:44:59 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2526&view=rev Log Message: ----------- Windows: added build.xml for MinGW building of lwjgl.dll. Hopefully this could enable us to build 64 bit versions of the natives in the future. It currently works, with some manual removal of double declarations of symbols in dinput.h(!) Added Paths: ----------- trunk/LWJGL/platform_build/mingw_ant/ trunk/LWJGL/platform_build/mingw_ant/build.xml trunk/LWJGL/platform_build/mingw_ant/build_devil.xml trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml Removed Paths: ------------- trunk/LWJGL/platform_build/mingw_ant/build.xml trunk/LWJGL/platform_build/mingw_ant/build_devil.xml trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml Copied: trunk/LWJGL/platform_build/mingw_ant (from rev 2514, trunk/LWJGL/platform_build/windows_ant) Deleted: trunk/LWJGL/platform_build/mingw_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build.xml 2006-07-14 16:14:52 UTC (rev 2514) +++ trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 21:44:59 UTC (rev 2526) @@ -1,61 +0,0 @@ -<?xml version="1.0"?> - -<project name="lwjgl native code, native code" basedir="../../bin/lwjgl" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="dxhome" location="${env.DXSDK_DIR}"/> - <property name="sdkhome" location="${env.MSSDK}"/> - <property name="program_files" location="${env.ProgramFiles}"/> - <property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/> - <property name="dllname" value="lwjgl.dll"/> - - <target name="compile_dir"> - <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> - <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c"/> - <arg value="/I${sdkhome}\include"/> - <arg value="/I${dxhome}\include"/> - <arg value="/I${alhome}\include"/> - <arg value="/I${java.home}\..\include"/> - <arg value="/I${java.home}\..\include\win32"/> - <arg value="/I${native}\common"/> - <arg value="/I${native}\windows"/> - <srcfile/> - <fileset dir="${native}/windows" includes="*.c"/> - <fileset dir="${native}/common" includes="*.c"/> - <fileset dir="${native}/generated" includes="*.c"/> - <mapper type="glob" from="*.c" to="*.obj"/> - </apply> - </target> - - <target name="link"> - <apply dir="." parallel="true" executable="cl" failonerror="true"> - <arg line="/LD /nologo"/> - <srcfile/> - <arg line="/Fe${dllname} /link"/> - <arg value="/LIBPATH:${java.home}\..\lib"/> - <arg value="/LIBPATH:${dxhome}\lib\x86"/> - <arg value="/LIBPATH:${sdkhome}\lib"/> - <arg value="/LIBPATH:${alhome}\libs"/> - <arg value="/OPT:REF"/> - <arg value="/OPT:ICF"/> - <arg line="/DLL /DELAYLOAD:jawt.dll ${libs}"/> - <fileset dir="." includes="*.obj"/> - </apply> - </target> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.obj"/> - <fileset dir="." includes="*.dll"/> - <fileset dir="." includes="*.exp"/> - <fileset dir="." includes="*.lib"/> - </delete> - </target> - - <target name="compile"> - <property name="libs" value="Kernel32.lib ole32.lib dinput.lib dxguid.lib OpenGL32.Lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib"/> - <antcall target="compile_dir"/> - <antcall target="link"/> - </target> -</project> - Copied: trunk/LWJGL/platform_build/mingw_ant/build.xml (from rev 2520, trunk/LWJGL/platform_build/windows_ant/build.xml) =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build.xml (rev 0) +++ trunk/LWJGL/platform_build/mingw_ant/build.xml 2006-07-15 21:44:59 UTC (rev 2526) @@ -0,0 +1,59 @@ +<?xml version="1.0"?> + +<project name="lwjgl native code, native code" basedir="../../bin/lwjgl" default="compile"> + <property name="native" location="../../src/native"/> + <property environment="env"/> + <property name="dxhome" location="${env.DXSDK_DIR}"/> + <property name="sdkhome" location="${env.MSSDK}"/> + <property name="program_files" location="${env.ProgramFiles}"/> + <property name="alhome" location="${program_files}\OpenAL 1.1 with EFX SDK"/> + <property name="chome" location="c:/MinGW"/> + <property name="gcc" location="${chome}/bin/gcc"/> + <property name="dllname" value="lwjgl.dll"/> + + <target name="compile_dir"> + <apply dir="." failonerror="true" executable="${gcc}" dest="." skipemptyfilesets="true"> + <arg line="-c -Wall -O2 -std=gnu99"/> + <arg value="-I${sdkhome}/include"/> + <arg value="-I${dxhome}/include"/> + <arg value="-I${alhome}/include"/> + <arg value="-I${java.home}/../include"/> + <arg value="-I${java.home}/../include/win32"/> + <arg value="-I${native}/common"/> + <arg value="-I${native}/windows"/> + <srcfile/> + <fileset dir="${native}/windows" includes="*.c"/> + <fileset dir="${native}/common" includes="*.c"/> + <fileset dir="${native}/generated" includes="*.c"/> + <mapper type="glob" from="*.c" to="*.o"/> + </apply> + </target> + + <target name="link"> + <apply dir="." parallel="true" executable="${gcc}" failonerror="true"> + <arg value="-Wl,--kill-at"/> + <arg line="-shared -o ${dllname}"/> + <srcfile/> + <arg value="-L${java.home}\..\lib"/> + <arg value="-L${dxhome}\lib\x86"/> + <arg value="-L${sdkhome}\lib"/> + <arg value="-L${alhome}\libs"/> + <arg line="${libs}"/> + <fileset dir="." includes="*.o"/> + </apply> + </target> + + <target name="clean"> + <delete> + <fileset dir="." includes="*.o"/> + <fileset dir="." includes="*.dll"/> + </delete> + </target> + + <target name="compile"> + <property name="libs" value="-lKernel32 -lole32 -ldinput -ldxguid -lOpenGL32 -lVersion -luser32 -lGdi32 -lAdvapi32 -ljawt -lwinmm"/> + <antcall target="compile_dir"/> + <antcall target="link"/> + </target> +</project> + Deleted: trunk/LWJGL/platform_build/mingw_ant/build_devil.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build_devil.xml 2006-07-14 16:14:52 UTC (rev 2514) +++ trunk/LWJGL/platform_build/mingw_ant/build_devil.xml 2006-07-15 21:44:59 UTC (rev 2526) @@ -1,52 +0,0 @@ -<?xml version="1.0"?> - -<project name="devil" basedir="../../bin/devil" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="sdkhome" location="${env.MSSDK}"/> - <property name="fmodhome" location="${env.FMODHOME}"/> - <property name="dllname" value="lwjgl-devil.dll"/> - - <target name="compile_dir"> - <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> - <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> - <arg value="/I${sdkhome}\include"/> - <arg value="/I${java.home}\..\include"/> - <arg value="/I${java.home}\..\include\win32"/> - <arg value="/I${native}\common"/> - <srcfile/> - <fileset dir="${native}/common/devil" includes="*.c"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <mapper type="glob" from="*.c" to="*.obj"/> - </apply> - </target> - - <target name="link"> - <apply dir="." parallel="true" executable="cl" failonerror="true"> - <arg line="/LD /nologo"/> - <srcfile/> - <arg line="/Fe${dllname} /link"/> - <arg value="/LIBPATH:${java.home}\..\lib"/> - <arg value="/LIBPATH:${sdkhome}\lib"/> - <arg value="/OPT:REF"/> - <arg value="/OPT:ICF"/> - <fileset dir="." includes="*.obj"/> - </apply> - </target> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.obj"/> - <fileset dir="." includes="*.dll"/> - <fileset dir="." includes="*.exp"/> - <fileset dir="." includes="*.lib"/> - </delete> - </target> - - <target name="compile" depends="clean"> - <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> - <antcall target="compile_dir"/> - <antcall target="link"/> - </target> -</project> - Copied: trunk/LWJGL/platform_build/mingw_ant/build_devil.xml (from rev 2520, trunk/LWJGL/platform_build/windows_ant/build_devil.xml) =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build_devil.xml (rev 0) +++ trunk/LWJGL/platform_build/mingw_ant/build_devil.xml 2006-07-15 21:44:59 UTC (rev 2526) @@ -0,0 +1,52 @@ +<?xml version="1.0"?> + +<project name="devil" basedir="../../bin/devil" default="compile"> + <property name="native" location="../../src/native"/> + <property environment="env"/> + <property name="sdkhome" location="${env.MSSDK}"/> + <property name="fmodhome" location="${env.FMODHOME}"/> + <property name="dllname" value="lwjgl-devil.dll"/> + + <target name="compile_dir"> + <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> + <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> + <arg value="/I${sdkhome}\include"/> + <arg value="/I${java.home}\..\include"/> + <arg value="/I${java.home}\..\include\win32"/> + <arg value="/I${native}\common"/> + <srcfile/> + <fileset dir="${native}/common/devil" includes="*.c"/> + <fileset dir="${native}/common" includes="*common*.c"/> + <mapper type="glob" from="*.c" to="*.obj"/> + </apply> + </target> + + <target name="link"> + <apply dir="." parallel="true" executable="cl" failonerror="true"> + <arg line="/LD /nologo"/> + <srcfile/> + <arg line="/Fe${dllname} /link"/> + <arg value="/LIBPATH:${java.home}\..\lib"/> + <arg value="/LIBPATH:${sdkhome}\lib"/> + <arg value="/OPT:REF"/> + <arg value="/OPT:ICF"/> + <fileset dir="." includes="*.obj"/> + </apply> + </target> + + <target name="clean"> + <delete> + <fileset dir="." includes="*.obj"/> + <fileset dir="." includes="*.dll"/> + <fileset dir="." includes="*.exp"/> + <fileset dir="." includes="*.lib"/> + </delete> + </target> + + <target name="compile" depends="clean"> + <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> + <antcall target="compile_dir"/> + <antcall target="link"/> + </target> +</project> + Deleted: trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml =================================================================== --- trunk/LWJGL/platform_build/windows_ant/build_fmod3.xml 2006-07-14 16:14:52 UTC (rev 2514) +++ trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml 2006-07-15 21:44:59 UTC (rev 2526) @@ -1,53 +0,0 @@ -<?xml version="1.0"?> - -<project name="fmod3" basedir="../../bin/fmod3" default="compile"> - <property name="native" location="../../src/native"/> - <property environment="env"/> - <property name="sdkhome" location="${env.MSSDK}"/> - <property name="fmodhome" location="${env.FMODHOME}"/> - <property name="dllname" value="lwjgl-fmod3.dll"/> - - <target name="compile_dir"> - <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> - <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> - <arg value="/I${sdkhome}\include"/> - <arg value="/I${java.home}\..\include"/> - <arg value="/I${java.home}\..\include\win32"/> - <arg value="/I${native}\common"/> - <arg value="/I${fmodhome}\api\inc"/> - <srcfile/> - <fileset dir="${native}/common/fmod3" includes="*.c"/> - <fileset dir="${native}/common" includes="*common*.c"/> - <mapper type="glob" from="*.c" to="*.obj"/> - </apply> - </target> - - <target name="link"> - <apply dir="." parallel="true" executable="cl" failonerror="true"> - <arg line="/LD /nologo"/> - <srcfile/> - <arg line="/Fe${dllname} /link"/> - <arg value="/LIBPATH:${java.home}\..\lib"/> - <arg value="/LIBPATH:${sdkhome}\lib"/> - <arg value="/OPT:REF"/> - <arg value="/OPT:ICF"/> - <fileset dir="." includes="*.obj"/> - </apply> - </target> - - <target name="clean"> - <delete> - <fileset dir="." includes="*.obj"/> - <fileset dir="." includes="*.dll"/> - <fileset dir="." includes="*.exp"/> - <fileset dir="." includes="*.lib"/> - </delete> - </target> - - <target name="compile" depends="clean"> - <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> - <antcall target="compile_dir"/> - <antcall target="link"/> - </target> -</project> - Copied: trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml (from rev 2520, trunk/LWJGL/platform_build/windows_ant/build_fmod3.xml) =================================================================== --- trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml (rev 0) +++ trunk/LWJGL/platform_build/mingw_ant/build_fmod3.xml 2006-07-15 21:44:59 UTC (rev 2526) @@ -0,0 +1,53 @@ +<?xml version="1.0"?> + +<project name="fmod3" basedir="../../bin/fmod3" default="compile"> + <property name="native" location="../../src/native"/> + <property environment="env"/> + <property name="sdkhome" location="${env.MSSDK}"/> + <property name="fmodhome" location="${env.FMODHOME}"/> + <property name="dllname" value="lwjgl-fmod3.dll"/> + + <target name="compile_dir"> + <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true"> + <arg line="/Ox /Wp64 /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c /D WIN32 /c"/> + <arg value="/I${sdkhome}\include"/> + <arg value="/I${java.home}\..\include"/> + <arg value="/I${java.home}\..\include\win32"/> + <arg value="/I${native}\common"/> + <arg value="/I${fmodhome}\api\inc"/> + <srcfile/> + <fileset dir="${native}/common/fmod3" includes="*.c"/> + <fileset dir="${native}/common" includes="*common*.c"/> + <mapper type="glob" from="*.c" to="*.obj"/> + </apply> + </target> + + <target name="link"> + <apply dir="." parallel="true" executable="cl" failonerror="true"> + <arg line="/LD /nologo"/> + <srcfile/> + <arg line="/Fe${dllname} /link"/> + <arg value="/LIBPATH:${java.home}\..\lib"/> + <arg value="/LIBPATH:${sdkhome}\lib"/> + <arg value="/OPT:REF"/> + <arg value="/OPT:ICF"/> + <fileset dir="." includes="*.obj"/> + </apply> + </target> + + <target name="clean"> + <delete> + <fileset dir="." includes="*.obj"/> + <fileset dir="." includes="*.dll"/> + <fileset dir="." includes="*.exp"/> + <fileset dir="." includes="*.lib"/> + </delete> + </target> + + <target name="compile" depends="clean"> + <property name="libs" value="user32.lib Gdi32.lib Advapi32.lib"/> + <antcall target="compile_dir"/> + <antcall target="link"/> + </target> +</project> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 21:38:03
|
Revision: 2525 Author: elias_naur Date: 2006-07-15 14:37:50 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2525&view=rev Log Message: ----------- Windows: Fix warning Modified Paths: -------------- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c 2006-07-15 21:01:11 UTC (rev 2524) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDirectInput8.c 2006-07-15 21:37:50 UTC (rev 2525) @@ -54,7 +54,7 @@ throwFormattedException(env, "CoInitializeEx failed (%x)", ret); return (LONG_PTR)NULL; } - ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInput8, &lpdi); + ret = CoCreateInstance(&CLSID_DirectInput8, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectInput8, (void *)&lpdi); if (ret != DI_OK && ret != DIERR_BETADIRECTINPUTVERSION) { throwFormattedException(env, "Failed to create DirectInput (%x)", ret); return (LONG_PTR)NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 21:01:23
|
Revision: 2524 Author: elias_naur Date: 2006-07-15 14:01:11 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2524&view=rev Log Message: ----------- Windows: Replace _WIN32 macro with _MSC_VER since the conditionals are really for the MSVC compiler, not for the windows platform in general. Code cleanup. Modified Paths: -------------- trunk/LWJGL/src/native/common/common_tools.c trunk/LWJGL/src/native/common/common_tools.h trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c Modified: trunk/LWJGL/src/native/common/common_tools.c =================================================================== --- trunk/LWJGL/src/native/common/common_tools.c 2006-07-15 20:25:56 UTC (rev 2523) +++ trunk/LWJGL/src/native/common/common_tools.c 2006-07-15 21:01:11 UTC (rev 2524) @@ -39,11 +39,6 @@ #include <jni.h> #include <stdlib.h> - -#ifdef _WIN32 -#include <wtypes.h> -#endif - #include "common_tools.h" #include "org_lwjgl_DefaultSysImplementation.h" @@ -81,7 +76,7 @@ #define BUFFER_SIZE 4000 char buffer[BUFFER_SIZE]; jstring str; -#ifdef _WIN32 +#ifdef _MSC_VER vsnprintf_s(buffer, BUFFER_SIZE, _TRUNCATE, format, ap); #else vsnprintf(buffer, BUFFER_SIZE, format, ap); Modified: trunk/LWJGL/src/native/common/common_tools.h =================================================================== --- trunk/LWJGL/src/native/common/common_tools.h 2006-07-15 20:25:56 UTC (rev 2523) +++ trunk/LWJGL/src/native/common/common_tools.h 2006-07-15 21:01:11 UTC (rev 2524) @@ -57,7 +57,7 @@ #endif #endif -#ifdef _WIN32 +#ifdef _MSC_VER #define inline __inline #include <Basetsd.h> #else Modified: trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c 2006-07-15 20:25:56 UTC (rev 2523) +++ trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c 2006-07-15 21:01:11 UTC (rev 2524) @@ -88,7 +88,7 @@ colorDIB = CreateDIBSection(GetDC(NULL), (BITMAPINFO*)&(bitmapInfo), DIB_RGB_COLORS, - (void**)&(ptrCursorImage), + (void*)&(ptrCursorImage), NULL, 0); srcPtr = pixels; dstPtr = ptrCursorImage; Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2006-07-15 20:25:56 UTC (rev 2523) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2006-07-15 21:01:11 UTC (rev 2524) @@ -119,7 +119,7 @@ message_time = GetMessageTime(); handleMessage_method = (*env)->GetStaticMethodID(env, display_class_global, "handleMessage", "(JIJJJ)Z"); if (handleMessage_method != NULL) - if ((*env)->CallStaticBooleanMethod(env, display_class_global, handleMessage_method, (jlong)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time)) + if ((*env)->CallStaticBooleanMethod(env, display_class_global, handleMessage_method, (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time)) return 0; } } @@ -190,7 +190,6 @@ jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I"); int width = (*env)->GetIntField(env, mode, fid_width); int height = (*env)->GetIntField(env, mode, fid_height); - BOOL result; bool isUndecorated; // Whether we're undecorated or not static bool oneShotInitialised = false; if (!oneShotInitialised) { @@ -321,8 +320,6 @@ char *ptrCursorImage; int x, y; char *dstPtr; - int pixelCount; - int scanlinePad; int wordAlignedWidth; int imageSize; unsigned char *maskPixels; @@ -332,8 +329,6 @@ int scanlineWidth; HBITMAP colorDIB; - jsize pixelsLen = width * height; - memset(&bitmapInfo, 0, sizeof(BITMAPINFO)); bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bitmapInfo.bmiHeader.biWidth = width; @@ -343,7 +338,7 @@ bitmapInfo.bmiHeader.biCompression = BI_RGB; colorDIB = CreateDIBSection(GetDC(NULL), (BITMAPINFO*)&(bitmapInfo), - DIB_RGB_COLORS, (void**)&(ptrCursorImage), NULL, 0); + DIB_RGB_COLORS, (void*)&(ptrCursorImage), NULL, 0); if (!ptrCursorImage) { throwException(env, "Could not allocate DIB section."); } @@ -435,7 +430,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetWindowIcon16 (JNIEnv *env, jclass clazz, jobject iconBuffer) { - int *imgData = (int *)(*env)->GetDirectBufferAddress(env, iconBuffer); + jint *imgData = (jint *)(*env)->GetDirectBufferAddress(env, iconBuffer); freeSmallIcon(); small_icon = createWindowIcon(env, imgData, 16, 16); @@ -453,7 +448,7 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetWindowIcon32 (JNIEnv *env, jclass clazz, jobject iconBuffer) { - int *imgData = (int *)(*env)->GetDirectBufferAddress(env, iconBuffer); + jint *imgData = (jint *)(*env)->GetDirectBufferAddress(env, iconBuffer); freeLargeIcon(); large_icon = createWindowIcon(env, imgData, 32, 32); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 20:26:13
|
Revision: 2523 Author: elias_naur Date: 2006-07-15 13:25:56 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2523&view=rev Log Message: ----------- Windows: Don't use a non-portable anonymous struct in contex.h Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java trunk/LWJGL/src/native/windows/context.h trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c Modified: trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java 2006-07-15 19:55:42 UTC (rev 2522) +++ trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java 2006-07-15 20:25:56 UTC (rev 2523) @@ -69,7 +69,6 @@ System.out.println("Info about current:"); System.out.println("Graphics card: " + Display.getAdapter() + ", version: " + Display.getVersion()); -System.exit(1); System.out.println("Resolution: " + Display.getDisplayMode().getWidth() + "x" + Display.getDisplayMode().getHeight() + "x" + Modified: trunk/LWJGL/src/native/windows/context.h =================================================================== --- trunk/LWJGL/src/native/windows/context.h 2006-07-15 19:55:42 UTC (rev 2522) +++ trunk/LWJGL/src/native/windows/context.h 2006-07-15 20:25:56 UTC (rev 2523) @@ -55,7 +55,7 @@ // created the pbuffer WGLExtensions extensions; } pbuffer; - }; + } u; HDC format_hdc; HDC drawable_hdc; } WindowsPeerInfo; Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-07-15 19:55:42 UTC (rev 2522) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-07-15 20:25:56 UTC (rev 2523) @@ -166,23 +166,23 @@ return; } peer_info->format_hdc = Pbuffer_dc; - peer_info->pbuffer.extensions = extensions; - peer_info->pbuffer.pbuffer = Pbuffer; + peer_info->u.pbuffer.extensions = extensions; + peer_info->u.pbuffer.pbuffer = Pbuffer; peer_info->drawable_hdc = Pbuffer_dc; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nDestroy (JNIEnv *env, jclass clazz, jobject peer_info_handle) { WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); - peer_info->pbuffer.extensions.wglReleasePbufferDCARB(peer_info->pbuffer.pbuffer, peer_info->drawable_hdc); - peer_info->pbuffer.extensions.wglDestroyPbufferARB(peer_info->pbuffer.pbuffer); + peer_info->u.pbuffer.extensions.wglReleasePbufferDCARB(peer_info->u.pbuffer.pbuffer, peer_info->drawable_hdc); + peer_info->u.pbuffer.extensions.wglDestroyPbufferARB(peer_info->u.pbuffer.pbuffer); } JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nIsBufferLost (JNIEnv *env, jclass clazz, jobject peer_info_handle) { WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); BOOL buffer_lost; - peer_info->pbuffer.extensions.wglQueryPbufferARB(peer_info->pbuffer.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost); + peer_info->u.pbuffer.extensions.wglQueryPbufferARB(peer_info->u.pbuffer.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost); return buffer_lost ? JNI_TRUE : JNI_FALSE; } @@ -195,17 +195,17 @@ attribs[1] = value; attribs[2] = 0; - peer_info->pbuffer.extensions.wglSetPbufferAttribARB(peer_info->pbuffer.pbuffer, attribs); + peer_info->u.pbuffer.extensions.wglSetPbufferAttribARB(peer_info->u.pbuffer.pbuffer, attribs); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nBindTexImageToPbuffer (JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) { WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); - peer_info->pbuffer.extensions.wglBindTexImageARB(peer_info->pbuffer.pbuffer, buffer); + peer_info->u.pbuffer.extensions.wglBindTexImageARB(peer_info->u.pbuffer.pbuffer, buffer); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nReleaseTexImageFromPbuffer (JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) { WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); - peer_info->pbuffer.extensions.wglReleaseTexImageARB(peer_info->pbuffer.pbuffer, buffer); + peer_info->u.pbuffer.extensions.wglReleaseTexImageARB(peer_info->u.pbuffer.pbuffer, buffer); } Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c 2006-07-15 19:55:42 UTC (rev 2522) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c 2006-07-15 20:25:56 UTC (rev 2523) @@ -50,7 +50,7 @@ WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); AWTSurfaceLock *surface = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); JAWT_Win32DrawingSurfaceInfo *win32_dsi = (JAWT_Win32DrawingSurfaceInfo *)surface->dsi->platformInfo; - peer_info->format_hwnd = win32_dsi->hwnd; + peer_info->u.format_hwnd = win32_dsi->hwnd; peer_info->format_hdc = win32_dsi->hdc; peer_info->drawable_hdc = win32_dsi->hdc; } Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c 2006-07-15 19:55:42 UTC (rev 2522) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c 2006-07-15 20:25:56 UTC (rev 2523) @@ -53,14 +53,14 @@ return; } dummy_hdc = GetDC(dummy_hwnd); - peer_info->format_hwnd = dummy_hwnd; + peer_info->u.format_hwnd = dummy_hwnd; peer_info->format_hdc = dummy_hdc; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplayPeerInfo_nDestroy (JNIEnv *env, jclass clazz, jobject peer_info_handle) { WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); - closeWindow(&peer_info->format_hwnd, &peer_info->format_hdc); + closeWindow(&peer_info->u.format_hwnd, &peer_info->format_hdc); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplayPeerInfo_nInitDC This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 19:55:50
|
Revision: 2522 Author: elias_naur Date: 2006-07-15 12:55:42 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2522&view=rev Log Message: ----------- Windows: Cleanup Modified Paths: -------------- trunk/LWJGL/src/native/windows/display.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c Modified: trunk/LWJGL/src/native/windows/display.c =================================================================== --- trunk/LWJGL/src/native/windows/display.c 2006-07-15 19:45:36 UTC (rev 2521) +++ trunk/LWJGL/src/native/windows/display.c 2006-07-15 19:55:42 UTC (rev 2522) @@ -269,7 +269,7 @@ VS_FIXEDFILEINFO * fxdFileInfo; UINT uiLen = 0; - bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), &fxdFileInfo, &uiLen); + bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), (void *)&fxdFileInfo, &uiLen); if (bRetval != 0) ret = (*env)->NewObject(env, version_class, version_cons, fxdFileInfo->dwProductVersionMS, fxdFileInfo->dwProductVersionLS); } Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-07-15 19:45:36 UTC (rev 2521) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Pbuffer.c 2006-07-15 19:55:42 UTC (rev 2522) @@ -128,11 +128,8 @@ int origin_x = 0; int origin_y = 0; HWND dummy_hwnd; HDC dummy_hdc; - HGLRC dummy_context; HPBUFFERARB Pbuffer; HDC Pbuffer_dc; - HDC saved_hdc; - HGLRC saved_context; WGLExtensions extensions; const int *pBufferAttribs_ptr; WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 19:45:57
|
Revision: 2521 Author: elias_naur Date: 2006-07-15 12:45:36 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2521&view=rev Log Message: ----------- Windows: Moved NativeSysImplementation.java to WindowsSysImplementation.java and moved some native code to java. Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java Removed Paths: ------------- trunk/LWJGL/src/java/org/lwjgl/NativeSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/Win32SysImplementation.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2006-07-15 19:25:13 UTC (rev 2520) +++ trunk/LWJGL/build.xml 2006-07-15 19:45:36 UTC (rev 2521) @@ -514,7 +514,7 @@ <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" /> <class name="org.lwjgl.opengl.WindowsDisplay" /> <class name="org.lwjgl.opengl.WindowsRegistry" /> - <class name="org.lwjgl.NativeSysImplementation" /> + <class name="org.lwjgl.WindowsSysImplementation" /> <class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo" /> <class name="org.lwjgl.opengl.WindowsPeerInfo" /> <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo" /> Deleted: trunk/LWJGL/src/java/org/lwjgl/NativeSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/NativeSysImplementation.java 2006-07-15 19:25:13 UTC (rev 2520) +++ trunk/LWJGL/src/java/org/lwjgl/NativeSysImplementation.java 2006-07-15 19:45:36 UTC (rev 2521) @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2002-2004 LWJGL Project - * 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 'LWJGL' 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; - -/** - * A SysImplementation that uses native calls only. - * <p> - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -class NativeSysImplementation extends DefaultSysImplementation { - - static { - Sys.initialize(); - } - - public native long getTimerResolution(); - - public native long getTime(); - - public native void alert(String title, String message); - - public native boolean openURL(String url); - - public native String getClipboard(); -} Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-15 19:25:13 UTC (rev 2520) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-15 19:45:36 UTC (rev 2521) @@ -57,7 +57,7 @@ private static final String VERSION = "1.0beta2"; /** Current version of the JNI library */ - static final int JNI_VERSION = 2; + static final int JNI_VERSION = 3; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; @@ -114,7 +114,7 @@ class_name = "org.lwjgl.LinuxSysImplementation"; break; case LWJGLUtil.PLATFORM_WINDOWS: - class_name = "org.lwjgl.Win32SysImplementation"; + class_name = "org.lwjgl.WindowsSysImplementation"; break; case LWJGLUtil.PLATFORM_MACOSX: class_name = "org.lwjgl.MacOSXSysImplementation"; Deleted: trunk/LWJGL/src/java/org/lwjgl/Win32SysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Win32SysImplementation.java 2006-07-15 19:25:13 UTC (rev 2520) +++ trunk/LWJGL/src/java/org/lwjgl/Win32SysImplementation.java 2006-07-15 19:45:36 UTC (rev 2521) @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2002-2004 LWJGL Project - * 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 'LWJGL' 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; - -/** - * <p> - * Win32 SysImplementation. This is just a straightforward NativsSysImplementation. - * </p> - * @author $Author$ - * @version $Revision$ - * $Id$ - */ -class Win32SysImplementation extends NativeSysImplementation { -} Copied: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java (from rev 2520, trunk/LWJGL/src/java/org/lwjgl/NativeSysImplementation.java) =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2006-07-15 19:45:36 UTC (rev 2521) @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * 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 'LWJGL' 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; + +import java.security.AccessController; +import java.security.PrivilegedExceptionAction; +import java.security.PrivilegedActionException; + +/** + * <p> + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +class WindowsSysImplementation extends DefaultSysImplementation { + static { + Sys.initialize(); + } + + public long getTimerResolution() { + return 1000; + } + + public native long getTime(); + + public native void alert(String title, String message); + + public boolean openURL(final String url) { + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + Runtime.getRuntime().exec(new String[]{"rundll32", "url.dll,FileProtocolHandler", url}); + return null; + } + }); + return true; + } catch (PrivilegedActionException e) { + LWJGLUtil.log("Failed to open url (" + url + "): " + e.getCause().getMessage()); + return false; + } + } + + public native String getClipboard(); +} Modified: trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java 2006-07-15 19:25:13 UTC (rev 2520) +++ trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java 2006-07-15 19:45:36 UTC (rev 2521) @@ -69,6 +69,7 @@ System.out.println("Info about current:"); System.out.println("Graphics card: " + Display.getAdapter() + ", version: " + Display.getVersion()); +System.exit(1); System.out.println("Resolution: " + Display.getDisplayMode().getWidth() + "x" + Display.getDisplayMode().getHeight() + "x" + Modified: trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2006-07-15 19:25:13 UTC (rev 2520) +++ trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2006-07-15 19:45:36 UTC (rev 2521) @@ -41,48 +41,21 @@ #include "Window.h" #include "mmsystem.h" -#include "org_lwjgl_NativeSysImplementation.h" +#include "org_lwjgl_WindowsSysImplementation.h" #include "common_tools.h" #include <malloc.h> -/* - * Class: org_lwjgl_Sys - * Method: getTimerResolution - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_NativeSysImplementation_getTimerResolution - (JNIEnv * env, jobject ignored) -{ - return (jlong) 1000L; -} - -/* - * Class: org_lwjgl_Sys - * Method: ngetTime - * Signature: ()J - */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_NativeSysImplementation_getTime - (JNIEnv * env, jobject ignored) -{ - - MMRESULT result; +JNIEXPORT jlong JNICALL Java_org_lwjgl_WindowsSysImplementation_getTime(JNIEnv * env, jobject ignored) { DWORD time; - result = timeBeginPeriod(1); + timeBeginPeriod(1); time = timeGetTime(); - result = timeEndPeriod(1); + timeEndPeriod(1); return time; } -/* - * Class: org_lwjgl_Sys - * Method: alert - * Signature: (Ljava/lang/String;Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_NativeSysImplementation_alert - (JNIEnv * env, jobject ignored, jstring title, jstring message) -{ +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_alert(JNIEnv * env, jobject ignored, jstring title, jstring message) { char * eMessageText = GetStringNativeChars(env, message); char * cTitleBarText = GetStringNativeChars(env, title); MessageBox(getCurrentHWND(), eMessageText, cTitleBarText, MB_OK | MB_TOPMOST); @@ -93,56 +66,7 @@ free(cTitleBarText); } -/* - * Class: org_lwjgl_Sys - * Method: openURL - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_NativeSysImplementation_openURL - (JNIEnv * env, jobject ignored, jstring url) -{ -#define BUFFER_SIZE 1024 - const char *std_args = "rundll32 url.dll,FileProtocolHandler "; - STARTUPINFO si; - PROCESS_INFORMATION pi; - - char * urlString = GetStringNativeChars(env, url); - - char command[BUFFER_SIZE]; - strncpy_s(command, BUFFER_SIZE, "", 1); - strncat_s(command, BUFFER_SIZE, std_args, _TRUNCATE); - strncat_s(command, BUFFER_SIZE, urlString, _TRUNCATE); - free(urlString); - - ZeroMemory( &si, sizeof(si) ); - si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - - // Start the child process. - if( !CreateProcess( NULL, // No module name (use command line). - command, // Command line. - NULL, // Process handle not inheritable. - NULL, // Thread handle not inheritable. - FALSE, // Set handle inheritance to FALSE. - 0, // No creation flags. - NULL, // Use parent's environment block. - NULL, // Use parent's starting directory. - &si, // Pointer to STARTUPINFO structure. - &pi ) // Pointer to PROCESS_INFORMATION structure. - ) - { - printfDebugJava(env, "Failed to open URL %s", urlString); - return JNI_FALSE; - } - - // Close process and thread handles. - CloseHandle( pi.hProcess ); - CloseHandle( pi.hThread ); - - return JNI_TRUE; -} - -JNIEXPORT jstring JNICALL Java_org_lwjgl_NativeSysImplementation_getClipboard +JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_getClipboard (JNIEnv * env, jobject ignored) { // Check to see if there's text available in the clipboard This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 19:25:32
|
Revision: 2520 Author: elias_naur Date: 2006-07-15 12:25:13 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2520&view=rev Log Message: ----------- Windows: Move more of Display.getVersion to java Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java trunk/LWJGL/src/native/windows/display.c trunk/LWJGL/src/native/windows/display.h trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsFileVersion.java Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-15 18:45:20 UTC (rev 2519) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2006-07-15 19:25:13 UTC (rev 2520) @@ -57,7 +57,7 @@ private static final String VERSION = "1.0beta2"; /** Current version of the JNI library */ - static final int JNI_VERSION = 1; + static final int JNI_VERSION = 2; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2006-07-15 18:45:20 UTC (rev 2519) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2006-07-15 19:25:13 UTC (rev 2520) @@ -248,12 +248,13 @@ public String getVersion() { String driver = getAdapter(); - if (driver != null) - return nGetVersion(driver); - else + if (driver != null) { + WindowsFileVersion version = nGetVersion(driver + ".dll"); + return version.toString(); + } else return null; } - private native String nGetVersion(String driver); + private native WindowsFileVersion nGetVersion(String driver); public DisplayMode init() throws LWJGLException { current_gamma = saved_gamma = getCurrentGammaRamp(); Copied: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsFileVersion.java (from rev 2514, trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsRegistry.java) =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsFileVersion.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsFileVersion.java 2006-07-15 19:25:13 UTC (rev 2520) @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2004 LWJGL Project + * 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 'LWJGL' 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; + +/** + * @author elias_naur + */ + +final class WindowsFileVersion { + private final int product_version_ms; + private final int product_version_ls; + + public WindowsFileVersion(int product_version_ms, int product_version_ls) { + this.product_version_ms = product_version_ms; + this.product_version_ls = product_version_ls; + } + + public String toString() { + int f1 = (product_version_ms >> 16) & 0xFFFF; + int f2 = product_version_ms & 0xFFFF; + int f3 = (product_version_ls >> 16) & 0xFFFF; + int f4 = product_version_ls & 0xFFFF; + return f1 + "." + f2 + "." + f3 + "." + f4; + } +} Modified: trunk/LWJGL/src/native/windows/display.c =================================================================== --- trunk/LWJGL/src/native/windows/display.c 2006-07-15 18:45:20 UTC (rev 2519) +++ trunk/LWJGL/src/native/windows/display.c 2006-07-15 19:25:13 UTC (rev 2520) @@ -241,17 +241,23 @@ ChangeDisplaySettings(NULL, 0); } -jstring getVersion(JNIEnv * env, char *driver) +jobject getVersion(JNIEnv * env, char *driver) { -#define BUFFER_SIZE 1024 - jstring ret = NULL; - - const char *dll_ext = ".dll"; DWORD var = 0; DWORD dwInfoSize; LPVOID lpInfoBuff; BOOL bRetval; + jclass version_class; + jmethodID version_cons; + jobject ret = NULL; + version_class = (*env)->FindClass(env, "org/lwjgl/opengl/WindowsFileVersion"); + if (version_class == NULL) + return NULL; + version_cons = (*env)->GetMethodID(env, version_class, "<init>", "(II)V"); + if (version_cons == NULL) + return NULL; + dwInfoSize = GetFileVersionInfoSize(driver, &var); lpInfoBuff = malloc(dwInfoSize); if (lpInfoBuff == NULL) { @@ -259,20 +265,13 @@ return NULL; } bRetval = GetFileVersionInfo(driver, 0, dwInfoSize, lpInfoBuff); - if (bRetval == 0) { - } else { + if (bRetval != 0) { VS_FIXEDFILEINFO * fxdFileInfo; UINT uiLen = 0; - bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), (void *)&fxdFileInfo, &uiLen); - if (bRetval != 0) { - TCHAR version[BUFFER_SIZE]; - TCHAR ms[BUFFER_SIZE], ls[BUFFER_SIZE]; - _snprintf_s(ms, BUFFER_SIZE, _TRUNCATE, "%d.%d\0", fxdFileInfo->dwProductVersionMS >> 16, fxdFileInfo->dwProductVersionMS & 0xFFFF); - _snprintf_s(ls, BUFFER_SIZE, _TRUNCATE, "%d.%d\0", fxdFileInfo->dwProductVersionLS >> 16, fxdFileInfo->dwProductVersionLS & 0xFFFF); - _snprintf_s(version, BUFFER_SIZE, _TRUNCATE, "%s.%s\0", ms, ls); - ret = NewStringNative(env, version); - } + bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), &fxdFileInfo, &uiLen); + if (bRetval != 0) + ret = (*env)->NewObject(env, version_class, version_cons, fxdFileInfo->dwProductVersionMS, fxdFileInfo->dwProductVersionLS); } free(lpInfoBuff); Modified: trunk/LWJGL/src/native/windows/display.h =================================================================== --- trunk/LWJGL/src/native/windows/display.h 2006-07-15 18:45:20 UTC (rev 2519) +++ trunk/LWJGL/src/native/windows/display.h 2006-07-15 19:25:13 UTC (rev 2520) @@ -51,7 +51,7 @@ extern void setGammaRamp(JNIEnv * env, jobject gammaRampBuffer); extern jobject getCurrentGammaRamp(JNIEnv *env); extern jobject getCurrentDisplayMode(JNIEnv * env); -extern jstring getVersion(JNIEnv * env, char *driver); +extern jobject getVersion(JNIEnv * env, char *driver); extern jobject convertToNativeRamp(JNIEnv *env, jobject float_gamma_obj); #endif Modified: trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2006-07-15 18:45:20 UTC (rev 2519) +++ trunk/LWJGL/src/native/windows/org_lwjgl_opengl_Display.c 2006-07-15 19:25:13 UTC (rev 2520) @@ -275,7 +275,7 @@ SetFocus(hwnd); } -JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetVersion(JNIEnv *env, jobject self, jstring driver) { +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetVersion(JNIEnv *env, jobject self, jstring driver) { char *driver_str; jstring result; driver_str = GetStringNativeChars(env, driver); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 18:45:27
|
Revision: 2519 Author: elias_naur Date: 2006-07-15 11:45:20 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2519&view=rev Log Message: ----------- Windows: Added NULL check to malloc in display.c Modified Paths: -------------- trunk/LWJGL/src/native/windows/display.c Modified: trunk/LWJGL/src/native/windows/display.c =================================================================== --- trunk/LWJGL/src/native/windows/display.c 2006-07-15 18:43:04 UTC (rev 2518) +++ trunk/LWJGL/src/native/windows/display.c 2006-07-15 18:45:20 UTC (rev 2519) @@ -254,6 +254,10 @@ dwInfoSize = GetFileVersionInfoSize(driver, &var); lpInfoBuff = malloc(dwInfoSize); + if (lpInfoBuff == NULL) { + throwException(env, "Failed to allocate lpInfoBuff"); + return NULL; + } bRetval = GetFileVersionInfo(driver, 0, dwInfoSize, lpInfoBuff); if (bRetval == 0) { } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 18:43:11
|
Revision: 2518 Author: elias_naur Date: 2006-07-15 11:43:04 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2518&view=rev Log Message: ----------- Windows: Forgot display.c in last commit Modified Paths: -------------- trunk/LWJGL/src/native/windows/display.c Modified: trunk/LWJGL/src/native/windows/display.c =================================================================== --- trunk/LWJGL/src/native/windows/display.c 2006-07-15 18:36:46 UTC (rev 2517) +++ trunk/LWJGL/src/native/windows/display.c 2006-07-15 18:43:04 UTC (rev 2518) @@ -247,26 +247,20 @@ jstring ret = NULL; const char *dll_ext = ".dll"; - TCHAR driverDLL[BUFFER_SIZE] = "\0"; DWORD var = 0; DWORD dwInfoSize; LPVOID lpInfoBuff; BOOL bRetval; - if (driver == NULL) { - return NULL; - } - strncat_s(driverDLL, BUFFER_SIZE, driver, strlen(driver)); - strncat_s(driverDLL, BUFFER_SIZE, dll_ext, strlen(dll_ext)); - dwInfoSize = GetFileVersionInfoSize(driverDLL, &var); + dwInfoSize = GetFileVersionInfoSize(driver, &var); lpInfoBuff = malloc(dwInfoSize); - bRetval = GetFileVersionInfo(driverDLL, 0, dwInfoSize, lpInfoBuff); + bRetval = GetFileVersionInfo(driver, 0, dwInfoSize, lpInfoBuff); if (bRetval == 0) { } else { VS_FIXEDFILEINFO * fxdFileInfo; UINT uiLen = 0; - bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), (void **) &fxdFileInfo, &uiLen); + bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), (void *)&fxdFileInfo, &uiLen); if (bRetval != 0) { TCHAR version[BUFFER_SIZE]; TCHAR ms[BUFFER_SIZE], ls[BUFFER_SIZE]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 18:37:17
|
Revision: 2517 Author: elias_naur Date: 2006-07-15 11:36:46 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2517&view=rev Log Message: ----------- Fixed SysTest.java Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/test/SysTest.java Modified: trunk/LWJGL/src/java/org/lwjgl/test/SysTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/SysTest.java 2006-07-15 18:31:09 UTC (rev 2516) +++ trunk/LWJGL/src/java/org/lwjgl/test/SysTest.java 2006-07-15 18:36:46 UTC (rev 2517) @@ -100,9 +100,9 @@ pause(2000); - time = Sys.getTime(); - System.out.println("Current time: " + time); - System.out.println("Actually slept for: " + (time / (float) resolution) + " seconds"); + long time2 = Sys.getTime(); + System.out.println("Current time: " + time2); + System.out.println("Actually slept for: " + ((time2 - time) / (float) resolution) + " seconds"); System.out.println("---- Test Timer ----\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 18:31:16
|
Revision: 2516 Author: elias_naur Date: 2006-07-15 11:31:09 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2516&view=rev Log Message: ----------- Windows: Don't release clipboard data before use Modified Paths: -------------- trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c Modified: trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2006-07-15 17:44:53 UTC (rev 2515) +++ trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2006-07-15 18:31:09 UTC (rev 2516) @@ -142,43 +142,50 @@ return JNI_TRUE; } -const void * getClipboard(int type) -{ - - void * ret; - HANDLE hglb; - // Open the clipboard - if (!OpenClipboard(NULL)) - return NULL; - - hglb = GetClipboardData(type); - if (hglb != NULL) { - ret = GlobalLock(hglb); - if (ret != NULL) { - GlobalUnlock(hglb); - } - } - - // Close the clipboard now we're done - CloseClipboard(); - - return ret; - -} - JNIEXPORT jstring JNICALL Java_org_lwjgl_NativeSysImplementation_getClipboard (JNIEnv * env, jobject ignored) { // Check to see if there's text available in the clipboard BOOL textAvailable = IsClipboardFormatAvailable(CF_TEXT); BOOL unicodeAvailable = IsClipboardFormatAvailable(CF_UNICODETEXT); + void *clipboard_data; + jstring ret; + HANDLE hglb; + const wchar_t * str; if (unicodeAvailable) { - const wchar_t * str = (const wchar_t *) getClipboard(CF_UNICODETEXT); - return (*env)->NewString(env, str, wcslen(str)); + if (!OpenClipboard(NULL)) + return NULL; + hglb = GetClipboardData(CF_UNICODETEXT); + if (hglb == NULL) { + CloseClipboard(); + return NULL; + } + clipboard_data = GlobalLock(hglb); + if (clipboard_data == NULL) { + CloseClipboard(); + return NULL; + } + str = (const wchar_t *)clipboard_data; + ret = (*env)->NewString(env, str, wcslen(str)); } else if (textAvailable) { - return NewStringNative(env, (const char *) getClipboard(CF_TEXT)); + if (!OpenClipboard(NULL)) + return NULL; + hglb = GetClipboardData(CF_TEXT); + if (hglb == NULL) { + CloseClipboard(); + return NULL; + } + clipboard_data = GlobalLock(hglb); + if (clipboard_data == NULL) { + CloseClipboard(); + return NULL; + } + ret = NewStringNative(env, (const char *) clipboard_data); } else { return NULL; } + GlobalUnlock(hglb); + CloseClipboard(); + return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <eli...@us...> - 2006-07-15 17:45:30
|
Revision: 2515 Author: elias_naur Date: 2006-07-15 10:44:53 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/java-game-lib/?rev=2515&view=rev Log Message: ----------- Windows: Removed unused variable from display.c Modified Paths: -------------- trunk/LWJGL/src/native/windows/display.c Modified: trunk/LWJGL/src/native/windows/display.c =================================================================== --- trunk/LWJGL/src/native/windows/display.c 2006-07-14 16:14:52 UTC (rev 2514) +++ trunk/LWJGL/src/native/windows/display.c 2006-07-15 17:44:53 UTC (rev 2515) @@ -206,7 +206,6 @@ int i; float scaledRampEntry; WORD rampEntry; - HDC screenDC; const float *gammaRamp = (const float *)(*env)->GetDirectBufferAddress(env, float_gamma_obj); jint gamma_ramp_length = (*env)->GetDirectBufferCapacity(env, float_gamma_obj); jobject native_ramp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |