From: <sp...@us...> - 2010-04-09 23:57:47
|
Revision: 3316 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3316&view=rev Author: spasi Date: 2010-04-09 23:57:40 +0000 (Fri, 09 Apr 2010) Log Message: ----------- Added @NoErrorCheck on vertex data methods. The debug build will now track Begin/End pairs and never call GetError inside them. Modified Paths: -------------- trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/platform_build/build-generator.xml 2010-04-09 23:57:40 UTC (rev 3316) @@ -22,7 +22,7 @@ <!-- Proxy target to generate it all --> <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/> - <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/> + <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references" description="Generates java and native source"/> <!-- Generate OpenAL --> <target name="generate-openal" depends="generators" description="Generates java and native source for AL"> @@ -96,7 +96,7 @@ </apply> </target> - <!-- Generate context capabilities --> + <!-- Generate references --> <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> <arg value="-nocompile"/> @@ -110,7 +110,7 @@ </apply> </target> - <!-- Generate context capabilities --> + <!-- Generate context capabilities --> <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> <arg value="-nocompile"/> @@ -124,4 +124,20 @@ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> </target> + + <!-- Generate context capabilities [DEBUG] --> + <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-Ageneratechecks"/> + <arg value="-Acontextspecific"/> + <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> + </apply> + </target> </project> Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -32,14 +32,28 @@ package org.lwjgl.opengl; final class StateTracker { - private final ReferencesStack references_stack; + private ReferencesStack references_stack; private final StateStack attrib_stack; + private boolean insideBeginEnd; + StateTracker() { - references_stack = new ReferencesStack(); attrib_stack = new StateStack(0); } + /** This is called after getting function addresses. */ + void init() { + references_stack = new ReferencesStack(); + } + + static void setBeginEnd(ContextCapabilities caps, boolean inside) { + caps.tracker.insideBeginEnd = inside; + } + + boolean isBeginEnd() { + return insideBeginEnd; + } + static void popAttrib(ContextCapabilities caps) { caps.tracker.doPopAttrib(); } Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -49,6 +49,8 @@ * */ public static void checkGLError() throws OpenGLException { + if ( ContextCapabilities.DEBUG && GLContext.getCapabilities().tracker.isBeginEnd() ) // Do not call GetError inside a Begin/End pair. + return; int err = GL11.glGetError(); if ( err != GL11.GL_NO_ERROR ) { throw new OpenGLException(err); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -59,9 +59,10 @@ private final static String EXTENSION_PREFIX = "GL_"; private final static String CORE_PREFIX = "Open"; - public static void generateClassPrologue(PrintWriter writer, boolean context_specific) { + public static void generateClassPrologue(PrintWriter writer, boolean context_specific, boolean generate_error_checks) { writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {"); - writer.println("\tfinal StateTracker tracker;"); + writer.println("\tstatic final boolean DEBUG = " + Boolean.toString(generate_error_checks) + ";"); + writer.println("\tfinal StateTracker tracker = new StateTracker();"); writer.println("\tfinal IntBuffer scratch_int_buffer = BufferUtils.createIntBuffer(16);"); writer.println(); if ( !context_specific ) { Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -74,7 +74,7 @@ } public Collection<String> supportedOptions() { - return unmodifiableCollection(Arrays.asList("-Acontextspecific")); + return unmodifiableCollection(Arrays.asList("-Acontextspecific", "-Ageneratechecks")); } public void roundComplete(RoundCompleteEvent event) { @@ -99,15 +99,16 @@ public void process() { Map<String, String> options = env.getOptions(); + boolean generate_error_checks = options.containsKey("-Ageneratechecks"); boolean context_specific = options.containsKey("-Acontextspecific"); try { - generateContextCapabilitiesSource(context_specific); + generateContextCapabilitiesSource(context_specific, generate_error_checks); } catch (IOException e) { throw new RuntimeException(e); } } - private void generateContextCapabilitiesSource(boolean context_specific) throws IOException { + private void generateContextCapabilitiesSource(boolean context_specific, boolean generate_error_checks) throws IOException { PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(Utils.CONTEXT_CAPS_CLASS_NAME + ".java"), null); writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); writer.println(); @@ -120,7 +121,7 @@ writer.println("import java.util.HashSet;"); writer.println("import java.nio.IntBuffer;"); writer.println(); - ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific); + ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific, generate_error_checks); DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class); Collection<TypeDeclaration> interface_decls = filter.filter(env.getSpecifiedTypeDeclarations()); for (TypeDeclaration typedecl : interface_decls) { @@ -179,7 +180,7 @@ if (Utils.isFinal(interface_decl)) ContextCapabilitiesGenerator.generateInitializer(writer, interface_decl); } - writer.println("\t\ttracker = new StateTracker();"); + writer.println("\t\ttracker.init();"); writer.println("\t}"); writer.println("}"); writer.close(); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -79,30 +79,43 @@ */ int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869; + @NoErrorCheck void glVertexAttrib1sARB(@GLuint int index, short x); + @NoErrorCheck void glVertexAttrib1fARB(@GLuint int index, float x); + @NoErrorCheck void glVertexAttrib1dARB(@GLuint int index, double x); + @NoErrorCheck void glVertexAttrib2sARB(@GLuint int index, short x, short y); + @NoErrorCheck void glVertexAttrib2fARB(@GLuint int index, float x, float y); + @NoErrorCheck void glVertexAttrib2dARB(@GLuint int index, double x, double y); + @NoErrorCheck void glVertexAttrib3sARB(@GLuint int index, short x, short y, short z); + @NoErrorCheck void glVertexAttrib3fARB(@GLuint int index, float x, float y, float z); + @NoErrorCheck void glVertexAttrib3dARB(@GLuint int index, double x, double y, double z); + @NoErrorCheck void glVertexAttrib4sARB(@GLuint int index, short x, short y, short z, short w); + @NoErrorCheck void glVertexAttrib4fARB(@GLuint int index, float x, float y, float z, float w); + @NoErrorCheck void glVertexAttrib4dARB(@GLuint int index, double x, double y, double z, double w); + @NoErrorCheck void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -87,30 +87,43 @@ int GL_FLOAT_MAT3_ARB = 0x8B5B; int GL_FLOAT_MAT4_ARB = 0x8B5C; + @NoErrorCheck void glVertexAttrib1sARB(@GLuint int index, short v0); + @NoErrorCheck void glVertexAttrib1fARB(@GLuint int index, float v0); + @NoErrorCheck void glVertexAttrib1dARB(@GLuint int index, double v0); + @NoErrorCheck void glVertexAttrib2sARB(@GLuint int index, short v0, short v1); + @NoErrorCheck void glVertexAttrib2fARB(@GLuint int index, float v0, float v1); + @NoErrorCheck void glVertexAttrib2dARB(@GLuint int index, double v0, double v1); + @NoErrorCheck void glVertexAttrib3sARB(@GLuint int index, short v0, short v1, short v2); + @NoErrorCheck void glVertexAttrib3fARB(@GLuint int index, float v0, float v1, float v2); + @NoErrorCheck void glVertexAttrib3dARB(@GLuint int index, double v0, double v1, double v2); + @NoErrorCheck void glVertexAttrib4sARB(@GLuint int index, short v0, short v1, short v2, short v3); + @NoErrorCheck void glVertexAttrib4fARB(@GLuint int index, float v0, float v1, float v2, float v3); + @NoErrorCheck void glVertexAttrib4dARB(@GLuint int index, double v0, double v1, double v2, double v3); + @NoErrorCheck void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -47,98 +47,136 @@ int GL_UNSIGNED_INT_2_10_10_10_REV = GL12.GL_UNSIGNED_INT_2_10_10_10_REV; int GL_INT_2_10_10_10_REV = 0x8D9F; + @NoErrorCheck void glVertexP2ui(@GLenum int type, @GLuint int value); + @NoErrorCheck void glVertexP3ui(@GLenum int type, @GLuint int value); + @NoErrorCheck void glVertexP4ui(@GLenum int type, @GLuint int value); + @NoErrorCheck @StripPostfix("value") void glVertexP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer value); + @NoErrorCheck @StripPostfix("value") void glVertexP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer value); + @NoErrorCheck @StripPostfix("value") void glVertexP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer value); + @NoErrorCheck void glTexCoordP1ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck void glTexCoordP2ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck void glTexCoordP3ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck void glTexCoordP4ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @StripPostfix("coords") void glTexCoordP1uiv(@GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + @NoErrorCheck @StripPostfix("coords") void glTexCoordP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + @NoErrorCheck @StripPostfix("coords") void glTexCoordP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + @NoErrorCheck @StripPostfix("coords") void glTexCoordP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + @NoErrorCheck void glMultiTexCoordP1ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck void glMultiTexCoordP2ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck void glMultiTexCoordP3ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck void glMultiTexCoordP4ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck @StripPostfix("coords") void glMultiTexCoordP1uiv(@GLenum int texture, @GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + @NoErrorCheck @StripPostfix("coords") void glMultiTexCoordP2uiv(@GLenum int texture, @GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + @NoErrorCheck @StripPostfix("coords") void glMultiTexCoordP3uiv(@GLenum int texture, @GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + @NoErrorCheck @StripPostfix("coords") void glMultiTexCoordP4uiv(@GLenum int texture, @GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + @NoErrorCheck void glNormalP3ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @StripPostfix("coords") void glNormalP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + @NoErrorCheck void glColorP3ui(@GLenum int type, @GLuint int color); + @NoErrorCheck void glColorP4ui(@GLenum int type, @GLuint int color); + @NoErrorCheck @StripPostfix("color") void glColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + @NoErrorCheck @StripPostfix("color") void glColorP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer color); + @NoErrorCheck void glSecondaryColorP3ui(@GLenum int type, @GLuint int color); + @NoErrorCheck @StripPostfix("color") void glSecondaryColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + @NoErrorCheck void glVertexAttribP1ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck void glVertexAttribP2ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck void glVertexAttribP3ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck void glVertexAttribP4ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck @StripPostfix("value") void glVertexAttribP1uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("1") @Const @GLuint IntBuffer value); + @NoErrorCheck @StripPostfix("value") void glVertexAttribP2uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("2") @Const @GLuint IntBuffer value); + @NoErrorCheck @StripPostfix("value") void glVertexAttribP3uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("3") @Const @GLuint IntBuffer value); + @NoErrorCheck @StripPostfix("value") void glVertexAttribP4uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("4") @Const @GLuint IntBuffer value); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -45,38 +45,55 @@ int GL_VERTEX_STREAM6_ATI = 0x8773; int GL_VERTEX_STREAM7_ATI = 0x8774; + @NoErrorCheck void glVertexStream2fATI(@GLenum int stream, float x, float y); + @NoErrorCheck void glVertexStream2dATI(@GLenum int stream, double x, double y); + @NoErrorCheck void glVertexStream2iATI(@GLenum int stream, int x, int y); + @NoErrorCheck void glVertexStream2sATI(@GLenum int stream, short x, short y); + @NoErrorCheck void glVertexStream3fATI(@GLenum int stream, float x, float y, float z); + @NoErrorCheck void glVertexStream3dATI(@GLenum int stream, double x, double y, double z); + @NoErrorCheck void glVertexStream3iATI(@GLenum int stream, int x, int y, int z); + @NoErrorCheck void glVertexStream3sATI(@GLenum int stream, short x, short y, short z); + @NoErrorCheck void glVertexStream4fATI(@GLenum int stream, float x, float y, float z, float w); + @NoErrorCheck void glVertexStream4dATI(@GLenum int stream, double x, double y, double z, double w); + @NoErrorCheck void glVertexStream4iATI(@GLenum int stream, int x, int y, int z, int w); + @NoErrorCheck void glVertexStream4sATI(@GLenum int stream, short x, short y, short z, short w); + @NoErrorCheck void glNormalStream3bATI(@GLenum int stream, byte x, byte y, byte z); + @NoErrorCheck void glNormalStream3fATI(@GLenum int stream, float x, float y, float z); + @NoErrorCheck void glNormalStream3dATI(@GLenum int stream, double x, double y, double z); + @NoErrorCheck void glNormalStream3iATI(@GLenum int stream, int x, int y, int z); + @NoErrorCheck void glNormalStream3sATI(@GLenum int stream, short x, short y, short z); void glClientActiveVertexStreamATI(@GLenum int stream); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -83,55 +83,75 @@ int GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904; int GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905; + @NoErrorCheck void glVertexAttribI1iEXT(@GLuint int index, int x); + @NoErrorCheck void glVertexAttribI2iEXT(@GLuint int index, int x, int y); + @NoErrorCheck void glVertexAttribI3iEXT(@GLuint int index, int x, int y, int z); + @NoErrorCheck void glVertexAttribI4iEXT(@GLuint int index, int x, int y, int z, int w); + @NoErrorCheck void glVertexAttribI1uiEXT(@GLuint int index, @GLuint int x); + @NoErrorCheck void glVertexAttribI2uiEXT(@GLuint int index, @GLuint int x, @GLuint int y); + @NoErrorCheck void glVertexAttribI3uiEXT(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z); + @NoErrorCheck void glVertexAttribI4uiEXT(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI1ivEXT(@GLuint int index, @Check("1") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI2ivEXT(@GLuint int index, @Check("2") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI3ivEXT(@GLuint int index, @Check("3") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4ivEXT(@GLuint int index, @Check("4") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI1uivEXT(@GLuint int index, @Check("1") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI2uivEXT(@GLuint int index, @Check("2") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI3uivEXT(@GLuint int index, @Check("3") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4uivEXT(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4bvEXT(@GLuint int index, @Check("4") @Const ByteBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4svEXT(@GLuint int index, @Check("4") @Const ShortBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4ubvEXT(@GLuint int index, @Check("4") @Const @GLubyte ByteBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4usvEXT(@GLuint int index, @Check("4") @Const @GLushort ShortBuffer v); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -50,6 +50,7 @@ int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F; int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510; + @NoErrorCheck void glVertexWeightfEXT(float weight); void glVertexWeightPointerEXT(@GLsizei int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -764,9 +764,11 @@ @NoErrorCheck @DeprecatedGL + @Code("\t\tif ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, true);") void glBegin(@GLenum int mode); @DeprecatedGL + @Code("\t\tif ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, false);") void glEnd(); @NoErrorCheck Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -296,30 +296,43 @@ // ----------------------[ ARB_vertex_program ]---------------------- // ------------------------------------------------------------------ + @NoErrorCheck void glVertexAttrib1s(@GLuint int index, short x); + @NoErrorCheck void glVertexAttrib1f(@GLuint int index, float x); + @NoErrorCheck void glVertexAttrib1d(@GLuint int index, double x); + @NoErrorCheck void glVertexAttrib2s(@GLuint int index, short x, short y); + @NoErrorCheck void glVertexAttrib2f(@GLuint int index, float x, float y); + @NoErrorCheck void glVertexAttrib2d(@GLuint int index, double x, double y); + @NoErrorCheck void glVertexAttrib3s(@GLuint int index, short x, short y, short z); + @NoErrorCheck void glVertexAttrib3f(@GLuint int index, float x, float y, float z); + @NoErrorCheck void glVertexAttrib3d(@GLuint int index, double x, double y, double z); + @NoErrorCheck void glVertexAttrib4s(@GLuint int index, short x, short y, short z, short w); + @NoErrorCheck void glVertexAttrib4f(@GLuint int index, float x, float y, float z, float w); + @NoErrorCheck void glVertexAttrib4d(@GLuint int index, double x, double y, double z, double w); + @NoErrorCheck void glVertexAttrib4Nub(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); void glVertexAttribPointer(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -129,55 +129,75 @@ int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904; int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; + @NoErrorCheck void glVertexAttribI1i(@GLuint int index, int x); + @NoErrorCheck void glVertexAttribI2i(@GLuint int index, int x, int y); + @NoErrorCheck void glVertexAttribI3i(@GLuint int index, int x, int y, int z); + @NoErrorCheck void glVertexAttribI4i(@GLuint int index, int x, int y, int z, int w); + @NoErrorCheck void glVertexAttribI1ui(@GLuint int index, @GLuint int x); + @NoErrorCheck void glVertexAttribI2ui(@GLuint int index, @GLuint int x, @GLuint int y); + @NoErrorCheck void glVertexAttribI3ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z); + @NoErrorCheck void glVertexAttribI4ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI1iv(@GLuint int index, @Check("1") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI2iv(@GLuint int index, @Check("2") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI3iv(@GLuint int index, @Check("3") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4iv(@GLuint int index, @Check("4") @Const IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI1uiv(@GLuint int index, @Check("1") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI2uiv(@GLuint int index, @Check("2") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI3uiv(@GLuint int index, @Check("3") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4uiv(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4bv(@GLuint int index, @Check("4") @Const ByteBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4sv(@GLuint int index, @Check("4") @Const ShortBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4ubv(@GLuint int index, @Check("4") @Const @GLubyte ByteBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribI4usv(@GLuint int index, @Check("4") @Const @GLushort ShortBuffer v); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -244,135 +244,173 @@ */ int GL_INT_2_10_10_10_REV = 0x8D9F; + @NoErrorCheck @DeprecatedGL void glVertexP2ui(@GLenum int type, @GLuint int value); + @NoErrorCheck @DeprecatedGL void glVertexP3ui(@GLenum int type, @GLuint int value); + @NoErrorCheck @DeprecatedGL void glVertexP4ui(@GLenum int type, @GLuint int value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer value); + @NoErrorCheck @DeprecatedGL void glTexCoordP1ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL void glTexCoordP2ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL void glTexCoordP3ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL void glTexCoordP4ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glTexCoordP1uiv(@GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glTexCoordP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glTexCoordP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glTexCoordP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL void glMultiTexCoordP1ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL void glMultiTexCoordP2ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL void glMultiTexCoordP3ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL void glMultiTexCoordP4ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glMultiTexCoordP1uiv(@GLenum int texture, @GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glMultiTexCoordP2uiv(@GLenum int texture, @GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glMultiTexCoordP3uiv(@GLenum int texture, @GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glMultiTexCoordP4uiv(@GLenum int texture, @GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL void glNormalP3ui(@GLenum int type, @GLuint int coords); + @NoErrorCheck @DeprecatedGL @StripPostfix("coords") void glNormalP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + @NoErrorCheck @DeprecatedGL void glColorP3ui(@GLenum int type, @GLuint int color); + @NoErrorCheck @DeprecatedGL void glColorP4ui(@GLenum int type, @GLuint int color); + @NoErrorCheck @DeprecatedGL @StripPostfix("color") void glColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + @NoErrorCheck @DeprecatedGL @StripPostfix("color") void glColorP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer color); + @NoErrorCheck @DeprecatedGL void glSecondaryColorP3ui(@GLenum int type, @GLuint int color); + @NoErrorCheck @DeprecatedGL @StripPostfix("color") void glSecondaryColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + @NoErrorCheck @DeprecatedGL void glVertexAttribP1ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck @DeprecatedGL void glVertexAttribP2ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck @DeprecatedGL void glVertexAttribP3ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck @DeprecatedGL void glVertexAttribP4ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexAttribP1uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("1") @Const @GLuint IntBuffer value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexAttribP2uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("2") @Const @GLuint IntBuffer value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexAttribP3uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("3") @Const @GLuint IntBuffer value); + @NoErrorCheck @DeprecatedGL @StripPostfix("value") void glVertexAttribP4uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("4") @Const @GLuint IntBuffer value); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -46,66 +46,91 @@ */ int GL_HALF_FLOAT_NV = 0x140B; + @NoErrorCheck void glVertex2hNV(@GLhalf short x, @GLhalf short y); + @NoErrorCheck void glVertex3hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z); + @NoErrorCheck void glVertex4hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w); + @NoErrorCheck void glNormal3hNV(@GLhalf short nx, @GLhalf short ny, @GLhalf short nz); + @NoErrorCheck void glColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue); + @NoErrorCheck void glColor4hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue, @GLhalf short alpha); + @NoErrorCheck void glTexCoord1hNV(@GLhalf short s); + @NoErrorCheck void glTexCoord2hNV(@GLhalf short s, @GLhalf short t); + @NoErrorCheck void glTexCoord3hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r); + @NoErrorCheck void glTexCoord4hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q); + @NoErrorCheck void glMultiTexCoord1hNV(@GLenum int target, @GLhalf short s); + @NoErrorCheck void glMultiTexCoord2hNV(@GLenum int target, @GLhalf short s, @GLhalf short t); + @NoErrorCheck void glMultiTexCoord3hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r); + @NoErrorCheck void glMultiTexCoord4hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q); + @NoErrorCheck void glFogCoordhNV(@GLhalf short fog); + @NoErrorCheck void glSecondaryColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck void glVertexWeighthNV(@GLhalf short weight); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck void glVertexAttrib1hNV(@GLuint int index, @GLhalf short x); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck void glVertexAttrib2hNV(@GLuint int index, @GLhalf short x, @GLhalf short y); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck void glVertexAttrib3hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck void glVertexAttrib4hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck @StripPostfix("attribs") void glVertexAttribs1hvNV(@GLuint int index, @AutoSize("attribs") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck @StripPostfix("attribs") void glVertexAttribs2hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 1") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck @StripPostfix("attribs") void glVertexAttribs3hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " / 3") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); @Optional(reason = "AMD does not expose this (last driver checked: 10.3)") + @NoErrorCheck @StripPostfix("attribs") void glVertexAttribs4hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 2") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); } Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java 2010-04-08 22:53:45 UTC (rev 3315) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java 2010-04-09 23:57:40 UTC (rev 3316) @@ -241,65 +241,90 @@ @GLfloat @GLdouble Buffer buffer); + @NoErrorCheck void glVertexAttrib1sNV(@GLuint int index, short x); + @NoErrorCheck void glVertexAttrib1fNV(@GLuint int index, float x); + @NoErrorCheck void glVertexAttrib1dNV(@GLuint int index, double x); + @NoErrorCheck void glVertexAttrib2sNV(@GLuint int index, short x, short y); + @NoErrorCheck void glVertexAttrib2fNV(@GLuint int index, float x, float y); + @NoErrorCheck void glVertexAttrib2dNV(@GLuint int index, double x, double y); + @NoErrorCheck void glVertexAttrib3sNV(@GLuint int index, short x, short y, short z); + @NoErrorCheck void glVertexAttrib3fNV(@GLuint int index, float x, float y, float z); + @NoErrorCheck void glVertexAttrib3dNV(@GLuint int index, double x, double y, double z); + @NoErrorCheck void glVertexAttrib4sNV(@GLuint int index, short x, short y, short z, short w); + @NoErrorCheck void glVertexAttrib4fNV(@GLuint int index, float x, float y, float z, float w); + @NoErrorCheck void glVertexAttrib4dNV(@GLuint int index, double x, double y, double z, double w); + @NoErrorCheck void glVertexAttrib4ubNV(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs1svNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const ShortBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs1fvNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const FloatBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs1dvNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const DoubleBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs2svNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const ShortBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs2fvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const FloatBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs2dvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const DoubleBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs3svNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const ShortBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs3fvNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const FloatBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs3dvNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const DoubleBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs4svNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const ShortBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs4fvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const FloatBuffer v); + @NoErrorCheck @StripPostfix("v") void glVertexAttribs4dvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const DoubleBuffer v); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-04-12 23:22:14
|
Revision: 3321 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3321&view=rev Author: matzon Date: 2010-04-12 23:22:08 +0000 (Mon, 12 Apr 2010) Log Message: ----------- forcefull check of version match when building Modified Paths: -------------- trunk/LWJGL/build.xml Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-04-12 19:04:27 UTC (rev 3320) +++ trunk/LWJGL/build.xml 2010-04-12 23:22:08 UTC (rev 3321) @@ -315,6 +315,29 @@ </echo> </target> + <macrodef name="version-check"> + <attribute name="platform"/> + <sequential> + <java classname="org.lwjgl.test.NativeTest" logError="false" resultproperty="nativetest.res" outputproperty="nativetest.out" errorproperty="nativetest.err" fork="true"> + <jvmarg value="-Djava.library.path=libs/@{platform}"/> + <classpath> + <pathelement path="${lwjgl.bin}"/> + <pathelement path="${java.class.path}"/> + </classpath> + </java> + + <fail message="Unable to load native library: ${nativetest.err}"> + <condition> + <not> + <equals arg1="OK" arg2="${nativetest.out}"/> + </not> + </condition> + </fail> + + <echo message="Successfully executed NativeTest"/> + </sequential> + </macrodef> + <!-- Compiles the Java source code --> <target name="compile" description="Compiles the java source code" depends="-initialize"> <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core"> @@ -359,6 +382,7 @@ <copy todir="${lwjgl.lib}/windows"> <fileset dir="${lwjgl.bin}/lwjgl" includes="lwjgl*.dll"/> </copy> + <version-check platform="windows"/> </target> <!-- Compiles LWJGL on Linux platforms --> @@ -367,6 +391,7 @@ <copy todir="${lwjgl.lib}/linux"> <fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/> </copy> + <version-check platform="linux"/> </target> <!-- Compiles LWJGL on solaris platforms --> @@ -376,12 +401,14 @@ <copy todir="${lwjgl.lib}/solaris"> <fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/> </copy> + <version-check platform="solaris"/> </target> <!-- Compiles LWJGL on Mac platforms --> <target name="-compile_native_macosx" if="lwjgl.platform.macosx"> <ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/> <copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/> + <version-check platform="macosx"/> </target> <target name="repack200" description="Pack200-repack a jar file"> Added: trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java 2010-04-12 23:22:08 UTC (rev 3321) @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2010 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.test; + +import org.lwjgl.Sys; + +/** + * <br> + * Simple test that just checks that the native library loads + * + * @author Brian Matzon <br...@ma...> + * @version $Revision: 2983 $ + * $Id: SysTest.java 2983 2008-04-07 18:36:09Z matzon $ + */ +public class NativeTest { + + /** + * Entry point for test + * + * @param args ignored + */ + public static void main(String[] args) { + Sys.getVersion(); + System.out.println("OK"); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-04-13 20:28:10
|
Revision: 3324 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3324&view=rev Author: matzon Date: 2010-04-13 20:28:04 +0000 (Tue, 13 Apr 2010) Log Message: ----------- prepare for 2.4.1 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-04-13 20:25:29 UTC (rev 3323) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-04-13 20:28:04 UTC (rev 3324) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.4" /> + <property name="lwjgl.version" value="2.4.1" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-04-13 20:25:29 UTC (rev 3323) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-04-13 20:28:04 UTC (rev 3324) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.4"; + private static final String VERSION = "2.4.1"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-04-15 18:04:00
|
Revision: 3328 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3328&view=rev Author: matzon Date: 2010-04-15 18:03:54 +0000 (Thu, 15 Apr 2010) Log Message: ----------- 2.4.2 release Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-04-14 22:34:43 UTC (rev 3327) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-04-15 18:03:54 UTC (rev 3328) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.4.1" /> + <property name="lwjgl.version" value="2.4.2" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-04-14 22:34:43 UTC (rev 3327) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-04-15 18:03:54 UTC (rev 3328) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.4.1"; + private static final String VERSION = "2.4.2"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-05-24 21:50:35
|
Revision: 3347 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3347&view=rev Author: matzon Date: 2010-05-24 21:50:26 +0000 (Mon, 24 May 2010) Log Message: ----------- EFX patch by Ciardhubh Modified Paths: -------------- trunk/LWJGL/doc/CREDITS trunk/LWJGL/src/java/org/lwjgl/openal/AL.java trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/openal/EFXUtil.java trunk/LWJGL/src/java/org/lwjgl/test/openal/EFX10Test.java trunk/LWJGL/src/templates/org/lwjgl/openal/EFX10.java Modified: trunk/LWJGL/doc/CREDITS =================================================================== --- trunk/LWJGL/doc/CREDITS 2010-05-24 21:32:23 UTC (rev 3346) +++ trunk/LWJGL/doc/CREDITS 2010-05-24 21:50:26 UTC (rev 3347) @@ -15,6 +15,7 @@ - kappaOne - Simon Felix - Ryan McNally + - Ciardhubh <ciardhubh[at]ciardhubh.de> additional credits goes to: - Joseph I. Valenzuela [OpenAL stuff] Modified: trunk/LWJGL/src/java/org/lwjgl/openal/AL.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/openal/AL.java 2010-05-24 21:32:23 UTC (rev 3346) +++ trunk/LWJGL/src/java/org/lwjgl/openal/AL.java 2010-05-24 21:50:26 UTC (rev 3347) @@ -160,8 +160,9 @@ if(openDevice) { device = ALC10.alcOpenDevice(deviceArguments); - if (device == null) + if (device == null) { throw new LWJGLException("Could not open ALC device"); + } if (contextFrequency == -1) { context = ALC10.alcCreateContext(device, null); @@ -177,7 +178,18 @@ throw e; } - ALC11.initialize(); + ALC11.initialize(); + + // Load EFX10 native stubs if ALC_EXT_EFX is supported. + // Is there any situation where the current device supports ALC_EXT_EFX and one + // later created by the user does not? + // Do we have to call resetNativeStubs(EFX10.class); somewhere? Not done for AL11 + // either. + // This can either be here or in ALC11, since ALC_EXT_EFX indirectly requires AL 1.1 + // for functions like alSource3i. + if (ALC10.alcIsExtensionPresent(device, EFX10.ALC_EXT_EFX_NAME)){ + EFX10.initNativeStubs(); + } } /** Added: trunk/LWJGL/src/java/org/lwjgl/openal/EFXUtil.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/openal/EFXUtil.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/openal/EFXUtil.java 2010-05-24 21:50:26 UTC (rev 3347) @@ -0,0 +1,228 @@ +/* + * Copyright (c) 2002-2010 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.openal; + +/** + * Utility class for the OpenAL extension ALC_EXT_EFX. Provides functions to check for the extension + * and support of various effects and filters. + * <p> + * Currently supports ALC_EXT_EFX version 1.0 effects and filters. + * + * @author Ciardhubh <ciardhubh[at]ciardhubh.de> + * @version $Revision$ + * $Id$ + */ +public final class EFXUtil { + + /** Constant for testSupportGeneric to check an effect. */ + private static final int EFFECT = 1111; + /** Constant for testSupportGeneric to check a filter. */ + private static final int FILTER = 2222; + + /** Utility class, hidden contructor. */ + private EFXUtil() { + } + + /** + * Checks if OpenAL implementation is loaded and supports ALC_EXT_EFX. + * + * @return True if ALC_EXT_EFX is supported, false if not. + * @throws OpenALException If OpenAL has not been created yet. + */ + private static boolean isEfxSupported() { + if (!AL.isCreated()) { + throw new OpenALException("OpenAL has not been created."); + } + if (ALC10.alcIsExtensionPresent(AL.getDevice(), EFX10.ALC_EXT_EFX_NAME)) { + return true; + } + return false; + } + + /** + * Tests OpenAL to see whether the given effect type is supported. This is done by creating an + * effect of the given type. If creation succeeds the effect is supported. + * + * @param effectType Type of effect whose support is to be tested, e.g. AL_EFFECT_REVERB. + * @return True if it is supported, false if not. + * @throws OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has + * not been created yet. + * @throws IllegalArgumentException effectType is not a valid effect type. + */ + public static boolean isEffectSupported(final int effectType) { + // Make sure type is a real effect. + switch (effectType) { + case EFX10.AL_EFFECT_NULL: + case EFX10.AL_EFFECT_EAXREVERB: + case EFX10.AL_EFFECT_REVERB: + case EFX10.AL_EFFECT_CHORUS: + case EFX10.AL_EFFECT_DISTORTION: + case EFX10.AL_EFFECT_ECHO: + case EFX10.AL_EFFECT_FLANGER: + case EFX10.AL_EFFECT_FREQUENCY_SHIFTER: + case EFX10.AL_EFFECT_VOCAL_MORPHER: + case EFX10.AL_EFFECT_PITCH_SHIFTER: + case EFX10.AL_EFFECT_RING_MODULATOR: + case EFX10.AL_EFFECT_AUTOWAH: + case EFX10.AL_EFFECT_COMPRESSOR: + case EFX10.AL_EFFECT_EQUALIZER: + break; + default: + throw new IllegalArgumentException("Unknown or invalid effect type: " + effectType); + } + + return testSupportGeneric(EFFECT, effectType); + } + + /** + * Tests OpenAL to see whether the given filter type is supported. This is done by creating a + * filter of the given type. If creation succeeds the filter is supported. + * + * @param filterType Type of filter whose support is to be tested, e.g. AL_FILTER_LOWPASS. + * @return True if it is supported, false if not. + * @throws OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has + * not been created yet. + * @throws IllegalArgumentException filterType is not a valid filter type. + */ + public static boolean isFilterSupported(final int filterType) { + // Make sure type is a real filter. + switch (filterType) { + case EFX10.AL_FILTER_NULL: + case EFX10.AL_FILTER_LOWPASS: + case EFX10.AL_FILTER_HIGHPASS: + case EFX10.AL_FILTER_BANDPASS: + break; + default: + throw new IllegalArgumentException("Unknown or invalid filter type: " + filterType); + } + + return testSupportGeneric(FILTER, filterType); + } + + /** + * Generic test function to see if an EFX object supports a given kind of type. Works for + * effects and filters. + * + * @param objectType Type of object to test. Must be either EFXUtil.EFFECT or EFXUtil.FILTER. + * @param typeValue OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS + * or AL_EFFECT_REVERB. + * @return True if object supports typeValue, false else. + */ + private static boolean testSupportGeneric(final int objectType, final int typeValue) { + // Check for supported objectType. + switch (objectType) { + case EFFECT: + case FILTER: + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + + boolean supported = false; + if (isEfxSupported()) { + + // Try to create object in order to check AL's response. + AL10.alGetError(); + int genError; + int testObject = 0; + try { + switch (objectType) { // Create object based on type + case EFFECT: + testObject = EFX10.alGenEffects(); + break; + case FILTER: + testObject = EFX10.alGenFilters(); + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + genError = AL10.alGetError(); + } catch (final OpenALException debugBuildException) { + // Hack because OpenALException hides the original error code (short of parsing the + // error message String which would break if it gets changed). + if (debugBuildException.getMessage().contains("AL_OUT_OF_MEMORY")) { + genError = AL10.AL_OUT_OF_MEMORY; + } else { + genError = AL10.AL_INVALID_OPERATION; + } + } + + if (genError == AL10.AL_NO_ERROR) { + // Successfully created, now try to set type. + AL10.alGetError(); + int setError; + try { + switch (objectType) { // Set based on object type + case EFFECT: + EFX10.alEffecti(testObject, EFX10.AL_EFFECT_TYPE, typeValue); + break; + case FILTER: + EFX10.alFilteri(testObject, EFX10.AL_FILTER_TYPE, typeValue); + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + setError = AL10.alGetError(); + } catch (final OpenALException debugBuildException) { + // Hack because OpenALException hides the original error code (short of parsing + // the error message String which would break when it gets changed). + setError = AL10.AL_INVALID_VALUE; + } + + if (setError == AL10.AL_NO_ERROR) { + supported = true; + } + + // Cleanup + try { + switch (objectType) { // Set based on object type + case EFFECT: + EFX10.alDeleteEffects(testObject); + break; + case FILTER: + EFX10.alDeleteFilters(testObject); + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + } catch (final OpenALException debugBuildException) { + // Don't care about cleanup errors. + } + + } else if (genError == AL10.AL_OUT_OF_MEMORY) { + throw new OpenALException(genError); + } + } + + return supported; + } +} Added: trunk/LWJGL/src/java/org/lwjgl/test/openal/EFX10Test.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/openal/EFX10Test.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/openal/EFX10Test.java 2010-05-24 21:50:26 UTC (rev 3347) @@ -0,0 +1,464 @@ +/* + * Copyright (c) 2002-2010 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.test.openal; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.openal.AL11; +import org.lwjgl.openal.ALC10; +import org.lwjgl.openal.ALCcontext; +import org.lwjgl.openal.ALCdevice; +import org.lwjgl.openal.EFX10; +import org.lwjgl.openal.EFXUtil; +import org.lwjgl.util.WaveData; + +/** + * Class with a few examples testing and demonstrating the use of the OpenAL extension ALC_EXT_EFX. + * <p> + * This class is not compatible with the LWJGL debug build (lwjgl-debug.jar), as the debug build + * throws exceptions instead of alGetError checks. The redundant exception handling code was not + * added in order to keep these examples simple. + * + * @author Ciardhubh <ciardhubh[at]ciardhubh.de> + * @version $Revision$ + * $Id$ + */ +public final class EFX10Test { + + public static void main(final String[] args) throws Exception { + silentTests(); + playbackTest(); + efxUtilTest(); + } + + /** + * Loads OpenAL and makes sure ALC_EXT_EFX is supported. + */ + private static void setupEfx() throws Exception { + // Load and create OpenAL + if (!AL.isCreated()) { + AL.create(); + } + // Query for Effect Extension + if (!ALC10.alcIsExtensionPresent(AL.getDevice(), EFX10.ALC_EXT_EFX_NAME)) { + throw new Exception("No ALC_EXT_EFX supported by driver."); + } + System.out.println("ALC_EXT_EFX found."); + } + + /** + * Runs a series of API calls similar to the tutorials in the Effects Extension Guide of the + * OpenAL SDK. Nothing is played in this method. + */ + private static void silentTests() throws Exception { + setupEfx(); + + final ALCdevice device = AL.getDevice(); + + // Create context (only necessary if LWJGL context isn't sufficient, done as example) + final IntBuffer contextAttribList = BufferUtils.createIntBuffer(8); + contextAttribList.put(ALC10.ALC_FREQUENCY); + contextAttribList.put(44100); + contextAttribList.put(ALC10.ALC_REFRESH); + contextAttribList.put(60); + contextAttribList.put(ALC10.ALC_SYNC); + contextAttribList.put(ALC10.ALC_FALSE); + contextAttribList.rewind(); + // ALC_MAX_AUXILIARY_SENDS won't go above compile-time max. Set to compile-time max if + // greater. + contextAttribList.put(EFX10.ALC_MAX_AUXILIARY_SENDS); + contextAttribList.put(2); + final ALCcontext newContext = ALC10.alcCreateContext(device, contextAttribList); + if (newContext == null) { + throw new Exception("Failed to create context."); + } + final int contextCurResult = ALC10.alcMakeContextCurrent(newContext); + if (contextCurResult == ALC10.ALC_FALSE) { + throw new Exception("Failed to make context current."); + } + + // Query EFX ALC values + System.out.println("AL_VERSION: " + AL10.alGetString(AL10.AL_VERSION)); + final IntBuffer buff = BufferUtils.createIntBuffer(1); + ALC10.alcGetInteger(device, EFX10.ALC_EFX_MAJOR_VERSION, buff); + System.out.println("ALC_EFX_MAJOR_VERSION: " + buff.get(0)); + ALC10.alcGetInteger(device, EFX10.ALC_EFX_MINOR_VERSION, buff); + System.out.println("ALC_EFX_MINOR_VERSION: " + buff.get(0)); + ALC10.alcGetInteger(device, EFX10.ALC_MAX_AUXILIARY_SENDS, buff); + final int maxAuxSends = buff.get(0); + System.out.println("ALC_MAX_AUXILIARY_SENDS: " + maxAuxSends); + + + // Try to create 4 Auxiliary Effect Slots + int numAuxSlots = 0; + final int[] auxEffectSlots = new int[4]; // try more to test + AL10.alGetError(); + for (numAuxSlots = 0; numAuxSlots < 4; numAuxSlots++) { + auxEffectSlots[numAuxSlots] = EFX10.alGenAuxiliaryEffectSlots(); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + break; + } + } + System.out.println("Created " + numAuxSlots + " aux effect slots."); + + // Try to create 2 Effects + int numEffects = 0; + final int[] effects = new int[2]; + for (numEffects = 0; numEffects < 2; numEffects++) { + effects[numEffects] = EFX10.alGenEffects(); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + break; + } + } + System.out.println("Created " + numEffects + " effects."); + + // Set first Effect Type to Reverb and change Decay Time + AL10.alGetError(); + if (EFX10.alIsEffect(effects[0])) { + EFX10.alEffecti(effects[0], EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_REVERB); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Reverb effect not supported."); + } else { + EFX10.alEffectf(effects[0], EFX10.AL_REVERB_DECAY_TIME, 5.0f); + System.out.println("Reverb effect created."); + } + } else { + throw new Exception("First effect not a valid effect."); + } + + // Set second Effect Type to Flanger and change Phase + AL10.alGetError(); + if (EFX10.alIsEffect(effects[1])) { + EFX10.alEffecti(effects[1], EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_FLANGER); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Flanger effect not support."); + } else { + EFX10.alEffecti(effects[1], EFX10.AL_FLANGER_PHASE, 180); + System.out.println("Flanger effect created."); + } + } else { + throw new Exception("Second effect not a valid effect."); + } + + // Try to create a Filter + AL10.alGetError(); + final int filter = EFX10.alGenFilters(); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to create filter."); + } + System.out.println("Generated a filter."); + if (EFX10.alIsFilter(filter)) { + // Set Filter type to Low-Pass and set parameters + EFX10.alFilteri(filter, EFX10.AL_FILTER_TYPE, EFX10.AL_FILTER_LOWPASS); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Low pass filter not supported."); + } else { + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAIN, 0.5f); + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAINHF, 0.5f); + System.out.println("Low pass filter created."); + } + } + + // Attach Effect to Auxiliary Effect Slot + AL10.alGetError(); + EFX10.alAuxiliaryEffectSloti(auxEffectSlots[0], EFX10.AL_EFFECTSLOT_EFFECT, effects[0]); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to attach effect to aux effect slot."); + } + System.out.println("Successfully loaded effect into effect slot."); + + // Configure Source Auxiliary Effect Slot Sends + final int source = AL10.alGenSources(); + // Set Source Send 0 to feed auxEffectSlots[0] without filtering + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[0], 0, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to configure Source Send 0"); + } + System.out.println("Linked aux effect slot to soutce slot 0"); + // Set Source Send 1 to feed uiEffectSlot[1] with filter filter + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[1], 1, filter); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + // e.g. if only 1 send per source is available + throw new Exception("Failed to configure Source Send 1"); + } + System.out.println("Linked aux effect slot to soutce slot 1"); + // Disable Send 0 + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, EFX10.AL_EFFECTSLOT_NULL, 0, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to disable Source Send 0"); + } + System.out.println("Disabled source send 0"); + // Disable Send 1 + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, EFX10.AL_EFFECTSLOT_NULL, 1, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to disable Source Send 1"); + } + System.out.println("Disabled source send 1"); + + + // Filter 'source', a generated Source + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, filter); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + { + System.out.println("Successfully applied a direct path filter"); + // Remove filter from 'source' + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, EFX10.AL_FILTER_NULL); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully removed direct filter"); + } + } + // Filter the Source send 0 from 'source' to Auxiliary Effect Slot auxEffectSlot[0] + // using Filter uiFilter[0] + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[0], 0, filter); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + { + System.out.println("Successfully applied aux send filter"); + // Remove Filter from Source Auxiliary Send + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[0], 0, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully removed filter"); + } + } + } + } + + // Set Source Cone Outer Gain HF value + AL10.alSourcef(source, EFX10.AL_CONE_OUTER_GAINHF, 0.5f); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully set cone outside gain filter"); + } + + // Set distance units to be in feet + AL10.alListenerf(EFX10.AL_METERS_PER_UNIT, 0.3f); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully set distance units"); + } + + // Cleanup + final IntBuffer auxEffectSlotsBuf = (IntBuffer) BufferUtils.createIntBuffer( + auxEffectSlots.length).put(auxEffectSlots).rewind(); + EFX10.alDeleteAuxiliaryEffectSlots(auxEffectSlotsBuf); + final IntBuffer effectsBuf = (IntBuffer) BufferUtils.createIntBuffer( + effects.length).put(effects).rewind(); + EFX10.alDeleteEffects(effectsBuf); + EFX10.alDeleteFilters(filter); + AL.destroy(); + } + + /** + * Plays a sound with various effects applied to it. + */ + private static void playbackTest() throws Exception { + setupEfx(); + + // Create a source and buffer audio data + final int source = AL10.alGenSources(); + final int buffer = AL10.alGenBuffers(); + WaveData waveFile = WaveData.create(WaveData.class.getClassLoader().getResourceAsStream("Footsteps.wav")); + if (waveFile == null) { + System.out.println("Failed to load Footsteps.wav! Skipping playback test."); + AL.destroy(); + return; + } + AL10.alBufferData(buffer, waveFile.format, waveFile.data, waveFile.samplerate); + waveFile.dispose(); + AL10.alSourcei(source, AL10.AL_BUFFER, buffer); + AL10.alSourcei(source, AL10.AL_LOOPING, AL10.AL_TRUE); + + System.out.println("Playing sound unaffected by EFX ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + + // Add reverb effect + final int effectSlot = EFX10.alGenAuxiliaryEffectSlots(); + final int reverbEffect = EFX10.alGenEffects(); + EFX10.alEffecti(reverbEffect, EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_REVERB); + EFX10.alEffectf(reverbEffect, EFX10.AL_REVERB_DECAY_TIME, 5.0f); + EFX10.alAuxiliaryEffectSloti(effectSlot, EFX10.AL_EFFECTSLOT_EFFECT, reverbEffect); + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, effectSlot, 0, + EFX10.AL_FILTER_NULL); + + System.out.println("Playing sound with reverb ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + + // Add low-pass filter directly to source + final int filter = EFX10.alGenFilters(); + EFX10.alFilteri(filter, EFX10.AL_FILTER_TYPE, EFX10.AL_FILTER_LOWPASS); + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAIN, 0.5f); + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAINHF, 0.5f); + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, filter); + + System.out.println("Playing sound with reverb and direct low pass filter ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, EFX10.AL_FILTER_NULL); + + // Add low-pass filter to source send + //AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, effectSlot, 0, filter); + // + //System.out.println("Playing sound with reverb and aux send low pass filter ..."); + //AL10.alSourcePlay(source); + //Thread.sleep(7500); + + // Cleanup + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, EFX10.AL_EFFECTSLOT_NULL, 0, + EFX10.AL_FILTER_NULL); + EFX10.alAuxiliaryEffectSloti(effectSlot, EFX10.AL_EFFECTSLOT_EFFECT, EFX10.AL_EFFECT_NULL); + EFX10.alDeleteEffects(reverbEffect); + EFX10.alDeleteFilters(filter); + + // Echo effect + final int echoEffect = EFX10.alGenEffects(); + EFX10.alEffecti(echoEffect, EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_ECHO); + //EFX10.alEffectf(echoEffect, EFX10.AL_ECHO_DELAY, 5.0f); + EFX10.alAuxiliaryEffectSloti(effectSlot, EFX10.AL_EFFECTSLOT_EFFECT, echoEffect); + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, effectSlot, 0, + EFX10.AL_FILTER_NULL); + + System.out.println("Playing sound with echo effect ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + + AL.destroy(); + } + + /** + * Checks OpenAL for every EFX 1.0 effect and filter and prints the result to the console. + */ + private static void efxUtilTest() throws Exception { + setupEfx(); + + System.out.println(); + System.out.println("Checking supported effects ..."); + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_NULL)) { + System.out.println("AL_EFFECT_NULL is supported."); + } else { + System.out.println("AL_EFFECT_NULL is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_EAXREVERB)) { + System.out.println("AL_EFFECT_EAXREVERB is supported."); + } else { + System.out.println("AL_EFFECT_EAXREVERB is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_REVERB)) { + System.out.println("AL_EFFECT_REVERB is supported."); + } else { + System.out.println("AL_EFFECT_REVERB is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_CHORUS)) { + System.out.println("AL_EFFECT_CHORUS is supported."); + } else { + System.out.println("AL_EFFECT_CHORUS is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_DISTORTION)) { + System.out.println("AL_EFFECT_DISTORTION is supported."); + } else { + System.out.println("AL_EFFECT_DISTORTION is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_ECHO)) { + System.out.println("AL_EFFECT_ECHO is supported."); + } else { + System.out.println("AL_EFFECT_ECHO is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_FLANGER)) { + System.out.println("AL_EFFECT_FLANGER is supported."); + } else { + System.out.println("AL_EFFECT_FLANGER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_FREQUENCY_SHIFTER)) { + System.out.println("AL_EFFECT_FREQUENCY_SHIFTER is supported."); + } else { + System.out.println("AL_EFFECT_FREQUENCY_SHIFTER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_VOCAL_MORPHER)) { + System.out.println("AL_EFFECT_VOCAL_MORPHER is supported."); + } else { + System.out.println("AL_EFFECT_VOCAL_MORPHER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_PITCH_SHIFTER)) { + System.out.println("AL_EFFECT_PITCH_SHIFTER is supported."); + } else { + System.out.println("AL_EFFECT_PITCH_SHIFTER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_RING_MODULATOR)) { + System.out.println("AL_EFFECT_RING_MODULATOR is supported."); + } else { + System.out.println("AL_EFFECT_RING_MODULATOR is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_AUTOWAH)) { + System.out.println("AL_EFFECT_AUTOWAH is supported."); + } else { + System.out.println("AL_EFFECT_AUTOWAH is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_COMPRESSOR)) { + System.out.println("AL_EFFECT_COMPRESSOR is supported."); + } else { + System.out.println("AL_EFFECT_COMPRESSOR is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_EQUALIZER)) { + System.out.println("AL_EFFECT_EQUALIZER is supported."); + } else { + System.out.println("AL_EFFECT_EQUALIZER is NOT supported."); + } + + System.out.println(); + System.out.println("Checking supported filters ..."); + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_NULL)) { + System.out.println("AL_FILTER_NULL is supported."); + } else { + System.out.println("AL_FILTER_NULL is NOT supported."); + } + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_LOWPASS)) { + System.out.println("AL_FILTER_LOWPASS is supported."); + } else { + System.out.println("AL_FILTER_LOWPASS is NOT supported."); + } + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_HIGHPASS)) { + System.out.println("AL_FILTER_HIGHPASS is supported."); + } else { + System.out.println("AL_FILTER_HIGHPASS is NOT supported."); + } + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_BANDPASS)) { + System.out.println("AL_FILTER_BANDPASS is supported."); + } else { + System.out.println("AL_FILTER_BANDPASS is NOT supported."); + } + } +} Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java 2010-05-24 21:32:23 UTC (rev 3346) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java 2010-05-24 21:50:26 UTC (rev 3347) @@ -40,34 +40,57 @@ public class FieldsGenerator { private static void validateField(FieldDeclaration field) { - Collection<Modifier> modifiers = field.getModifiers(); - if (modifiers.size() != 3 || !modifiers.contains(Modifier.PUBLIC) || !modifiers.contains(Modifier.STATIC) || - !modifiers.contains(Modifier.FINAL)) - throw new RuntimeException("Field " + field.getSimpleName() + " is not declared public static final"); - TypeMirror field_type = field.getType(); - if (!(field_type instanceof PrimitiveType)) - throw new RuntimeException("Field " + field.getSimpleName() + " is not a primitive type"); - PrimitiveType field_type_prim = (PrimitiveType)field_type; - if (field_type_prim.getKind() != PrimitiveType.Kind.INT && field_type_prim.getKind() != PrimitiveType.Kind.LONG) - throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int' or 'long'"); - Object field_value = field.getConstantValue(); - if (field_value == null) - throw new RuntimeException("Field " + field.getSimpleName() + " has no initial value"); + // Check if field is "public static final" + Collection<Modifier> modifiers = field.getModifiers(); + if (modifiers.size() != 3 + || !modifiers.contains(Modifier.PUBLIC) + || !modifiers.contains(Modifier.STATIC) + || !modifiers.contains(Modifier.FINAL)) { + throw new RuntimeException("Field " + field.getSimpleName() + " is not declared public static final"); + } + + // Check suported types (int, long, float, String) + TypeMirror field_type = field.getType(); + if (field_type instanceof PrimitiveType) { + PrimitiveType field_type_prim = (PrimitiveType) field_type; + PrimitiveType.Kind field_kind = field_type_prim.getKind(); + if (field_kind != PrimitiveType.Kind.INT + && field_kind != PrimitiveType.Kind.LONG + && field_kind != PrimitiveType.Kind.FLOAT) { + throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'"); + } + } else if (field_type.toString().equals("java.lang.String")) { + } else { + throw new RuntimeException("Field " + field.getSimpleName() + " is not a primitive type or String"); + } + + Object field_value = field.getConstantValue(); + if (field_value == null) { + throw new RuntimeException("Field " + field.getSimpleName() + " has no initial value"); + } } private static void generateField(PrintWriter writer, FieldDeclaration field) { - validateField(field); + validateField(field); - Object value = field.getConstantValue(); - String field_value_string; - if ( value.getClass().equals(Integer.class) ) - field_value_string = Integer.toHexString((Integer)field.getConstantValue()); - else - field_value_string = Long.toHexString((Long)field.getConstantValue()) + 'l'; + Object value = field.getConstantValue(); + String field_value_string; + Class field_value_class = value.getClass(); + if (field_value_class.equals(Integer.class)) { + field_value_string = "0x" + Integer.toHexString((Integer) field.getConstantValue()); + } else if (field_value_class.equals(Long.class)) { + field_value_string = "0x" + Long.toHexString((Long) field.getConstantValue()) + 'l'; + } else if (field_value_class.equals(Float.class)) { + field_value_string = field.getConstantValue() + "f"; + } else if (field_value_class.equals(String.class)) { + field_value_string = "\"" + field.getConstantValue() + "\""; + } else { + throw new RuntimeException("Field is of unexpected type. This means there is a bug in validateField()."); + } - Utils.printDocComment(writer, field); - // Print field declaration - writer.println("\tpublic static final " + field.getType().toString() + " " + field.getSimpleName() + " = 0x" + field_value_string + ";"); + Utils.printDocComment(writer, field); + // Print field declaration + writer.println("\tpublic static final " + field.getType().toString() + " " + field.getSimpleName() + " = " + field_value_string + ";"); } public static void generateFields(PrintWriter writer, Collection<FieldDeclaration> fields) { Added: trunk/LWJGL/src/templates/org/lwjgl/openal/EFX10.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/openal/EFX10.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/openal/EFX10.java 2010-05-24 21:50:26 UTC (rev 3347) @@ -0,0 +1,738 @@ +/* + * Copyright (c) 2002-2010 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.openal; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.util.generator.ALenum; +import org.lwjgl.util.generator.ALsizei; +import org.lwjgl.util.generator.ALuint; +import org.lwjgl.util.generator.ALvoid; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Constant; +import org.lwjgl.util.generator.Indirect; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.Result; +import org.lwjgl.util.generator.StripPostfix; + +/** + * Implementation of the OpenAL extension ALC_EXT_EFX (version 1.0). Contains necessary fields, + * methods and a range of supplementary fields containing minimum, maximum and default values of + * the former fields. + * <p> + * On top of regular functions defined in the ALC_EXT_EFX, there are also several convenience + * functions. Namely alGen... and alDelete... which do not take a Java buffer parameter and + * automatically create or delete a single object, without the overhead of using a buffer. + * <p> + * For comments and specification of functions and fields, refer to the "Effects Extension Guide" + * which is part of the OpenAL SDK and can be downloaded from: + * http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx + * + * @author Ciardhubh <ciardhubh[at]ciardhubh.de> + * @version $Revision$ + * $Id$ + */ +public interface EFX10 { + + // ALC properties + String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; + int ALC_EFX_MAJOR_VERSION = 0x20001; + int ALC_EFX_MINOR_VERSION = 0x20002; + int ALC_MAX_AUXILIARY_SENDS = 0x20003; + + // Listener properties + int AL_METERS_PER_UNIT = 0x20004; + + // Source properties + int AL_DIRECT_FILTER = 0x20005; + int AL_AUXILIARY_SEND_FILTER = 0x20006; + int AL_AIR_ABSORPTION_FACTOR = 0x20007; + int AL_ROOM_ROLLOFF_FACTOR = 0x20008; + int AL_CONE_OUTER_GAINHF = 0x20009; + int AL_DIRECT_FILTER_GAINHF_AUTO = 0x2000A; + int AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x2000B; + int AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x2000C; + + // Auxiliary effect slot properties + int AL_EFFECTSLOT_EFFECT = 0x0001; + int AL_EFFECTSLOT_GAIN = 0x0002; + int AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x0003; + // NULL auxiliary slot ID to disable a source send + int AL_EFFECTSLOT_NULL = 0x0000; + + // Effect parameters + // Reverb + int AL_REVERB_DENSITY = 0x0001; + int AL_REVERB_DIFFUSION = 0x0002; + int AL_REVERB_GAIN = 0x0003; + int AL_REVERB_GAINHF = 0x0004; + int AL_REVERB_DECAY_TIME = 0x0005; + int AL_REVERB_DECAY_HFRATIO = 0x0006; + int AL_REVERB_REFLECTIONS_GAIN = 0x0007; + int AL_REVERB_REFLECTIONS_DELAY = 0x0008; + int AL_REVERB_LATE_REVERB_GAIN = 0x0009; + int AL_REVERB_LATE_REVERB_DELAY = 0x000A; + int AL_REVERB_AIR_ABSORPTION_GAINHF = 0x000B; + int AL_REVERB_ROOM_ROLLOFF_FACTOR = 0x000C; + int AL_REVERB_DECAY_HFLIMIT = 0x000D; + // EAX Reverb + int AL_EAXREVERB_DENSITY = 0x0001; + int AL_EAXREVERB_DIFFUSION = 0x0002; + int AL_EAXREVERB_GAIN = 0x0003; + int AL_EAXREVERB_GAINHF = 0x0004; + int AL_EAXREVERB_GAINLF = 0x0005; + int AL_EAXREVERB_DECAY_TIME = 0x0006; + int AL_EAXREVERB_DECAY_HFRATIO = 0x0007; + int AL_EAXREVERB_DECAY_LFRATIO = 0x0008; + int AL_EAXREVERB_REFLECTIONS_GAIN = 0x0009; + int AL_EAXREVERB_REFLECTIONS_DELAY = 0x000A; + int AL_EAXREVERB_REFLECTIONS_PAN = 0x000B; + int AL_EAXREVERB_LATE_REVERB_GAIN = 0x000C; + int AL_EAXREVERB_LATE_REVERB_DELAY = 0x000D; + int AL_EAXREVERB_LATE_REVERB_PAN = 0x000E; + int AL_EAXREVERB_ECHO_TIME = 0x000F; + int AL_EAXREVERB_ECHO_DEPTH = 0x0010; + int AL_EAXREVERB_MODULATION_TIME = 0x0011; + int AL_EAXREVERB_MODULATION_DEPTH = 0x0012; + int AL_EAXREVERB_AIR_ABSORPTION_GAINHF = 0x0013; + int AL_EAXREVERB_HFREFERENCE = 0x0014; + int AL_EAXREVERB_LFREFERENCE = 0x0015; + int AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x0016; + int AL_EAXREVERB_DECAY_HFLIMIT = 0x0017; + // Chorus + int AL_CHORUS_WAVEFORM = 0x0001; + int AL_CHORUS_PHASE = 0x0002; + int AL_CHORUS_RATE = 0x0003; + int AL_CHORUS_DEPTH = 0x0004; + int AL_CHORUS_FEEDBACK = 0x0005; + int AL_CHORUS_DELAY = 0x0006; + // Distortion + int AL_DISTORTION_EDGE = 0x0001; + int AL_DISTORTION_GAIN = 0x0002; + int AL_DISTORTION_LOWPASS_CUTOFF = 0x0003; + int AL_DISTORTION_EQCENTER = 0x0004; + int AL_DISTORTION_EQBANDWIDTH = 0x0005; + // Echo + int AL_ECHO_DELAY = 0x0001; + int AL_ECHO_LRDELAY = 0x0002; + int AL_ECHO_DAMPING = 0x0003; + int AL_ECHO_FEEDBACK = 0x0004; + int AL_ECHO_SPREAD = 0x0005; + // Flanger + int AL_FLANGER_WAVEFORM = 0x0001; + int AL_FLANGER_PHASE = 0x0002; + int AL_FLANGER_RATE = 0x0003; + int AL_FLANGER_DEPTH = 0x0004; + int AL_FLANGER_FEEDBACK = 0x0005; + int AL_FLANGER_DELAY = 0x0006; + // Frequency shifter + int AL_FREQUENCY_SHIFTER_FREQUENCY = 0x0001; + int AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = 0x0002; + int AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = 0x0003; + // Vocal morpher + int AL_VOCAL_MORPHER_PHONEMEA = 0x0001; + int AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = 0x0002; + int AL_VOCAL_MORPHER_PHONEMEB = 0x0003; + int AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = 0x0004; + int AL_VOCAL_MORPHER_WAVEFORM = 0x0005; + int AL_VOCAL_MORPHER_RATE = 0x0006; + // Pitch shifter + int AL_PITCH_SHIFTER_COARSE_TUNE = 0x0001; + int AL_PITCH_SHIFTER_FINE_TUNE = 0x0002; + // Ring modulator + int AL_RING_MODULATOR_FREQUENCY = 0x0001; + int AL_RING_MODULATOR_HIGHPASS_CUTOFF = 0x0002; + int AL_RING_MODULATOR_WAVEFORM = 0x0003; + // Autowah + int AL_AUTOWAH_ATTACK_TIME = 0x0001; + int AL_AUTOWAH_RELEASE_TIME = 0x0002; + int AL_AUTOWAH_RESONANCE = 0x0003; + int AL_AUTOWAH_PEAK_GAIN = 0x0004; + // Compressor + int AL_COMPRESSOR_ONOFF = 0x0001; + // Equalizer + int AL_EQUALIZER_LOW_GAIN = 0x0001; + int AL_EQUALIZER_LOW_CUTOFF = 0x0002; + int AL_EQUALIZER_MID1_GAIN = 0x0003; + int AL_EQUALIZER_MID1_CENTER = 0x0004; + int AL_EQUALIZER_MID1_WIDTH = 0x0005; + int AL_EQUALIZER_MID2_GAIN = 0x0006; + int AL_EQUALIZER_MID2_CENTER = 0x0007; + int AL_EQUALIZER_MID2_WIDTH = 0x0008; + int AL_EQUALIZER_HIGH_GAIN = 0x0009; + int AL_EQUALIZER_HIGH_CUTOFF = 0x000A; + // Effect type + int AL_EFFECT_FIRST_PARAMETER = 0x0000; + int AL_EFFECT_LAST_PARAMETER = 0x8000; + int AL_EFFECT_TYPE = 0x8001; + // Effect types, used with AL_EFFECT_TYPE + int AL_EFFECT_NULL = 0x0000; + int AL_EFFECT_REVERB = 0x0001; + int AL_EFFECT_CHORUS = 0x0002; + int AL_EFFECT_DISTORTION = 0x0003; + int AL_EFFECT_ECHO = 0x0004; + int AL_EFFECT_FLANGER = 0x0005; + int AL_EFFECT_FREQUENCY_SHIFTER = 0x0006; + int AL_EFFECT_VOCAL_MORPHER = 0x0007; + int AL_EFFECT_PITCH_SHIFTER = 0x0008; + int AL_EFFECT_RING_MODULATOR = 0x0009; + int AL_EFFECT_AUTOWAH = 0x000A; + int AL_EFFECT_COMPRESSOR = 0x000B; + int AL_EFFECT_EQUALIZER = 0x000C; + int AL_EFFECT_EAXREVERB = 0x8000; + + // Filter properties + // Lowpass + int AL_LOWPASS_GAIN = 0x0001; + int AL_LOWPASS_GAINHF = 0x0002; + // Highpass + int AL_HIGHPASS_GAIN = 0x0001; + int AL_HIGHPASS_GAINLF = 0x0002; + // Bandpass + int AL_BANDPASS_GAIN = 0x0001; + int AL_BANDPASS_GAINLF = 0x0002; + int AL_BANDPASS_GAINHF = 0x0003; + // Filter type + int AL_FILTER_FIRST_PARAMETER = 0x0000; + int AL_FILTER_LAST_PARAMETER = 0x8000; + int AL_FILTER_TYPE = 0x8001; + // Filter types, used with the AL_FILTER_TYPE property + int AL_FILTER_NULL = 0x0000; + int AL_FILTER_LOWPASS = 0x0001; + int AL_FILTER_HIGHPASS = 0x0002; + int AL_FILTER_BANDPASS = 0x0003; + + // Auxiliary effect slot object functions + @ALvoid + void alGenAuxiliaryEffectSlots(@AutoSize("auxiliaryeffectslots") @ALsizei int n, @OutParameter @ALuint IntBuffer auxiliaryeffectslots); + + @Alternate(value = "alGenAuxiliaryEffectSlots", nativeAlt = true) + @ALvoid + void alGenAuxiliaryEffectSlots2(@Constant("1") @ALsizei int n, @Result @ALuint int auxiliaryeffectslot); + + @ALvoid + void alDeleteAuxiliaryEffectSlots(@AutoSize("auxiliaryeffectslots") @ALsizei int n, @OutParameter @ALuint IntBuffer auxiliaryeffectslots); + + @Alternate(value = "alDeleteAuxiliaryEffectSlots", nativeAlt = true) + @ALvoid + void alDeleteAuxiliaryEffectSlots2(@Constant("1") @ALsizei int n, @Indirect @ALuint int auxiliaryeffectslot); + + boolean alIsAuxiliaryEffectSlot(@ALuint int auxiliaryeffectslot); + + @ALvoid + void alAuxiliaryEffectSloti(@ALuint int auxiliaryeffectslot, @ALenum int param, int value); + + @StripPostfix("values") + @ALvoid + void alAuxiliaryEffectSlotiv(@ALuint int auxiliaryeffectslot, @ALenum int param, @Check("1") @Const IntBuffer values); + + @ALvoid + void alAuxiliaryEffectSlotf(@ALuint int auxiliaryeffectslot, @ALenum int param, float value); + + @StripPostfix("values") + @ALvoid + void alAuxiliaryEffectSlotfv(@ALuint int auxiliaryeffectslot, @ALenum int param, @Check("1") @Const FloatBuffer values); + + @ALvoid + void alGetAuxiliaryEffectSloti(@ALuint int auxiliaryeffectslot, @ALenum int param, @Result int value); + + @StripPostfix("intdata") + @ALvoid + void alGetAuxiliaryEffectSlotiv(@ALuint int auxiliaryeffectslot, @ALenum int param, @OutParameter @Check("1") IntBuffer intdata); + + @ALvoid + void alGetAuxiliaryEffectSlotf(@ALuint int auxiliaryeffectslot, @ALenum int param, @Result float value); + + @StripPostfix("floatdata") + @ALvoid + void alGetAuxiliaryEffectSlotfv(@ALuint int auxiliaryeffectslot, @ALenum int param, @OutParameter @Check("1") FloatBuffer floatdata); + + // Effect object functions + @ALvoid + void alGenEffects(@AutoSize("effects") @ALsizei int n, @OutParameter @ALuint IntBuffer effects); + + @Alternate(value = "alGenEffects", nativeAlt = true) + @ALvoid + void alGenEffects2(@Constant("1") @ALsizei int n, @Result @ALuint int effect); + + @ALvoid + void alDeleteEffects(@AutoSize("effects") @ALsizei int n, @OutParameter @ALuint IntBuffer effects); + + @Alternate(value = "alDeleteEffects", nativeAlt = true) + @ALvoid + void alDeleteEffects2(@Constant("1") @ALsizei int n, @Indirect @ALuint int effect); + + boolean alIsEffect(@ALuint int effect); + + @ALvoid + void alEffecti(@ALuint int effect, @ALenum int param, int value); + + @StripPostfix("values") + @ALvoid + void alEffectiv(@ALuint int effect, @ALenum int param, @Check("1") @Const IntBuffer values); + + @ALvoid + void alEffectf(@ALuint int effect, @ALenum int param, float value); + + @StripPostfix("values") + @ALvoid + void alEffectfv(@ALuint int effect, @ALenum int param, @Check("1") @Const FloatBuffer values); + + @ALvoid + void alGetEffecti(@ALuint int effect, @ALenum int param, @Result int value); + + @StripPostfix("intdata") + @ALvoid + void alGetEffectiv(@ALuint int effect, @ALenum int param, @OutParameter @Check("1") IntBuffer intdata); + + @ALvoid + void alGetEffectf(@ALuint int effect, @ALenum int param, @Result float value); + + @StripPostfix("floatdata") + @ALvoid + void alGetEffectfv(@ALuint int effect, @ALenum int param, @OutParameter @Check("1") FloatBuffer floatdata); + + // Filter object functions + @ALvoid + void alGenFilters(@AutoSize("filters") @ALsizei int n, @OutParameter @ALuint IntBuffer filters); + + @Alternate(value = "alGenFilters", nativeAlt = true) + @ALvoid + void alGenFilters2(@Constant("1") @ALsizei int n, @Result @ALuint int filter); + + @ALvoid + void alDeleteFilters(@AutoSize("filters") @ALsizei int n, @OutParameter @ALuint IntBuffer filters); + + @Alternate(value = "alDeleteFilters", nativeAlt = true) + @ALvoid + void alDeleteFilters2(@Constant("1") @ALsizei int n, @Indirect @ALuint int filter); + + boolean alIsFilter(@ALuint int filter); + + @ALvoid + void alFilteri(@ALuint int filter, @ALenum int param, int value); + + @StripPostfix("values") + @ALvoid + void alFilteriv(@ALuint int filter, @ALenum int param, @Check("1") @Const IntBuffer values); + + @ALvoid + void alFilterf(@ALuint int filter, @ALenum int param, float value); + + @StripPostfix("values") + @ALvoid + void alFilterfv(@ALuint int filter, @ALenum int param, @Check("1") @Const FloatBuffer values); + + @ALvoid + void alGetFilteri(@ALuint int filter, @ALenum int param, @Result int value); + + @StripPostfix("intdata") + @ALvoid + void alGetFilteriv(@ALuint int filter, @ALenum int param, @OutParameter @Check("1") IntBuffer intdata); + + @ALvoid + void alGetFilterf(@ALuint int filter, @ALenum int param, @Result float value); + + @StripPostfix("floatdata") + @ALvoid + void alGetFilterfv(@ALuint int filter, @ALenum int param, @OutParameter @Check("1") FloatBuffer floatdata); + + // Source property value ranges and defaults + float AL_MIN_AIR_ABSORPTION_FACTOR = 0.0f; + float AL_MAX_AIR_ABSORPTION_FACTOR = 10.0f; + float AL_DEFAULT_AIR_ABSORPTION_FACTOR = 0.0f; + float AL_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + float AL_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_MIN_CONE_OUTER_GAINHF = 0.0f; + float AL_MAX_CONE_OUTER_GAINHF = 1.0f; + float AL_DEFAULT_CONE_OUTER_GAINHF = 1.0f; + int AL_MIN_DIRECT_FILTER_GAINHF_AUTO = AL10.AL_FALSE; + int AL_MAX_DIRECT_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + int AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + int AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = AL10.AL_FALSE; + int AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = AL10.AL_TRUE; + int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = AL10.AL_TRUE; + int AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = AL10.AL_FALSE; + int AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + + // Listener property value ranges and defaults + float AL_MIN_METERS_PER_UNIT = Float.MIN_VALUE; + float AL_MAX_METERS_PER_UNIT = Float.MAX_VALUE; + float AL_DEFAULT_METERS_PER_UNIT = 1.0f; + + // Effect parameter ranges and defaults + // Reverb + float AL_REVERB_MIN_DENSITY = 0.0f; + float AL_REVERB_MAX_DENSITY = 1.0f; + float AL_REVERB_DEFAULT_DENSITY = 1.0f; + float AL_REVERB_MIN_DIFFUSION = 0.0f; + float AL_REVERB_MAX_DIFFUSION = 1.0f; + float AL_REVERB_DEFAULT_DIFFUSION = 1.0f; + float AL_REVERB_MIN_GAIN = 0.0f; + float AL_REVERB_MAX_GAIN = 1.0f; + float AL_REVERB_DEFAULT_GAIN = 0.32f; + float AL_REVERB_MIN_GAINHF = 0.0f; + float AL_REVERB_MAX_GAINHF = 1.0f; + float AL_REVERB_DEFAULT_GAINHF = 0.89f; + float AL_REVERB_MIN_DECAY_TIME = 0.1f; + float AL_REVERB_MAX_DECAY_TIME = 20.0f; + float AL_REVERB_DEFAULT_DECAY_TIME = 1.49f; + float AL_REVERB_MIN_DECAY_HFRATIO = 0.1f; + float AL_REVERB_MAX_DECAY_HFRATIO = 2.0f; + float AL_REVERB_DEFAULT_DECAY_HFRATIO = 0.83f; + float AL_REVERB_MIN_REFLECTIONS_GAIN = 0.0f; + float AL_REVERB_MAX_REFLECTIONS_GAIN = 3.16f; + float AL_REVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f; + float AL_REVERB_MIN_REFLECTIONS_DELAY = 0.0f; + float AL_REVERB_MAX_REFLECTIONS_DELAY = 0.3f; + float AL_REVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f; + float AL_REVERB_MIN_LATE_REVERB_GAIN = 0.0f; + float AL_REVERB_MAX_LATE_REVERB_GAIN = 10.0f; + float AL_REVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f; + float AL_REVERB_MIN_LATE_REVERB_DELAY = 0.0f; + float AL_REVERB_MAX_LATE_REVERB_DELAY = 0.1f; + float AL_REVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f; + float AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f; + float AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f; + float AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f; + float AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + float AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + int AL_REVERB_MIN_DECAY_HFLIMIT = AL10.AL_FALSE; + int AL_REVERB_MAX_DECAY_HFLIMIT = AL10.AL_TRUE; + int AL_REVERB_DEFAULT_DECAY_HFLIMIT = AL10.AL_TRUE; + // EAX reverb + float AL_EAXREVERB_MIN_DENSITY = 0.0f; + float AL_EAXREVERB_MAX_DENSITY = 1.0f; + float AL_EAXREVERB_DEFAULT_DENSITY = 1.0f; + float AL_EAXREVERB_MIN_DIFFUSION = 0.0f; + float AL_EAXREVERB_MAX_DIFFUSION = 1.0f; + float AL_EAXREVERB_DEFAULT_DIFFUSION = 1.0f; + float AL_EAXREVERB_MIN_GAIN = 0.0f; + float AL_EAXREVERB_MAX_GAIN = 1.0f; + float AL_EAXREVERB_DEFAULT_GAIN = 0.32f; + float AL_EAXREVERB_MIN_GAINHF = 0.0f; + float AL_EAXREVERB_MAX_GAINHF = 1.0f; + float AL_EAXREVERB_DEFAULT_GAINHF = 0.89f; + float AL_EAXREVERB_MIN_GAINLF = 0.0f; + float AL_EAXREVERB_MAX_GAINLF = 1.0f; + float AL_EAXREVERB_DEFAULT_GAINLF = 1.0f; + float AL_EAXREVERB_MIN_DECAY_TIME = 0.1f; + float AL_EAXREVERB_MAX_DECAY_TIME = 20.0f; + float AL_EAXREVERB_DEFAULT_DECAY_TIME = 1.49f; + float AL_EAXREVERB_MIN_DECAY_HFRATIO = 0.1f; + float AL_EAXREVERB_MAX_DECAY_HFRATIO = 2.0f; + float AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = 0.83f; + float AL_EAXREVERB_MIN_DECAY_LFRATIO = 0.1f; + float AL_EAXREVERB_MAX_DECAY_LFRATIO = 2.0f; + float AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = 1.0f; + float AL_EAXREVERB_MIN_REFLECTIONS_GAIN = 0.0f; + float AL_EAXREVERB_MAX_REFLECTIONS_GAIN = 3.16f; + float AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f; + float AL_EAXREVERB_MIN_REFLECTIONS_DELAY = 0.0f; + float AL_EAXREVERB_MAX_REFLECTIONS_DELAY = 0.3f; + float AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f; + float AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = 0.0f; + float AL_EAXREVERB_MIN_LATE_REVERB_GAIN = 0.0f; + float AL_EAXREVERB_MAX_LATE_REVERB_GAIN = 10.0f; + float AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f; + float AL_EAXREVERB_MIN_LATE_REVERB_DELAY = 0.0f; + float AL_EAXREVERB_MAX_LATE_REVERB_DELAY = 0.1f; + float AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f; + float AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = 0.0f; + float AL_EAXREVERB_MIN_ECHO_TIME = 0.075f; + float AL_EAXREVERB_MAX_ECHO_TIME = 0.25f; + float AL_EAXREVERB_DEFAULT_ECHO_TIME = 0.25f; + float AL_EAXREVERB_MIN_ECHO_DEPTH = 0.0f; + float AL_EAXREVERB_MAX_ECHO_DEPTH = 1.0f; + float AL_EAXREVERB_DEFAULT_ECHO_DEPTH = 0.0f; + float AL_EAXREVERB_MIN_MODULATION_TIME = 0.04f; + float AL_EAXREVERB_MAX_MODULATION_TIME = 4.0f; + float AL_EAXREVERB_DEFAULT_MODULATION_TIME = 0.25f; + float AL_EAXREVERB_MIN_MODULATION_DEPTH = 0.0f; + float AL_EAXREVERB_MAX_MODULATION_DEPTH = 1.0f; + float AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = 0.0f; + float AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f; + float AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f; + float AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f; + float AL_EAXREVERB_MIN_HFREFERENCE = 1000.0f; + float AL_EAXREVERB_MAX_HFREFERENCE = 20000.0f; + float AL_EAXREVERB_DEFAULT_HFREFERENCE = 5000.0f; + float AL_EAXREVERB_MIN_LFREFERENCE = 20.0f; + float AL_EAXREVERB_MAX_LFREFERENCE = 1000.0f; + float AL_EAXREVERB_DEFAULT_LFREFERENCE = 250.0f; + float AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + float AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + int AL_EAXREVERB_MIN_DECAY_HFLIMIT = AL10.AL_FALSE; + int AL_EAXREVERB_MAX_DECAY_HFLIMIT = AL10.AL_TRUE; + int AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = AL10.AL_TRUE; + // Chorus + int AL_CHORUS_WAVEFORM_SINUSOID = 0; + int AL_CHORUS_WAVEFORM_TRIANGLE = 1; + int AL_CHORUS_MIN_WAVEFORM = 0; + int AL_CHORUS_MAX_WAVEFORM = 1; + int AL_CHORUS_DEFAULT_WAVEFORM = 1; + int AL_CHORUS_MIN_PHASE = -180; + int AL_CHORUS_MAX_PHASE = 180; + int AL_CHORUS_DEFAULT_PHASE = 90; + float AL_CHORUS_MIN_RATE = 0.0f; + float AL_CHORUS_MAX_RATE = 10.0f; + float AL_CHORUS_DEFAULT_RATE = 1... [truncated message content] |
From: <ma...@us...> - 2010-05-24 22:39:12
|
Revision: 3353 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3353&view=rev Author: matzon Date: 2010-05-24 22:39:06 +0000 (Mon, 24 May 2010) Log Message: ----------- bump version to 2.5 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-05-24 22:37:11 UTC (rev 3352) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-05-24 22:39:06 UTC (rev 3353) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.4.2" /> + <property name="lwjgl.version" value="2.5" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-05-24 22:37:11 UTC (rev 3352) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-05-24 22:39:06 UTC (rev 3353) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.4.2"; + private static final String VERSION = "2.5"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-05-27 22:56:36
|
Revision: 3355 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3355&view=rev Author: spasi Date: 2010-05-27 22:56:29 +0000 (Thu, 27 May 2010) Log Message: ----------- Added PixelFormat support for framebuffer CSAA (NV_multisample_coverage, WGL & GLX only). Added support for AMD_name_gen_delete and AMD_debug_output. The AMDDebugOutputCallback class enables query-less message handling. Added support for extension aliases. Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java trunk/LWJGL/src/java/org/lwjgl/util/generator/AutoSize.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLpointer.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/native/common/extgl.h trunk/LWJGL/src/native/linux/context.c trunk/LWJGL/src/native/linux/extgl_glx.c trunk/LWJGL/src/native/linux/extgl_glx.h trunk/LWJGL/src/native/windows/context.c trunk/LWJGL/src/native/windows/extgl_wgl.c trunk/LWJGL/src/native/windows/extgl_wgl.h trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object_rgb32.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression_bptc.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Alias.java trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_debug_output.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_multisample_coverage.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/build.xml 2010-05-27 22:56:29 UTC (rev 3355) @@ -253,6 +253,7 @@ <class name="org.lwjgl.openal.AL" /> <class name="org.lwjgl.opengl.GLContext" /> <class name="org.lwjgl.opengl.Pbuffer" /> + <class name="org.lwjgl.opengl.AMDDebugOutputCallback" /> </javah> </target> Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/platform_build/build-generator.xml 2010-05-27 22:56:29 UTC (rev 3355) @@ -13,8 +13,10 @@ <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator"> <compilerarg value="-Xlint:all"/> </javac> + <!-- Compile helper classes used by the templates --> <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.4" target="1.4" taskname="generator"> <include name="org/lwjgl/opengl/GLSync.java"/> + <include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/> <include name="org/lwjgl/opengl/PointerWrapper.java"/> </javac> </target> Added: trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2002-2008 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; + +/** + * Instances of this class are needed to use the callback functionality of the AMD_debug_output extension. + * A debug context must be current before creating instances of this class. Users of this class may provide + * implementations of the {@code Handler} interface to receive notifications. The same {@code Handler} + * instance may be used by different contexts but it is not recommended. Handler notifications are synchronized. + * + * @author Spasi + */ +public final class AMDDebugOutputCallback implements PointerWrapper { + + /** Severity levels. */ + private static final int GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147, + GL_DEBUG_SEVERITY_LOW_AMD = 0x9148; + + /** Categories */ + private static final int GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149, + GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A, + GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B, + GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C, + GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D, + GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E, + GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F, + GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150; + + private final long pointer; + + /** + * Creates a AMDDebugOutputCallback with a default callback handler. + * The default handler will simply print the message on System.err. + */ + public AMDDebugOutputCallback() { + this(new Handler() { + public void handleMessage(final int id, final int category, final int severity, final String message) { + System.err.println("[LWJGL] AMD_debug_output message"); + System.err.println("\tID: " + id); + + String description; + switch ( category ) { + case GL_DEBUG_CATEGORY_API_ERROR_AMD: + description = "API ERROR"; + break; + case GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD: + description = "WINDOW SYSTEM"; + break; + case GL_DEBUG_CATEGORY_DEPRECATION_AMD: + description = "DEPRECATION"; + break; + case GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD: + description = "UNDEFINED BEHAVIOR"; + break; + case GL_DEBUG_CATEGORY_PERFORMANCE_AMD: + description = "PERFORMANCE"; + break; + case GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD: + description = "SHADER COMPILER"; + break; + case GL_DEBUG_CATEGORY_APPLICATION_AMD: + description = "APPLICATION"; + break; + case GL_DEBUG_CATEGORY_OTHER_AMD: + description = "OTHER"; + break; + default: + description = "Unknown (" + Integer.toHexString(category) + ")"; + } + System.err.println("\tCategory: " + description); + + switch ( severity ) { + case GL_DEBUG_SEVERITY_HIGH_AMD: + description = "HIGH"; + break; + case GL_DEBUG_SEVERITY_MEDIUM_AMD: + description = "MEDIUM"; + break; + case GL_DEBUG_SEVERITY_LOW_AMD: + description = "LOW"; + break; + default: + description = "Unknown (" + Integer.toHexString(category) + ")"; + } + System.err.println("\tSeverity: " + description); + + System.err.println("\tMessage: " + message); + } + }); + } + + /** + * Creates a AMDDebugOutputCallback with the specified callback handlers. + * The handler's {@code handleMessage} method will be called whenever + * debug output is generated by the GL. + * + * @param handler the callback handler + */ + public AMDDebugOutputCallback(final Handler handler) { + try { + // We have to call registerHandler reflectively because we need this class to compile before we run the Generator. + // The registerHandler method depends on org.lwjgl.opengl.Context, if we touched that we would need to compile + // the whole library (which is not possible). + Class.forName("org.lwjgl.opengl.AMDDebugOutputUtil").getMethod("registerHandler", new Class[] { Handler.class }).invoke(null, new Object[] { handler }); + } catch (Exception e) { + throw new RuntimeException(e.getCause() != null ? e.getCause() : e); + } + this.pointer = getFunctionPointer(); + } + + public long getPointer() { + return pointer; + } + + private static native long getFunctionPointer(); + + /** Implementations of this interface can be used to receive AMD_debug_output notifications. */ + public interface Handler { + + /** + * This method will be called when an AMD_debug_output message is generated. + * + * @param id the message ID + * @param category the message category + * @param severity the message severity + * @param message the string representation of the message. + */ + void handleMessage(int id, int category, int severity, String message); + + } + +} Added: trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -0,0 +1,59 @@ +package org.lwjgl.opengl; + +import org.lwjgl.opengl.AMDDebugOutputCallback.Handler; + +import java.nio.ByteBuffer; +import java.util.Map; +import java.util.WeakHashMap; + +/** + * This class handles AMDDebugOutputCallback.Handler registration and notification. + * We could have put this in AMDDebugOutputCallback, but we need to compile it for + * the generator. Registration is done reflectively in the AMDDebugOutputCallback + * constructor. + * + * @author Spasi + */ +final class AMDDebugOutputUtil { + + private static final Map handlers = new WeakHashMap(); + + private AMDDebugOutputUtil() {} + + public static void registerHandler(final Handler handler) { + final Context ctx = Context.getCurrentContext(); + if ( ctx == null ) + throw new IllegalStateException("No context is current."); + + if ( !ctx.getContextAttribs().isDebug() ) + throw new IllegalStateException("The current context is not a debug context."); + + if ( !GLContext.getCapabilities().GL_AMD_debug_output ) + throw new IllegalStateException("AMD_debug_output is not supported."); + + handlers.put(ctx, handler); + } + + /** + * This method is called by native code. If finds the callback handler associated + * with the current Thread and calls its {@code handleMessage} method. + * + * @param id the message ID + * @param category the message category + * @param severity the message severity + * @param message the string representation of the message. + * @param userParam the user-specified data specified in glDebugMessageCallbackAMD. For the current implementation this is always null and we ignore it. + */ + private static void messageCallback(final int id, final int category, final int severity, final String message, final ByteBuffer userParam) { + synchronized ( GlobalLock.lock ) { + final Context ctx = Context.getCurrentContext(); + if ( ctx == null ) + return; + + final Handler handler = (Handler)handlers.get(ctx); + if ( handler != null ) + handler.handleMessage(id, category, severity, message); + } + } + +} Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -5,7 +5,6 @@ /** * @author Spasi - * @since 22 \xC1\xF0\xF1 2010 */ abstract class AbstractDrawable implements DrawableLWJGL { @@ -79,4 +78,4 @@ throw new IllegalStateException("The Drawable has no context available."); } -} \ No newline at end of file +} Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -4,7 +4,6 @@ /** * @author Spasi - * @since 23 \xC1\xF0\xF1 2010 */ interface DrawableLWJGL extends Drawable { @@ -22,4 +21,4 @@ */ Context createSharedContext() throws LWJGLException; -} \ No newline at end of file +} Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -169,6 +169,22 @@ return 0; } + /** + * Helper method to get a pointer to a named function with aliases in the OpenGL library. + * + * @param aliases the function name aliases. + * + * @return the function pointer address + */ + static long getFunctionAddress(String[] aliases) { + for ( int i = 0; i < aliases.length; i++ ) { + long address = getFunctionAddress(aliases[i]); + if ( address != 0 ) + return address; + } + return 0; + } + /** Helper method to get a pointer to a named function in the OpenGL library */ static native long getFunctionAddress(String name); Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -66,6 +66,14 @@ * 0 means that anti-aliasing is disabled. */ private int samples; + /** + * The number of COLOR_SAMPLES_NV to use for Coverage Sample Anti-aliasing (CSAA). + * When this number is greater than 0, the {@code samples} property will be treated + * as if it were the COVERAGE_SAMPLES_NV property. + * <p/> + * This property is currently a no-op for the MacOS implementation. + */ + private int colorSamples; /** The number of auxiliary buffers */ private int num_aux_buffers; /** The number of bits per pixel in the accumulation buffer */ @@ -76,9 +84,15 @@ private boolean stereo; /** Whether this format specifies a floating point format */ private boolean floating_point; - /** Whether this format specifies a packed floating point format (32 bit unsigned - R11F_G11F_B10F) */ + /** + * Whether this format specifies a packed floating point format (32 bit unsigned - R11F_G11F_B10F) + * This property is currently a no-op for the MacOS implementation. + */ private boolean floating_point_packed; - /** Whether this format specifies an sRGB format */ + /** + * Whether this format specifies an sRGB format + * This property is currently a no-op for the MacOS implementation. + */ private boolean sRGB; /** @@ -132,6 +146,7 @@ this.stencil = pf.stencil; this.samples = pf.samples; + this.colorSamples = pf.colorSamples; this.num_aux_buffers = pf.num_aux_buffers; @@ -245,6 +260,38 @@ return pf; } + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples values. + * A value greater than 0 is valid only if the {@code samples} property is also greater than 0. Additionally, the + * color samples value needs to be lower than or equal to the {@code samples} property. + * + * @param colorSamples the new color samples value. + * + * @return the new PixelFormat + */ + public PixelFormat withCoverageSamples(final int colorSamples) { + return withCoverageSamples(colorSamples, samples); + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples + * and coverage samples values. + * + * @param colorSamples the new color samples value. This value must be lower than or equal to the coverage samples value. + * @param coverageSamples the new coverage samples value. + * + * @return the new PixelFormat + */ + public PixelFormat withCoverageSamples(final int colorSamples, final int coverageSamples) { + if ( coverageSamples < 0 || colorSamples < 0 || (coverageSamples == 0 && 0 < colorSamples) || coverageSamples < colorSamples ) + throw new IllegalArgumentException("Invalid number of coverage samples specified: " + coverageSamples + " - " + colorSamples); + + final PixelFormat pf = new PixelFormat(this); + pf.samples = coverageSamples; + pf.colorSamples = colorSamples; + return pf; + } + public int getAuxBuffers() { return num_aux_buffers; } Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -35,7 +35,6 @@ /** * @author Spasi - * @since 20 \xC1\xF0\xF1 2010 */ /** @@ -55,4 +54,4 @@ throw new UnsupportedOperationException(); } -} \ No newline at end of file +} Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -148,7 +148,7 @@ boolean success = false; boolean check; - if ( majorInput < 3 || minorInput == 0 ) { + if ( majorInput < 3 || (majorInput == 3 && minorInput == 0) ) { System.out.println("\nA version less than or equal to 3.0 is requested, the context\n" + "returned may implement any of the following versions:"); @@ -252,4 +252,4 @@ System.exit(-1); } -} \ No newline at end of file +} Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/Alias.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Alias.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Alias.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 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.util.generator; + +/** + * This annotation can be used for extensions that have aliases + * with the exact same functionality. + * <p/> + * This is currently only implemented for context-specific functionality. + * + * @author Spasi <sp...@us...> + */ +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +public @interface Alias { + + /** The aliased extension name. */ + String value(); + + /** The function name postfix for the aliased version. (optional) */ + String postfix() default ""; + +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/AutoSize.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/AutoSize.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/AutoSize.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -49,4 +49,5 @@ public @interface AutoSize { String value(); // The name of the Buffer parameter String expression() default ""; // This value is added after the argument + boolean canBeNull() default false; // When this is true and the Buffer parameter is null, 0 will be used. } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -51,13 +51,13 @@ */ public class ContextCapabilitiesGenerator { - private final static String STUBS_LOADED_NAME = "loaded_stubs"; - private final static String ALL_INIT_METHOD_NAME = "initAllStubs"; - private final static String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses"; - private final static String CACHED_EXTS_VAR_NAME = "supported_extensions"; - private final static String PROFILE_MASK_VAR_NAME = "profileMask"; - private final static String EXTENSION_PREFIX = "GL_"; - private final static String CORE_PREFIX = "Open"; + private static final String STUBS_LOADED_NAME = "loaded_stubs"; + private static final String ALL_INIT_METHOD_NAME = "initAllStubs"; + private static final String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses"; + private static final String CACHED_EXTS_VAR_NAME = "supported_extensions"; + private static final String PROFILE_MASK_VAR_NAME = "profileMask"; + private static final String EXTENSION_PREFIX = "GL_"; + private static final String CORE_PREFIX = "Open"; public static void generateClassPrologue(PrintWriter writer, boolean context_specific, boolean generate_error_checks) { writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {"); @@ -108,6 +108,12 @@ writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\""); writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")"); } + Alias alias_annotation = d.getAnnotation(Alias.class); + if ( alias_annotation != null ) { + writer.println(); + writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(alias_annotation.value()) + "\")"); + } writer.println(";"); } @@ -164,10 +170,19 @@ public static void generateInitStubs(PrintWriter writer, InterfaceDeclaration d, boolean context_specific) { if ( d.getMethods().size() > 0 ) { if ( context_specific ) { + final Alias alias_annotation = d.getAnnotation(Alias.class); + if ( d.getAnnotation(ForceInit.class) != null ) writer.println("\t\t" + CACHED_EXTS_VAR_NAME + ".add(\"" + translateFieldName(d.getSimpleName()) + "\");"); - writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print("\t\tif ("); + if ( alias_annotation != null ) + writer.print("("); + writer.print(CACHED_EXTS_VAR_NAME + ".contains(\""); writer.print(translateFieldName(d.getSimpleName()) + "\")"); + if ( alias_annotation != null ) { + writer.print(" || " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(alias_annotation.value()) + "\"))"); + } writer.print(" && !" + getAddressesInitializerName(d.getSimpleName()) + "("); if ( d.getAnnotation(DeprecatedGL.class) != null ) writer.print("forwardCompatible"); @@ -176,10 +191,16 @@ writer.print(","); writer.print("supported_extensions"); } - writer.println("))"); - //writer.print("\t\t\t" + CACHED_EXTS_VAR_NAME + ".remove(\""); + if ( alias_annotation != null ) { + writer.println(")) {"); + writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \""); + writer.println(translateFieldName(alias_annotation.value()) + "\");"); + } else + writer.println("))"); writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \""); writer.println(translateFieldName(d.getSimpleName()) + "\");"); + if ( alias_annotation != null ) + writer.println("\t\t}"); } else { writer.print("\t\tGLContext." + Utils.STUB_INITIALIZER_NAME + "(" + Utils.getSimpleClassName(d)); writer.println(".class, " + CACHED_EXTS_VAR_NAME + ", \"" + translateFieldName(d.getSimpleName()) + "\");"); @@ -210,6 +231,9 @@ writer.print("Set supported_extensions"); } + Alias alias_annotation = d.getAnnotation(Alias.class); + boolean aliased = alias_annotation != null && alias_annotation.postfix().length() > 0; + writer.println(") {"); writer.println("\t\treturn "); @@ -266,9 +290,12 @@ writer.print(", "); } writer.print("}, "); + } else if ( aliased ) { + writer.print("GLContext.getFunctionAddress(new String[] {\"" + method.getSimpleName() + "\",\"" + method.getSimpleName() + alias_annotation.postfix() + "\"})) != 0"); } else writer.print("GLContext.getFunctionAddress("); - writer.print("\"" + method.getSimpleName() + "\")) != 0"); + if ( !aliased ) + writer.print("\"" + method.getSimpleName() + "\")) != 0"); if ( deprecated || dependent != null ) writer.print(')'); if ( optional ) Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/FieldsGenerator.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -32,70 +32,90 @@ package org.lwjgl.util.generator; -import com.sun.mirror.declaration.*; -import com.sun.mirror.type.*; +import java.io.PrintWriter; +import java.util.Collection; -import java.io.*; -import java.util.*; +import com.sun.mirror.declaration.FieldDeclaration; +import com.sun.mirror.declaration.Modifier; +import com.sun.mirror.type.PrimitiveType; +import com.sun.mirror.type.TypeMirror; public class FieldsGenerator { + private static void validateField(FieldDeclaration field) { - // Check if field is "public static final" - Collection<Modifier> modifiers = field.getModifiers(); - if (modifiers.size() != 3 - || !modifiers.contains(Modifier.PUBLIC) - || !modifiers.contains(Modifier.STATIC) - || !modifiers.contains(Modifier.FINAL)) { - throw new RuntimeException("Field " + field.getSimpleName() + " is not declared public static final"); - } + // Check if field is "public static final" + Collection<Modifier> modifiers = field.getModifiers(); + if ( modifiers.size() != 3 + || !modifiers.contains(Modifier.PUBLIC) + || !modifiers.contains(Modifier.STATIC) + || !modifiers.contains(Modifier.FINAL) ) { + throw new RuntimeException("Field " + field.getSimpleName() + " is not declared public static final"); + } - // Check suported types (int, long, float, String) - TypeMirror field_type = field.getType(); - if (field_type instanceof PrimitiveType) { - PrimitiveType field_type_prim = (PrimitiveType) field_type; - PrimitiveType.Kind field_kind = field_type_prim.getKind(); - if (field_kind != PrimitiveType.Kind.INT - && field_kind != PrimitiveType.Kind.LONG - && field_kind != PrimitiveType.Kind.FLOAT) { - throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'"); - } - } else if (field_type.toString().equals("java.lang.String")) { - } else { - throw new RuntimeException("Field " + field.getSimpleName() + " is not a primitive type or String"); - } + // Check suported types (int, long, float, String) + TypeMirror field_type = field.getType(); + if ( field_type instanceof PrimitiveType ) { + PrimitiveType field_type_prim = (PrimitiveType)field_type; + PrimitiveType.Kind field_kind = field_type_prim.getKind(); + if ( field_kind != PrimitiveType.Kind.INT + && field_kind != PrimitiveType.Kind.LONG + && field_kind != PrimitiveType.Kind.FLOAT ) { + throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'"); + } + } else if ( "java.lang.String".equals(field_type.toString()) ) { + } else { + throw new RuntimeException("Field " + field.getSimpleName() + " is not a primitive type or String"); + } - Object field_value = field.getConstantValue(); - if (field_value == null) { - throw new RuntimeException("Field " + field.getSimpleName() + " has no initial value"); - } + Object field_value = field.getConstantValue(); + if ( field_value == null ) { + throw new RuntimeException("Field " + field.getSimpleName() + " has no initial value"); + } } - private static void generateField(PrintWriter writer, FieldDeclaration field) { - validateField(field); + private static void generateField(PrintWriter writer, FieldDeclaration field, FieldDeclaration prev_field) { + validateField(field); - Object value = field.getConstantValue(); - String field_value_string; - Class field_value_class = value.getClass(); - if (field_value_class.equals(Integer.class)) { - field_value_string = "0x" + Integer.toHexString((Integer) field.getConstantValue()); - } else if (field_value_class.equals(Long.class)) { - field_value_string = "0x" + Long.toHexString((Long) field.getConstantValue()) + 'l'; - } else if (field_value_class.equals(Float.class)) { - field_value_string = field.getConstantValue() + "f"; - } else if (field_value_class.equals(String.class)) { - field_value_string = "\"" + field.getConstantValue() + "\""; - } else { - throw new RuntimeException("Field is of unexpected type. This means there is a bug in validateField()."); - } + Object value = field.getConstantValue(); + String field_value_string; + Class field_value_class = value.getClass(); + if ( field_value_class.equals(Integer.class) ) { + field_value_string = "0x" + Integer.toHexString((Integer)field.getConstantValue()).toUpperCase(); + } else if ( field_value_class.equals(Long.class) ) { + field_value_string = "0x" + Long.toHexString((Long)field.getConstantValue()).toUpperCase() + 'L'; + } else if ( field_value_class.equals(Float.class) ) { + field_value_string = field.getConstantValue() + "f"; + } else if ( field_value_class.equals(String.class) ) { + field_value_string = "\"" + field.getConstantValue() + "\""; + } else { + throw new RuntimeException("Field is of unexpected type. This means there is a bug in validateField()."); + } - Utils.printDocComment(writer, field); - // Print field declaration - writer.println("\tpublic static final " + field.getType().toString() + " " + field.getSimpleName() + " = " + field_value_string + ";"); + boolean hadDoc = prev_field != null && prev_field.getDocComment() != null; + boolean hasDoc = field.getDocComment() != null; + boolean newBatch = prev_field == null || !prev_field.getType().equals(field.getType()) || (!hadDoc && field.getDocComment() != null) || (hadDoc && hasDoc && !prev_field.getDocComment().equals(field.getDocComment())); + + // Print field declaration + if ( newBatch ) { + if ( prev_field != null ) + writer.println(";\n"); + + Utils.printDocComment(writer, field); + writer.print("\tpublic static final " + field.getType().toString() + " " + field.getSimpleName() + " = " + field_value_string); + } else + writer.print(",\n\t\t" + field.getSimpleName() + " = " + field_value_string); } public static void generateFields(PrintWriter writer, Collection<FieldDeclaration> fields) { - for (FieldDeclaration field : fields) - generateField(writer, field); + if ( 0 < fields.size() ) { + writer.println(); + FieldDeclaration prev_field = null; + for ( FieldDeclaration field : fields ) { + generateField(writer, field, prev_field); + prev_field = field; + } + writer.println(";"); + } } } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLpointer.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLpointer.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLpointer.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -40,4 +40,5 @@ @Target({ElementType.PARAMETER, ElementType.METHOD}) public @interface GLpointer { String value(); // The native pointer type. + boolean canBeNull() default false; // Whether the pointer may be null. } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -201,12 +201,12 @@ java_writer.println(); if (is_final) { // Write private constructor to avoid instantiation - java_writer.println("\tprivate " + Utils.getSimpleClassName(d) + "() {"); - java_writer.println("\t}"); + java_writer.println("\tprivate " + Utils.getSimpleClassName(d) + "() {}"); + } + if (d.getMethods().size() > 0 && !context_specific) { java_writer.println(); + java_writer.println("\tstatic native void " + Utils.STUB_INITIALIZER_NAME + "() throws LWJGLException;"); } - if (d.getMethods().size() > 0 && !context_specific) - java_writer.println("\tstatic native void " + Utils.STUB_INITIALIZER_NAME + "() throws LWJGLException;"); JavaMethodsGenerator.generateMethodsJava(env, type_map, java_writer, d, generate_error_checks, context_specific); java_writer.println("}"); java_writer.close(); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -387,7 +387,10 @@ String auto_parameter_name = auto_type_annotation.value(); ParameterDeclaration auto_target_param = Utils.findParameter(method, auto_parameter_name); TypeInfo auto_target_type_info = typeinfos_instance.get(auto_target_param); - writer.print("(" + auto_parameter_name + ".remaining()"); + if ( auto_type_annotation.canBeNull() ) + writer.print("((" + auto_parameter_name + " == null ? 0 : " + auto_parameter_name + ".remaining())"); + else + writer.print("(" + auto_parameter_name + ".remaining()"); // Shift the remaining if the target parameter is multityped and there's no AutoType to track type boolean shift_remaining = !hasAnyParameterAutoTypeAnnotation(method, auto_target_param) && Utils.isParameterMultiTyped(auto_target_param); if (shift_remaining) { @@ -446,8 +449,13 @@ writer.print(offset == null ? "0" : offset); } else writer.print("0"); - } else if ( param.getAnnotation(GLpointer.class) != null ) { - writer.print(".getPointer()"); + } else { + GLpointer pointer_annotation = param.getAnnotation(GLpointer.class); + if ( pointer_annotation != null ) { + if ( pointer_annotation.canBeNull() ) + writer.print(" == null ? 0 : " + param.getSimpleName()); + writer.print(".getPointer()"); + } } } } Modified: trunk/LWJGL/src/native/common/extgl.h =================================================================== --- trunk/LWJGL/src/native/common/extgl.h 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/common/extgl.h 2010-05-27 22:56:29 UTC (rev 3355) @@ -133,6 +133,9 @@ typedef uint64_t GLuint64; typedef struct __GLsync *GLsync; +/* AMD_debug_output callback function pointer. */ +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); + /* helper stuff */ /* initializes everything, call this right after the rc is created. the function returns true if successful */ Added: trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c (rev 0) +++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c 2010-05-27 22:56:29 UTC (rev 3355) @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 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. + */ + +/** + * JNI implementation of the AMD_debug_output function callback. + * + * @author Spasi + */ + +#include <jni.h> +#include "common_tools.h" +#include "extgl.h" +#include "org_lwjgl_opengl_AMDDebugOutputCallback.h" + +static void APIENTRY debugOutputCallback(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + jclass callback_class; + jmethodID callback_method; + JNIEnv *env = getThreadEnv(); + if (env != NULL && !(*env)->ExceptionOccurred(env)) { + callback_class = (*env)->FindClass(env, "org/lwjgl/opengl/AMDDebugOutputUtil"); + if ( callback_class != NULL ) { + callback_method = (*env)->GetStaticMethodID(env, callback_class, "messageCallback", "(IIILjava/lang/String;Ljava/nio/ByteBuffer;)V"); + if ( callback_method != NULL ) { + (*env)->CallStaticVoidMethod(env, callback_class, callback_method, + (jint)id, + (jint)category, + (jint)severity, + NewStringNativeWithLength(env, message, length), + NULL + ); + } + } + } +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_AMDDebugOutputCallback_getFunctionPointer(JNIEnv *env, jclass clazz) { + return (jlong)(intptr_t)&debugOutputCallback; +} Modified: trunk/LWJGL/src/native/linux/context.c =================================================================== --- trunk/LWJGL/src/native/linux/context.c 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/linux/context.c 2010-05-27 22:56:29 UTC (rev 3355) @@ -119,6 +119,7 @@ int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); @@ -161,7 +162,9 @@ // Assume the caller has checked support for multisample if (samples > 0) { putAttrib(&attrib_list, GLX_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); - putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); + putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); // GLX_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) + putAttrib(&attrib_list, GLX_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); } if (sRGB) { putAttrib(&attrib_list, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB); putAttrib(&attrib_list, True); @@ -199,6 +202,7 @@ int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); @@ -228,7 +232,9 @@ // Assume the caller has checked support for multisample if (samples > 0) { putAttrib(&attrib_list, GLX_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); - putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); + putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); // GLX_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) + putAttrib(&attrib_list, GLX_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); } if (sRGB) putAttrib(&attrib_list, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB); @@ -289,6 +295,11 @@ throwException(env, "Samples > 0 specified but there's no support for GLX_ARB_multisample"); return false; } + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + if (colorSamples > 0 && !extension_flags.GLX_NV_multisample_coverage) { + throwException(env, "Color samples > 0 specified but there's no support for GLX_NV_multisample_coverage"); + return false; + } bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); if (floating_point && !(extension_flags.GLX13 && extension_flags.GLX_ARB_fbconfig_float)) { // We need GLX13 to support floating point throwException(env, "Floating point specified but there's no support for GLX_ARB_fbconfig_float"); Modified: trunk/LWJGL/src/native/linux/extgl_glx.c =================================================================== --- trunk/LWJGL/src/native/linux/extgl_glx.c 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/linux/extgl_glx.c 2010-05-27 22:56:29 UTC (rev 3355) @@ -160,6 +160,7 @@ extension_flags->GLX_EXT_fbconfig_packed_float = GLXQueryExtension(disp, screen, "GLX_EXT_fbconfig_packed_float"); extension_flags->GLX_ARB_framebuffer_sRGB = GLXQueryExtension(disp, screen, "GLX_ARB_framebuffer_sRGB") || GLXQueryExtension(disp, screen, "GLX_EXT_framebuffer_sRGB"); extension_flags->GLX_ARB_create_context = GLXQueryExtension(disp, screen, "GLX_ARB_create_context"); + extension_flags->GLX_NV_multisample_coverage = GLXQueryExtension(disp, screen, "GLX_NV_multisample_coverage"); } bool extgl_Open(JNIEnv *env) { Modified: trunk/LWJGL/src/native/linux/extgl_glx.h =================================================================== --- trunk/LWJGL/src/native/linux/extgl_glx.h 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/linux/extgl_glx.h 2010-05-27 22:56:29 UTC (rev 3355) @@ -271,6 +271,11 @@ #define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001 #define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 +/* GLX_NV_multisample_coverage */ +#define GLX_COVERAGE_SAMPLES_NV 100001 +#define GLX_COLOR_SAMPLES_NV 0x20B3 + + typedef XID GLXContextID; typedef XID GLXPixmap; typedef XID GLXDrawable; @@ -346,6 +351,7 @@ bool GLX_EXT_fbconfig_packed_float; bool GLX_ARB_framebuffer_sRGB; bool GLX_ARB_create_context; + bool GLX_NV_multisample_coverage; } GLXExtensions; /* Add _ to global symbols to avoid symbol clash with the OpenGL library */ Modified: trunk/LWJGL/src/native/windows/context.c =================================================================== --- trunk/LWJGL/src/native/windows/context.c 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/windows/context.c 2010-05-27 22:56:29 UTC (rev 3355) @@ -187,6 +187,7 @@ int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); @@ -234,7 +235,9 @@ // Assume caller checked extension availability if (samples > 0) { putAttrib(&attrib_list, WGL_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); - putAttrib(&attrib_list, WGL_SAMPLES_ARB); putAttrib(&attrib_list, samples); + putAttrib(&attrib_list, WGL_SAMPLES_ARB); putAttrib(&attrib_list, samples); // WGL_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) + putAttrib(&attrib_list, WGL_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); } putAttrib(&attrib_list, WGL_ACCUM_BITS_ARB); putAttrib(&attrib_list, accum_bpp); putAttrib(&attrib_list, WGL_ACCUM_ALPHA_BITS_ARB); putAttrib(&attrib_list, accum_alpha); @@ -385,7 +388,7 @@ return findPixelFormatFromBPP(env, hdc, pixel_format, bpp, double_buffer); } -static bool validateAndGetExtensions(JNIEnv *env, WGLExtensions *extensions, HDC dummy_hdc, HGLRC dummy_hglrc, int samples, bool floating_point, bool floating_point_packed, bool sRGB, jobject pixelFormatCaps) { +static bool validateAndGetExtensions(JNIEnv *env, WGLExtensions *extensions, HDC dummy_hdc, HGLRC dummy_hglrc, int samples, int colorSamples, bool floating_point, bool floating_point_packed, bool sRGB, jobject pixelFormatCaps) { if (!wglMakeCurrent(dummy_hdc, dummy_hglrc)) { throwException(env, "Could not bind context to dummy window"); return false; @@ -400,6 +403,10 @@ throwException(env, "No support for WGL_ARB_multisample"); return false; } + if (colorSamples > 0 && !extensions->WGL_NV_multisample_coverage) { + throwException(env, "No support for WGL_NV_multisample_coverage"); + return false; + } /* * Apparently, some drivers don't report WGL_ARB_pixel_format_float * even though GL_ARB_color_buffer_float and WGL_ATI_color_format_float @@ -435,6 +442,7 @@ jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); @@ -461,7 +469,7 @@ // Save the current HDC and HGLRC to avoid disruption saved_current_hdc = wglGetCurrentDC(); saved_current_hglrc = wglGetCurrentContext(); - if (validateAndGetExtensions(env, &extensions, dummy_hdc, dummy_hglrc, samples, floating_point, floating_point_packed, sRGB, pixelFormatCaps)) { + if (validateAndGetExtensions(env, &extensions, dummy_hdc, dummy_hglrc, samples, colorSamples, floating_point, floating_point_packed, sRGB, pixelFormatCaps)) { pixel_format_id = findPixelFormatARB(env, hdc, &extensions, pixel_format, pixelFormatCaps, use_hdc_bpp, window, pbuffer, double_buffer); } wglMakeCurrent(saved_current_hdc, saved_current_hglrc); Modified: trunk/LWJGL/src/native/windows/extgl_wgl.c =================================================================== --- trunk/LWJGL/src/native/windows/extgl_wgl.c 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/windows/extgl_wgl.c 2010-05-27 22:56:29 UTC (rev 3355) @@ -152,6 +152,7 @@ extensions->WGL_ARB_framebuffer_sRGB = WGLQueryExtension(extensions, "WGL_ARB_framebuffer_sRGB") || WGLQueryExtension(extensions, "WGL_EXT_framebuffer_sRGB"); extensions->WGL_EXT_pixel_format_packed_float = WGLQueryExtension(extensions, "WGL_EXT_pixel_format_packed_float"); extensions->WGL_ARB_create_context = WGLQueryExtension(extensions, "WGL_ARB_create_context"); + extensions->WGL_NV_multisample_coverage = WGLQueryExtension(extensions, "WGL_NV_multisample_coverage"); } static void extgl_InitWGLEXTExtensionsString(WGLExtensions *extensions) { Modified: trunk/LWJGL/src/native/windows/extgl_wgl.h =================================================================== --- trunk/LWJGL/src/native/windows/extgl_wgl.h 2010-05-25 06:01:34 UTC (rev 3354) +++ trunk/LWJGL/src/native/windows/extgl_wgl.h 2010-05-27 22:56:29 UTC (rev 3355) @@ -200,6 +200,15 @@ typedef HGLRC (APIENTRY * wglCreateContextAttribsARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); +/*---------------------------------------------------------------------*/ +/*------------ WGL_NV_multisample_coverage ----------------------------*/ +/*---------------------------------------------------------------------*/ + +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 + +/*---------------------------------------------------------------------*/ + typedef struct { bool WGL_ARB_buffer_region; bool WGL_ARB_extensions_string; @@ -217,6 +226,7 @@ bool WGL_ARB_framebuffer_sRGB; bool WGL_EXT_pixel_format_packed_float; bool WGL_ARB_create_context; + bool WGL_NV_multisample_coverage; wglGetExtensionsStringEXTPROC wglGetExtensionsStringEXT; Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_debug_output.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_debug_output.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_debug_output.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2002-2008 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.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Alias(value = "AMDX_debug_output", postfix = "X") +public interface AMD_debug_output { + + /** Tokens accepted by GetIntegerv: */ + int GL_MAX_DEBUG_MESSAGE_LENGTH_AMD = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES_AMD = 0x9144, + GL_DEBUG_LOGGED_MESSAGES_AMD = 0x9145; + + /** + * Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + * DebugMessageInsertAMD, and DEBUGPROCAMD callback function + * for <severity>: + */ + int GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147, + GL_DEBUG_SEVERITY_LOW_AMD = 0x9148; + + /** + * Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + * and DEBUGPROCAMD callback function for <category>: + */ + int GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149, + GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A, + GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B, + GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C, + GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D, + GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E, + GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F, + GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150; + + void glDebugMessageEnableAMD(@GLenum int category, @GLenum int severity, @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, @Check(canBeNull = true) @Const @GLuint IntBuffer ids, boolean enabled); + + void glDebugMessageInsertAMD(@GLenum int category, @GLenum int severity, @GLuint int id, @AutoSize("buf") @GLsizei int length, @Const @GLchar ByteBuffer buf); + + @Alternate("glDebugMessageInsertAMD") + void glDebugMessageInsertAMD(@GLenum int category, @GLenum int severity, @GLuint int id, @Constant("buf.length()") @GLsizei int length, CharSequence buf); + + void glDebugMessageCallbackAMD(@GLpointer(value = "GLDEBUGPROCAMD", canBeNull = true) AMDDebugOutputCallback callback, @Check(canBeNull = true) @GLvoid ByteBuffer userParam); + + @GLuint + int glGetDebugMessageLogAMD(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int logSize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer categories, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java 2010-05-27 22:56:29 UTC (rev 3355) @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2008 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, +... [truncated message content] |
From: <ma...@us...> - 2010-07-15 19:07:58
|
Revision: 3381 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3381&view=rev Author: matzon Date: 2010-07-15 19:07:49 +0000 (Thu, 15 Jul 2010) Log Message: ----------- Trusted-Library + Signing changes, blame kappaOne for breakage... Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/libs/lzma.jar trunk/LWJGL/platform_build/build-webstart.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-07-14 13:12:24 UTC (rev 3380) +++ trunk/LWJGL/build.xml 2010-07-15 19:07:49 UTC (rev 3381) @@ -124,7 +124,6 @@ <fileset refid="lwjgl.fileset" /> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> @@ -133,7 +132,6 @@ <fileset refid="lwjgl_util_applet.fileset" /> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> Modified: trunk/LWJGL/libs/lzma.jar =================================================================== (Binary files differ) Modified: trunk/LWJGL/platform_build/build-webstart.xml =================================================================== --- trunk/LWJGL/platform_build/build-webstart.xml 2010-07-14 13:12:24 UTC (rev 3380) +++ trunk/LWJGL/platform_build/build-webstart.xml 2010-07-15 19:07:49 UTC (rev 3381) @@ -44,17 +44,22 @@ </move> <!-- update Trusted-Library --> - <jar destfile="${lwjgl.temp}/jnlp/jinput.jar" update="true"> + <jar destfile="${lwjgl.temp}/jnlp/lwjgl.jar" update="true"> <manifest> <attribute name="Sealed" value="true"/> <attribute name="Trusted-Library" value="true"/> </manifest> </jar> + <jar destfile="${lwjgl.temp}/jnlp/jinput.jar" update="true"> + <manifest> + <attribute name="Sealed" value="true"/> + </manifest> + </jar> + <jar destfile="${lwjgl.temp}/jnlp/lwjgl_util.jar" update="true"> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> @@ -62,33 +67,33 @@ <jar destfile="${lwjgl.temp}/jnlp/native_windows.jar" basedir="${lwjgl.temp}/jnlp/temp/native/windows"> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux"> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx"> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> <jar destfile="${lwjgl.temp}/jnlp/native_solaris.jar" basedir="${lwjgl.temp}/jnlp/temp/native/solaris"> <manifest> <attribute name="Sealed" value="true"/> - <attribute name="Trusted-Library" value="true"/> </manifest> </jar> <!-- create media jar --> - <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"/> + <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"> + <manifest> + <attribute name="Sealed" value="true"/> + </manifest> + </jar> <!-- sign 'em --> <signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> @@ -98,5 +103,6 @@ <signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> <signjar jar="${lwjgl.temp}/jnlp/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/jnlp/media.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> </target> </project> \ 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: <ka...@us...> - 2010-07-25 13:31:57
|
Revision: 3389 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3389&view=rev Author: kappa1 Date: 2010-07-25 13:31:49 +0000 (Sun, 25 Jul 2010) Log Message: ----------- AppletLoader: addded ability to use appletloader with no images, just the logo, just the progressbar or both. To set no image for either image you must set the parameter value to "". Both images are now centred independently allowing variable size logo and progressbar images. Resized appletprogress.gif to match appletlogo.png size. Modified Paths: -------------- trunk/LWJGL/res/appletprogress.gif trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java Modified: trunk/LWJGL/res/appletprogress.gif =================================================================== (Binary files differ) Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2010-07-25 12:18:17 UTC (rev 3388) +++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2010-07-25 13:31:49 UTC (rev 3389) @@ -283,14 +283,13 @@ setBackground(bgColor); fgColor = getColor("boxfgcolor", Color.black); - // load logos - logo = getImage(getParameter("al_logo")); - progressbar = getImage(getParameter("al_progressbar")); - - //sanity check - if(logo == null || progressbar == null) { - fatalErrorOccured("Unable to load logo and progressbar images", null); + // load logos, if value is "" then skip + if (!getParameter("al_logo").equals("")) { + logo = getImage(getParameter("al_logo")); } + if (!getParameter("al_progressbar").equals("")) { + progressbar = getImage(getParameter("al_progressbar")); + } // check for lzma support try { @@ -460,22 +459,27 @@ painting = true; - // get logo position so its in the middle of applet - int x = 0, y = 0; + // get position at the middle of the offscreen buffer + int x = offscreen.getWidth(null)/2; + int y = offscreen.getHeight(null)/2; - if(logo != null) { + /*if(logo != null) { x = (offscreen.getWidth(null) - logo.getWidth(null)) / 2; y = (offscreen.getHeight(null) - logo.getHeight(null)) / 2; - } + }*/ // draw logo - if (logo != null) og.drawImage(logoBuffer, x, y, this); + if (logo != null) { + og.drawImage(logoBuffer, x-logo.getWidth(null)/2, y-logo.getHeight(null)/2, this); + } // draw message int messageX = (offscreen.getWidth(null) - fm.stringWidth(message)) / 2; int messageY = y + 20; - if (logo != null) messageY += logoBuffer.getHeight(null); + if (logo != null) messageY += logo.getHeight(null)/2; + else if (progressbar != null) messageY += progressbar.getHeight(null)/2; + og.drawString(message, messageX, messageY); // draw subtaskmessage, if any @@ -486,9 +490,9 @@ // draw loading bar, clipping it depending on percentage done if (progressbar != null) { - int barSize = (progressbarBuffer.getWidth(null) * percentage) / 100; - og.clipRect(0, 0, x + barSize, offscreen.getHeight(null)); - og.drawImage(progressbarBuffer, x, y, this); + int barSize = (progressbar.getWidth(null) * percentage) / 100; + og.clipRect(x-progressbar.getWidth(null)/2, 0, barSize, offscreen.getHeight(null)); + og.drawImage(progressbarBuffer, x-progressbar.getWidth(null)/2, y-progressbar.getHeight(null)/2, this); } painting = false; @@ -527,7 +531,10 @@ g.fillRect(0, 0, buffer.getWidth(null), buffer.getHeight(null)); // buffer background is cleared, so draw logo under progressbar - if (img == progressbar && logo != null) g.drawImage(logoBuffer, 0, 0, null); + if (img == progressbar && logo != null) { + g.drawImage(logoBuffer, progressbar.getWidth(null)/2-logo.getWidth(null)/2, + progressbar.getHeight(null)/2-logo.getHeight(null)/2, null); + } g.drawImage(img, 0, 0, this); g.dispose(); @@ -1453,6 +1460,9 @@ } catch (Exception e) { /* */ } + + // show error as image could not be loaded + fatalErrorOccured("Unable to load logo and progressbar images", null); return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-07-27 15:33:29
|
Revision: 3392 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3392&view=rev Author: spasi Date: 2010-07-27 15:33:22 +0000 (Tue, 27 Jul 2010) Log Message: ----------- Added support for OpenGL 4.1 and new extensions. Modified Paths: -------------- trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java trunk/LWJGL/src/native/common/extgl.h trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputUtil.java trunk/LWJGL/src/native/common/org_lwjgl_opengl_ARBDebugOutputCallback.c trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_output.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robustness.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_precision.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_stencil_export.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_viewport_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/platform_build/build-generator.xml 2010-07-27 15:33:22 UTC (rev 3392) @@ -7,7 +7,7 @@ <fileset dir="${lwjgl.src.native}/generated" includes="**"/> </delete> </target> - + <!-- Compiles the Java generator source code --> <target name="generators" description="Compiles the native method generators"> <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator"> @@ -17,6 +17,7 @@ <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.4" target="1.4" taskname="generator"> <include name="org/lwjgl/opengl/GLSync.java"/> <include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/> + <include name="org/lwjgl/opengl/ARBDebugOutputCallback.java"/> <include name="org/lwjgl/opengl/PointerWrapper.java"/> </javac> </target> @@ -42,7 +43,7 @@ <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/> </apply> </target> - + <!-- Generate OpenAL [DEBUG] --> <target name="generate-openal-debug" depends="generators" description="Generates java and native source for AL"> <apply executable="apt" parallel="true"> @@ -111,7 +112,7 @@ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> </target> - + <!-- Generate context capabilities --> <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> @@ -125,8 +126,8 @@ <arg value="-Acontextspecific"/> <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> - </target> - + </target> + <!-- Generate context capabilities [DEBUG] --> <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> @@ -141,5 +142,5 @@ <arg value="-Acontextspecific"/> <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> - </target> + </target> </project> Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -59,7 +59,7 @@ private final long pointer; /** - * Creates a AMDDebugOutputCallback with a default callback handler. + * Creates an AMDDebugOutputCallback with a default callback handler. * The default handler will simply print the message on System.err. */ public AMDDebugOutputCallback() { @@ -120,7 +120,7 @@ } /** - * Creates a AMDDebugOutputCallback with the specified callback handlers. + * Creates an AMDDebugOutputCallback with the specified callback handlers. * The handler's {@code handleMessage} method will be called whenever * debug output is generated by the GL. * Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -28,7 +28,7 @@ if ( !ctx.getContextAttribs().isDebug() ) throw new IllegalStateException("The current context is not a debug context."); - if ( !GLContext.getCapabilities().GL_AMD_debug_output ) + if ( !GLContext.getCapabilities().GL_AMD_debug_output ) throw new IllegalStateException("AMD_debug_output is not supported."); handlers.put(ctx, handler); Added: trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2002-2008 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; + +/** + * Instances of this class are needed to use the callback functionality of the ARB_debug_output extension. + * A debug context must be current before creating instances of this class. Users of this class may provide + * implementations of the {@code Handler} interface to receive notifications. The same {@code Handler} + * instance may be used by different contexts but it is not recommended. Handler notifications are synchronized. + * + * @author Spasi + */ +public final class ARBDebugOutputCallback implements PointerWrapper { + + /** Severity levels. */ + private static final int + GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, + GL_DEBUG_SEVERITY_LOW_ARB = 0x9148; + + /** Sources. */ + private static final int + GL_DEBUG_SOURCE_API_ARB = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, + GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, + GL_DEBUG_SOURCE_OTHER_ARB = 0x824B; + + /** Types. */ + private static final int + GL_DEBUG_TYPE_ERROR_ARB = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, + GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, + GL_DEBUG_TYPE_OTHER_ARB = 0x8251; + + private final long pointer; + + /** + * Creates an ARBDebugOutputCallback with a default callback handler. + * The default handler will simply print the message on System.err. + */ + public ARBDebugOutputCallback() { + this(new Handler() { + public void handleMessage(final int source, final int type, final int id, final int severity, final String message) { + System.err.println("[LWJGL] ARB_debug_output message"); + System.err.println("\tID: " + id); + + String description; + switch ( source ) { + case GL_DEBUG_SOURCE_API_ARB: + description = "API"; + break; + case GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB: + description = "WINDOW SYSTEM"; + break; + case GL_DEBUG_SOURCE_SHADER_COMPILER_ARB: + description = "SHADER COMPILER"; + break; + case GL_DEBUG_SOURCE_THIRD_PARTY_ARB: + description = "THIRD PARTY"; + break; + case GL_DEBUG_SOURCE_APPLICATION_ARB: + description = "APPLICATION"; + break; + case GL_DEBUG_SOURCE_OTHER_ARB: + description = "OTHER"; + break; + default: + description = "Unknown (" + Integer.toHexString(source) + ")"; + } + System.err.println("\tSource: " + description); + + switch ( type ) { + case GL_DEBUG_TYPE_ERROR_ARB: + description = "ERROR"; + break; + case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB: + description = "DEPRECATED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB: + description = "UNDEFINED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_PORTABILITY_ARB: + description = "PORTABILITY"; + break; + case GL_DEBUG_TYPE_PERFORMANCE_ARB: + description = "PERFORMANCE"; + break; + case GL_DEBUG_TYPE_OTHER_ARB: + description = "OTHER"; + break; + default: + description = "Unknown (" + Integer.toHexString(source) + ")"; + } + System.err.println("\tType: " + description); + + switch ( severity ) { + case GL_DEBUG_SEVERITY_HIGH_ARB: + description = "HIGH"; + break; + case GL_DEBUG_SEVERITY_MEDIUM_ARB: + description = "MEDIUM"; + break; + case GL_DEBUG_SEVERITY_LOW_ARB: + description = "LOW"; + break; + default: + description = "Unknown (" + Integer.toHexString(source) + ")"; + } + System.err.println("\tSeverity: " + description); + + System.err.println("\tMessage: " + message); + } + }); + } + + /** + * Creates an ARBDebugOutputCallback with the specified callback handlers. + * The handler's {@code handleMessage} method will be called whenever + * debug output is generated by the GL. + * + * @param handler the callback handler + */ + public ARBDebugOutputCallback(final Handler handler) { + try { + // We have to call registerHandler reflectively because we need this class to compile before we run the Generator. + // The registerHandler method depends on org.lwjgl.opengl.Context, if we touched that we would need to compile + // the whole library (which is not possible). + Class.forName("org.lwjgl.opengl.ARBDebugOutputUtil").getMethod("registerHandler", new Class[] { Handler.class }).invoke(null, new Object[] { handler }); + } catch (Exception e) { + throw new RuntimeException(e.getCause() != null ? e.getCause() : e); + } + this.pointer = getFunctionPointer(); + } + + public long getPointer() { + return pointer; + } + + private static native long getFunctionPointer(); + + /** Implementations of this interface can be used to receive ARB_debug_output notifications. */ + public interface Handler { + + /** + * This method will be called when an AMD_debug_output message is generated. + * + * @param id the message ID + * @param source the message source + * @param type the message type + * @param severity the message severity + * @param message the string representation of the message. + */ + void handleMessage(int source, int type, int id, int severity, String message); + + } + +} \ No newline at end of file Added: trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputUtil.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputUtil.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputUtil.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,60 @@ +package org.lwjgl.opengl; + +import org.lwjgl.opengl.ARBDebugOutputCallback.Handler; + +import java.nio.ByteBuffer; +import java.util.Map; +import java.util.WeakHashMap; + +/** + * This class handles ARBDebugOutputCallback.Handler registration and notification. + * We could have put this in ARBDebugOutputCallback, but we need to compile it for + * the generator. Registration is done reflectively in the ARBDebugOutputCallback + * constructor. + * + * @author Spasi + */ +final class ARBDebugOutputUtil { + + private static final Map handlers = new WeakHashMap(); + + private ARBDebugOutputUtil() {} + + public static void registerHandler(final Handler handler) { + final Context ctx = Context.getCurrentContext(); + if ( ctx == null ) + throw new IllegalStateException("No context is current."); + + if ( !ctx.getContextAttribs().isDebug() ) + throw new IllegalStateException("The current context is not a debug context."); + + if ( !GLContext.getCapabilities().GL_ARB_debug_output ) + throw new IllegalStateException("ARB_debug_output is not supported."); + + handlers.put(ctx, handler); + } + + /** + * This method is called by native code. If finds the callback handler associated + * with the current Thread and calls its {@code handleMessage} method. + * + * @param source the message source + * @param type the message type + * @param id the message ID + * @param severity the message severity + * @param message the string representation of the message. + * @param userParam the user-specified data specified in glDebugMessageCallbackAMD. For the current implementation this is always null and we ignore it. + */ + private static void messageCallback(final int source, final int type, final int id, final int severity, final String message, final ByteBuffer userParam) { + synchronized ( GlobalLock.lock ) { + final Context ctx = Context.getCurrentContext(); + if ( ctx == null ) + return; + + final Handler handler = (Handler)handlers.get(ctx); + if ( handler != null ) + handler.handleMessage(source, type, id, severity, message); + } + } + +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -56,6 +56,13 @@ */ public final class ContextAttribs { + // Same values for GLX & WGL + private static final int CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x00000004; + private static final int CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; + private static final int + NO_RESET_NOTIFICATION_ARB = 0x8261, + LOSE_CONTEXT_ON_RESET_ARB = 0x8252; + private int majorVersion; private int minorVersion; @@ -63,10 +70,13 @@ private boolean debug; private boolean forwardCompatible; + private boolean robustAccess; private boolean profileCore; private boolean profileCompatibility; + private boolean loseContextOnReset; + public ContextAttribs() { this(1, 0); } @@ -82,14 +92,6 @@ this.majorVersion = majorVersion; this.minorVersion = minorVersion; - - this.layerPlane = 0; - - this.debug = false; - this.forwardCompatible = false; - - this.profileCore = false; - this.profileCompatibility = false; } private ContextAttribs(final ContextAttribs attribs) { @@ -100,9 +102,12 @@ this.debug = attribs.debug; this.forwardCompatible = attribs.forwardCompatible; + this.robustAccess = attribs.robustAccess; this.profileCore = attribs.profileCore; this.profileCompatibility = attribs.profileCompatibility; + + this.loseContextOnReset = attribs.loseContextOnReset; } public int getMajorVersion() { @@ -193,6 +198,24 @@ return attribs; } + /** + * Returns a ContextAttribs instance with CONTEXT_RESET_NOTIFICATION_STRATEGY set + * to LOSE_CONTEXT_ON_RESET if the parameter is true or to NO_RESET_NOTIFICATION + * if the parameter is false. + * + * @param loseContextOnReset + * + * @return the new ContextAttribs + */ + public ContextAttribs withLoseContextOnReset(final boolean loseContextOnReset) { + if ( loseContextOnReset == this.loseContextOnReset ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.loseContextOnReset = loseContextOnReset; + return attribs; + } + private static ContextAttribsImplementation getImplementation() { switch ( LWJGLUtil.getPlatform() ) { case LWJGLUtil.PLATFORM_LINUX: @@ -221,6 +244,8 @@ flags |= implementation.getDebugBit(); if ( forwardCompatible ) flags |= implementation.getForwardCompatibleBit(); + if ( robustAccess ) + flags |= CONTEXT_ROBUST_ACCESS_BIT_ARB; if ( 0 < flags ) attribCount++; @@ -247,6 +272,8 @@ attribs.put(implementation.getFlagsAttrib()).put(flags); if ( 0 < profileMask ) attribs.put(implementation.getProfileMaskAttrib()).put(profileMask); + if ( loseContextOnReset ) + attribs.put(CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB).put(LOSE_CONTEXT_ON_RESET_ARB); attribs.put(0); attribs.rewind(); @@ -261,6 +288,9 @@ sb.append(" - Layer=").append(layerPlane); sb.append(" - Debug=").append(debug); sb.append(" - ForwardCompatible=").append(forwardCompatible); + sb.append(" - RobustAccess=").append(robustAccess); + if ( robustAccess ) + sb.append(" (").append(loseContextOnReset ? "LOSE_CONTEXT_ON_RESET" : "NO_RESET_NOTIFICATION"); sb.append(" - Profile="); if ( profileCore ) sb.append("Core"); Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -215,38 +215,22 @@ LWJGLUtil.log("The major and/or minor OpenGL version is malformed: " + e.getMessage()); } - // ----------------------[ 4.X ]---------------------- - if ( 4 <= majorVersion ) - supported_extensions.add("OpenGL40"); + final int[][] GL_VERSIONS = { + { 1, 2, 3, 4, 5 }, // OpenGL 1 + { 0, 1 }, // OpenGL 2 + { 0, 1, 2, 3 }, // OpenGL 3 + { 0, 1 }, // OpenGL 4 + }; - // ----------------------[ 3.X ]---------------------- - if ( 3 < majorVersion || (3 == majorVersion && 3 <= minorVersion) ) - supported_extensions.add("OpenGL33"); - if ( 3 < majorVersion || (3 == majorVersion && 2 <= minorVersion) ) - supported_extensions.add("OpenGL32"); - if ( 3 < majorVersion || (3 == majorVersion && 1 <= minorVersion) ) - supported_extensions.add("OpenGL31"); - if ( 3 <= majorVersion ) - supported_extensions.add("OpenGL30"); + for ( int major = 1; major <= GL_VERSIONS.length; major++ ) { + int[] minors = GL_VERSIONS[major - 1]; + for ( int i = 0; i < minors.length; i++ ) { + int minor = minors[i]; + if ( major < majorVersion || (major == majorVersion && minor <= minorVersion) ) + supported_extensions.add("OpenGL" + Integer.toString(major) + Integer.toString(minor)); + } + } - // ----------------------[ 2.X ]---------------------- - if ( 2 < majorVersion || (2 == majorVersion && 1 <= minorVersion) ) - supported_extensions.add("OpenGL21"); - if ( 2 <= majorVersion ) - supported_extensions.add("OpenGL20"); - - // ----------------------[ 1.X ]---------------------- - if ( 1 < majorVersion || 5 <= minorVersion ) - supported_extensions.add("OpenGL15"); - if ( 1 < majorVersion || 4 <= minorVersion ) - supported_extensions.add("OpenGL14"); - if ( 1 < majorVersion || 3 <= minorVersion ) - supported_extensions.add("OpenGL13"); - if ( 1 < majorVersion || 2 <= minorVersion ) - supported_extensions.add("OpenGL12"); - if ( 1 < majorVersion || 1 <= minorVersion ) - supported_extensions.add("OpenGL11"); - int profileMask = 0; if ( majorVersion < 3 ) { Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -133,9 +133,9 @@ return "s"; else if ( annotation_type.equals(GLubyte.class) || annotation_type.equals(GLbyte.class) ) return "b"; - else if ( annotation_type.equals(GLfloat.class) ) + else if ( annotation_type.equals(GLfloat.class) || annotation_type.equals(GLclampf.class) ) return "f"; - else if ( annotation_type.equals(GLdouble.class) ) + else if ( annotation_type.equals(GLdouble.class) || annotation_type.equals(GLclampd.class) ) return "d"; else if ( annotation_type.equals(GLhalf.class) ) return "h"; Modified: trunk/LWJGL/src/native/common/extgl.h =================================================================== --- trunk/LWJGL/src/native/common/extgl.h 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/native/common/extgl.h 2010-07-27 15:33:22 UTC (rev 3392) @@ -136,6 +136,9 @@ /* AMD_debug_output callback function pointer. */ typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); +/* ARB_debug_output callback function pointer. */ +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); + /* helper stuff */ /* initializes everything, call this right after the rc is created. the function returns true if successful */ Modified: trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c 2010-07-25 14:22:09 UTC (rev 3391) +++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c 2010-07-27 15:33:22 UTC (rev 3392) @@ -41,7 +41,11 @@ #include "extgl.h" #include "org_lwjgl_opengl_AMDDebugOutputCallback.h" -static void APIENTRY debugOutputCallback(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { +static jclass debugOutputCallbackClassAMD; +static jmethodID debugOutputCallbackMethodAMD; + +static void APIENTRY debugOutputCallbackAMD(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + /* jclass callback_class; jmethodID callback_method; JNIEnv *env = getThreadEnv(); @@ -60,8 +64,25 @@ } } } + */ + + JNIEnv *env = getThreadEnv(); + if ( env != NULL && !(*env)->ExceptionOccurred(env) && debugOutputCallbackMethodAMD != NULL ) { + (*env)->CallStaticVoidMethod(env, debugOutputCallbackClassAMD, debugOutputCallbackMethodAMD, + (jint)id, + (jint)category, + (jint)severity, + NewStringNativeWithLength(env, message, length), + NULL // Ignoring user param, pointless for our implementation + ); + } } JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_AMDDebugOutputCallback_getFunctionPointer(JNIEnv *env, jclass clazz) { - return (jlong)(intptr_t)&debugOutputCallback; + // Cache the callback class and methodID + debugOutputCallbackClassAMD = (*env)->FindClass(env, "org/lwjgl/opengl/AMDDebugOutputUtil"); + if ( debugOutputCallbackClassAMD != NULL ) + debugOutputCallbackMethodAMD = (*env)->GetStaticMethodID(env, debugOutputCallbackClassAMD, "messageCallback", "(IIILjava/lang/String;Ljava/nio/ByteBuffer;)V"); + + return (jlong)(intptr_t)&debugOutputCallbackAMD; } Added: trunk/LWJGL/src/native/common/org_lwjgl_opengl_ARBDebugOutputCallback.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_opengl_ARBDebugOutputCallback.c (rev 0) +++ trunk/LWJGL/src/native/common/org_lwjgl_opengl_ARBDebugOutputCallback.c 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2008 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. + */ + +/** + * JNI implementation of the AMD_debug_output function callback. + * + * @author Spasi + */ + +#include <jni.h> +#include "common_tools.h" +#include "extgl.h" +#include "org_lwjgl_opengl_ARBDebugOutputCallback.h" + +static jclass debugOutputCallbackClassARB; +static jmethodID debugOutputCallbackMethodARB; + +static void APIENTRY debugOutputCallbackARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + JNIEnv *env = getThreadEnv(); + if ( env != NULL && !(*env)->ExceptionOccurred(env) && debugOutputCallbackMethodARB != NULL ) { + (*env)->CallStaticVoidMethod(env, debugOutputCallbackClassARB, debugOutputCallbackMethodARB, + (jint)source, + (jint)type, + (jint)id, + (jint)severity, + NewStringNativeWithLength(env, message, length), + NULL // Ignoring user param, pointless for our implementation + ); + } +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBDebugOutputCallback_getFunctionPointer(JNIEnv *env, jclass clazz) { + // Cache the callback class and methodID + debugOutputCallbackClassARB = (*env)->FindClass(env, "org/lwjgl/opengl/ARBDebugOutputUtil"); + if ( debugOutputCallbackClassARB != NULL ) + debugOutputCallbackMethodARB = (*env)->GetStaticMethodID(env, debugOutputCallbackClassARB, "messageCallback", "(IIIILjava/lang/String;Ljava/nio/ByteBuffer;)V"); + + return (jlong)(intptr_t)&debugOutputCallbackARB; +} Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2008 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.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_ES2_compatibility { + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_SHADER_COMPILER = 0x8DFA, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** Accepted by the <type> parameter of VertexAttribPointer: */ + int GL_FIXED = 0x140C; + + /** + * Accepted by the <precisiontype> parameter of + * GetShaderPrecisionFormat: + */ + int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + void glReleaseShaderCompiler(); + + void glShaderBinary(@AutoSize("shaders") @GLsizei int count, @Const @GLuint IntBuffer shaders, + @GLenum int binaryformat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + void glGetShaderPrecisionFormat(@GLenum int shadertype, @GLenum int precisiontype, + @OutParameter @Check("2") IntBuffer range, + @OutParameter @Check("1") IntBuffer precision); + + void glDepthRangef(@GLclampf float n, @GLclampf float f); + + void glClearDepthf(@GLclampf float d); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_output.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_output.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_output.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2002-2008 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.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_debug_output { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, + * and IsEnabled: + */ + int GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144, + GL_DEBUG_LOGGED_MESSAGES_ARB = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243; + + /** Tokens accepted by the <pname> parameter of GetPointerv: */ + int GL_DEBUG_CALLBACK_FUNCTION_ARB = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, + * and the <sources> parameter of GetDebugMessageLogARB: + */ + int GL_DEBUG_SOURCE_API_ARB = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, + GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, + GL_DEBUG_SOURCE_OTHER_ARB = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, + * and the <types> parameter of GetDebugMessageLogARB: + */ + int GL_DEBUG_TYPE_ERROR_ARB = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, + GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, + GL_DEBUG_TYPE_OTHER_ARB = 0x8251; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB + * callback functions, and the <severities> parameter of + * GetDebugMessageLogARB: + */ + int GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, + GL_DEBUG_SEVERITY_LOW_ARB = 0x9148; + + void glDebugMessageControlARB(@GLenum int source, + @GLenum int type, + @GLenum int severity, + @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, + @Check(canBeNull = true) @Const @GLuint IntBuffer ids, + boolean enabled); + + void glDebugMessageInsertARB(@GLenum int source, @GLenum int type, @GLuint int id, @GLenum int severity, @AutoSize("buf") @GLsizei int length, @Const @GLchar ByteBuffer buf); + + @Alternate("glDebugMessageInsertARB") + void glDebugMessageInsertARB(@GLenum int source, @GLenum int type, @GLuint int id, @GLenum int severity, @Constant("buf.length()") @GLsizei int length, CharSequence buf); + + void glDebugMessageCallbackARB(@GLpointer(value = "GLDEBUGPROCARB", canBeNull = true) ARBDebugOutputCallback callback, @Check(canBeNull = true) @GLvoid ByteBuffer userParam); + + @GLuint + int glGetDebugMessageLogARB(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int logSize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer sources, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer types, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + + // Not really useful and a pain to implement in Java + //void glGetPointerv(@GLenum int pname, void**params); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2008 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.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_get_program_binary { + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_PROGRAM_BINARY_LENGTH = 0x8741; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev: + */ + int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, + GL_PROGRAM_BINARY_FORMATS = 0x87FF; + + void glGetProgramBinary(@GLuint int program, @AutoSize("binary") @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @Check("1") @GLenum IntBuffer binaryFormat, + @OutParameter @GLvoid ByteBuffer binary); + + void glProgramBinary(@GLuint int program, @GLenum int binaryFormat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + void glProgramParameteri(@GLuint int program, @GLenum int pname, int value); + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robustness.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robustness.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robustness.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2002-2008 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.*; + +import java.nio.*; + +@Dependent +@DeprecatedGL +public interface ARB_robustness { + + /** Returned by GetGraphicsResetStatusARB: */ + int GL_NO_ERROR = 0x0000, + GL_GUILTY_CONTEXT_RESET_ARB = 0x8253, + GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254, + GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; + + /** + * Returned by GetIntegerv and related simple queries when + * <value> is RESET_NOTIFICATION_STRATEGY_ARB: + */ + int GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252, + GL_NO_RESET_NOTIFICATION_ARB = 0x8261; + + /** Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: */ + int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004; + + @GLenum + int glGetGraphicsResetStatusARB(); + + @DeprecatedGL + void glGetnMapdvARB(@GLenum int target, @GLenum int query, @Constant("v.remaining() << 3") @GLsizei int bufSize, @OutParameter @Check DoubleBuffer v); + + @DeprecatedGL + void glGetnMapfvARB(@GLenum int target, @GLenum int query, @Constant("v.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check FloatBuffer v); + + @DeprecatedGL + void glGetnMapivARB(@GLenum int target, @GLenum int query, @Constant("v.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check IntBuffer v); + + @DeprecatedGL + void glGetnPixelMapfvARB(@GLenum int map, @Constant("values.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check FloatBuffer values); + + @DeprecatedGL + void glGetnPixelMapuivARB(@GLenum int map, @Constant("values.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check @GLuint IntBuffer values); + + @DeprecatedGL + void glGetnPixelMapusvARB(@GLenum int map, @Constant("values.remaining() << 1") @GLsizei int bufSize, @OutParameter @Check @GLushort ShortBuffer values); + + @DeprecatedGL + void glGetnPolygonStippleARB(@AutoSize("pattern") @GLsizei int bufSize, @OutParameter @GLubyte ByteBuffer pattern); + + void glGetnTexImageARB(@GLenum int target, int level, @GLenum int format, @GLenum int type, @AutoSize("img") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer img); + + void glReadnPixelsARB(int x, int y, @GLsizei int width, @GLsizei int height, + @GLenum int format, @GLenum int type, @AutoSize("data") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + @Dependent("GL_ARB_imaging") + void glGetnColorTableARB(@GLenum int target, @GLenum int format, @GLenum int type, @AutoSize("table") @GLsizei int bufSize, + @OutParameter + @GLbyte + @GLfloat + @GLdouble Buffer table); + + @Dependent("GL_ARB_imaging") + void glGetnConvolutionFilterARB(@GLenum int target, @GLenum int format, @GLenum int type, @AutoSize("image") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer image); + + @Dependent("GL_ARB_imaging") + void glGetnSeparableFilterARB(@GLenum int target, @GLenum int format, @GLenum int type, + @AutoSize("row") @GLsizei int rowBufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer row, + @AutoSize("column") @GLsizei int columnBufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer column, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer span); + + @Dependent("GL_ARB_imaging") + void glGetnHistogramARB(@GLenum int target, boolean reset, @GLenum int format, @GLenum int type, @AutoSize("values") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer values); + + @Dependent("GL_ARB_imaging") + void glGetnMinmaxARB(@GLenum int target, boolean reset, @GLenum int format, @GLenum int type, @AutoSize("values") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer values); + + @Dependent("OpenGL13") + void glGetnCompressedTexImageARB(@GLenum int target, int lod, @AutoSize("img") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint Buffer img); + + @Dependent("OpenGL20") + void glGetnUniformfvARB(@GLuint int program, int location, @Constant("params.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check FloatBuffer params); + + @Dependent("OpenGL20") + void glGetnUniformivARB(@GLuint int program, int location, @Constant("params.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check IntBuffer params); + + @Dependent("OpenGL20") + void glGetnUniformuivARB(@GLuint int program, int location, @Constant("params.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check @GLuint IntBuffer params); + + @Dependent("OpenGL20") + void glGetnUniformdvARB(@GLuint int program, int location, @Constant("params.remaining() << 3") @GLsizei int bufSize, @OutParameter @Check DoubleBuffer params); +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java 2010-07-27 15:33:22 UTC (rev 3392) @@ -0,0 +1,269 @@ +/* + * Copyright (c) 2002-2008 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.*; + +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_separate_shader_objects { + + /** Accepted by <stages> parameter to UseProgramStages: */ + int GL_VERTEX_SHADER_BIT = 0x00000001, + GL_FRAGMENT_SHADER_BIT = 0x00000002, + GL_GEOMETRY_SHADER_BIT = 0x00000004, + GL_TESS_CONTROL_SHADER_BIT = 0x00000008, + GL_TESS_EVALUATION_SHADER_BIT = 0x00000010, + GL_ALL_SHADER_BITS = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + int GL_PROGRAM_SEPARABLE = 0x8258; + + /** Accepted by <type> parameter to GetProgramPipelineiv: */ + int GL_ACTIVE_PROGRAM = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_PROGRAM_PIPELINE_BINDING = 0x825A; + + void glUseProgramStages(@GLuint int pipeline, @GLbitfield int stages, @GLuint int program); + + void glActiveShaderProgram(@GLuint int pipeline, @GLuint int program); + + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @GLsizei int count, @Check @Const @Indirect @GLchar ByteBuffer strings); + + @Alternate("glCreateShaderProgramv") + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated CharSequence string); + + @Alternate("glCreateShaderProgramv") + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @Constant("strings.length") @GLsizei int count, + @Const @NullTerminated @StringList(value = "count") CharSequence[] strings); + + void glBindProgramPipeline(@GLuint int pipeline); + + void glDeleteProgramPipelines(@AutoSize("pipelines") @GLsizei int n, @Const @GLuint IntBuffer pipelines); + + @Alternate("glDeleteProgramPipelines") + void glDeleteProgramPipelines(@Constant("1") @GLsizei int n, @Constant(value = "APIUtils.getBufferInt().put(0, pipeline), 0", keepParam = true) int pipeline); + + void glGenProgramPipelines(@AutoSize("pipelines") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + @Alternate("glGenProgramPipelines") + @GLreturn("pipelines") + void glGenProgramPipelines2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + boolean glIsProgramPipeline(@GLuint int pipeline); + + void glProgramParameteri(@GLuint int program, @GLenum int pname, int value); + + @StripPostfix("params") + void glGetProgramPipelineiv(@GLuint int pipeline, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetProgramPipelineiv") + @GLreturn("params") + @StripPostfix("params") + void glGetProgramPipelineiv2(@GLuint int pipeline, @GLenum int pname, @OutParameter IntBuffer params); + + void glProgramUniform1i(@GLuint int program, int location, int v0); + + void glProgramUniform2i(@GLuint int program, int location, int v0, int v1); + + void glProgramUniform3i(@GLuint int program, int location, int v0, int v1, int v2); + + void glProgramUniform4i(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + void glProgramUniform1f(@GLuint int program, int location, float v0); + + void glProgramUniform2f(@GLuint int program, int location, float v0, float v1); + + void glProgramUniform3f(@GLuint int program, int location, float v0, float v1, float v2); + + void glProgramUniform4f(@GLuint int program, int location, float v0, float v1, float v2, float v3); + + void glProgramUniform1d(@GLuint int program, int location, double v0); + + void glProgramUniform2d(@GLuint int program, int location, double v0, double v1); + + void glProgramUniform3d(@GLuint int program, int location, double v0, double v1, double v2); + + void glProgramUniform4d(@GLuint int program, int location, double v0, double v1, double v2, double v3); + + @StripPostfix("value") + void glProgramUniform1iv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform2iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform3iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform4iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform1fv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform2fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform3fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform4fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform1dv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniform2dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniform3dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniform4dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + void glProgramUniform1ui(@GLuint int program, int location, int v0); + + void glProgramUniform2ui(@GLuint int program, int location, int v0, int v1); + + void glProgramUniform3ui(@GLuint int program, int location, int v0, int v1, int v2); + + void glProgramUniform4ui(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + @StripPostfix("value") + void glProgramUniform1uiv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform2uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform3uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform4uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4fv(@GLuint int program, int location,... [truncated message content] |
From: <ma...@us...> - 2010-07-27 19:08:57
|
Revision: 3394 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3394&view=rev Author: matzon Date: 2010-07-27 19:08:50 +0000 (Tue, 27 Jul 2010) Log Message: ----------- incrementing version to 2.6 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-07-27 16:20:37 UTC (rev 3393) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-07-27 19:08:50 UTC (rev 3394) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.5" /> + <property name="lwjgl.version" value="2.6" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-07-27 16:20:37 UTC (rev 3393) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-07-27 19:08:50 UTC (rev 3394) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.5"; + private static final String VERSION = "2.6"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2010-08-28 16:39:24
|
Revision: 3406 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3406&view=rev Author: kappa1 Date: 2010-08-28 16:39:16 +0000 (Sat, 28 Aug 2010) Log Message: ----------- Applet Package: clean up and split the applet download package, it should be much easier for noobs to pick it up now and less confusing. Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-applet.xml Added Paths: ----------- trunk/LWJGL/applet/advance/ trunk/LWJGL/applet/advance/appletloader.html trunk/LWJGL/applet/basic/ trunk/LWJGL/applet/basic/basicapplet.html Removed Paths: ------------- trunk/LWJGL/applet/appletloader.html Added: trunk/LWJGL/applet/advance/appletloader.html =================================================================== --- trunk/LWJGL/applet/advance/appletloader.html (rev 0) +++ trunk/LWJGL/applet/advance/appletloader.html 2010-08-28 16:39:16 UTC (rev 3406) @@ -0,0 +1,67 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title>AppletLoader</title> + </head> + <body> + + <applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar, lzma.jar" codebase="." width="640" height="480"> + + <!-- The following tags are mandatory --> + + <!-- Name of Applet, will be used as name of directory it is saved in, and will uniquely identify it in cache --> + <param name="al_title" value="appletloadertest"> + + <!-- Main Applet Class --> + <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> + + <!-- logo to paint while loading, will be centered --> + <param name="al_logo" value="appletlogo.png"> + + <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> + <param name="al_progressbar" value="appletprogress.gif"> + + <!-- List of Jars to add to classpath --> + <param name="al_jars" value="lwjgl_applet.jar.pack.lzma, lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma"> + + <!-- signed windows natives jar in a jar --> + <param name="al_windows" value="windows_natives.jar.lzma"> + + <!-- signed linux natives jar in a jar --> + <param name="al_linux" value="linux_natives.jar.lzma"> + + <!-- signed mac osx natives jar in a jar --> + <param name="al_mac" value="macosx_natives.jar.lzma"> + + <!-- signed solaris natives jar in a jar --> + <param name="al_solaris" value="solaris_natives.jar.lzma"> + + <!-- Tags under here are optional --> + + <!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float --> + <!-- <param name="al_version" value="0.1"> --> + + <!-- whether to use cache - defaults to true --> + <!-- <param name="al_cache" value="true"> --> + + <!-- background color to paint with, defaults to white --> + <!-- <param name="boxbgcolor" value="#000000"> --> + + <!-- foreground color to paint with, defaults to black --> + <!-- <param name="boxfgcolor" value="#ffffff"> --> + + <!-- whether to run in debug mode --> + <!-- <param name="al_debug" value="true"> --> + + <!-- whether to prepend host to cache path - defaults to true --> + <!-- <param name="al_prepend_host" value="true"> --> + + <param name="separate_jvm" value="true"> + </applet> + + <p> + if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process. + </p> + + </body> +</html> Deleted: trunk/LWJGL/applet/appletloader.html =================================================================== --- trunk/LWJGL/applet/appletloader.html 2010-08-28 13:47:18 UTC (rev 3405) +++ trunk/LWJGL/applet/appletloader.html 2010-08-28 16:39:16 UTC (rev 3406) @@ -1,70 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> - <head> - <title>AppletLoader</title> - </head> - <body> - - <applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar, lzma.jar" codebase="." width="640" height="480"> - - <!-- The following tags are mandatory --> - - <!-- Name of Applet, will be used as name of directory it is saved in, and will uniquely identify it in cache --> - <param name="al_title" value="appletloadertest"> - - <!-- Main Applet Class --> - <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> - - <!-- logo to paint while loading, will be centered --> - <param name="al_logo" value="appletlogo.png"> - - <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> - <param name="al_progressbar" value="appletprogress.gif"> - - <!-- List of Jars to add to classpath --> - <param name="al_jars" value="lwjgl_applet.jar.pack.lzma, lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma, res.jar.lzma"> - - <!-- signed windows natives jar in a jar --> - <param name="al_windows" value="windows_natives.jar.lzma"> - - <!-- signed linux natives jar in a jar --> - <param name="al_linux" value="linux_natives.jar.lzma"> - - <!-- signed mac osx natives jar in a jar --> - <param name="al_mac" value="macosx_natives.jar.lzma"> - - <!-- signed solaris natives jar in a jar --> - <param name="al_solaris" value="solaris_natives.jar.lzma"> - - <!-- Tags under here are optional --> - - <!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float --> - <!-- <param name="al_version" value="0.1"> --> - - <!-- whether to use cache - defaults to true --> - <!-- <param name="al_cache" value="true"> --> - - <!-- background color to paint with, defaults to white --> - <!-- <param name="boxbgcolor" value="#000000"> --> - - <!-- foreground color to paint with, defaults to black --> - <!-- <param name="boxfgcolor" value="#ffffff"> --> - - <!-- whether to run in debug mode --> - <!-- <param name="al_debug" value="true"> --> - - <!-- whether to prepend host to cache path - defaults to true --> - <!-- <param name="al_prepend_host" value="true"> --> - - <!-- main applet specific params --> - <param name="test" value="org.lwjgl.test.opengl.awt.AWTGearsCanvas"> - - <param name="separate_jvm" value="true"> - </applet> - - <p> - if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process. - </p> - - </body> -</html> Added: trunk/LWJGL/applet/basic/basicapplet.html =================================================================== --- trunk/LWJGL/applet/basic/basicapplet.html (rev 0) +++ trunk/LWJGL/applet/basic/basicapplet.html 2010-08-28 16:39:16 UTC (rev 3406) @@ -0,0 +1,67 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title>AppletLoader</title> + </head> + <body> + + <applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar" codebase="." width="640" height="480"> + + <!-- The following tags are mandatory --> + + <!-- Name of Applet, will be used as name of directory it is saved in, and will uniquely identify it in cache --> + <param name="al_title" value="appletloadertest"> + + <!-- Main Applet Class --> + <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> + + <!-- logo to paint while loading, will be centered --> + <param name="al_logo" value="appletlogo.png"> + + <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> + <param name="al_progressbar" value="appletprogress.gif"> + + <!-- List of Jars to add to classpath --> + <param name="al_jars" value="lwjgl_applet.jar, lwjgl.jar, jinput.jar, lwjgl_util.jar"> + + <!-- signed windows natives jar in a jar --> + <param name="al_windows" value="windows_natives.jar"> + + <!-- signed linux natives jar in a jar --> + <param name="al_linux" value="linux_natives.jar"> + + <!-- signed mac osx natives jar in a jar --> + <param name="al_mac" value="macosx_natives.jar"> + + <!-- signed solaris natives jar in a jar --> + <param name="al_solaris" value="solaris_natives.jar"> + + <!-- Tags under here are optional --> + + <!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be int or float --> + <!-- <param name="al_version" value="0.1"> --> + + <!-- whether to use cache - defaults to true --> + <!-- <param name="al_cache" value="true"> --> + + <!-- background color to paint with, defaults to white --> + <!-- <param name="boxbgcolor" value="#000000"> --> + + <!-- foreground color to paint with, defaults to black --> + <!-- <param name="boxfgcolor" value="#ffffff"> --> + + <!-- whether to run in debug mode --> + <!-- <param name="al_debug" value="true"> --> + + <!-- whether to prepend host to cache path - defaults to true --> + <!-- <param name="al_prepend_host" value="true"> --> + + <param name="separate_jvm" value="true"> + </applet> + + <p> + if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the loader process. + </p> + + </body> +</html> Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-08-28 13:47:18 UTC (rev 3405) +++ trunk/LWJGL/build.xml 2010-08-28 16:39:16 UTC (rev 3406) @@ -443,11 +443,12 @@ </antcall> <antcall target="lzma"> <param name="input" value="${dir}${jarfile}.jar.pack"/> - <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/> + <param name="output" value="${outputdir}${jarfile}.jar.pack.lzma"/> </antcall> - <delete file="${dir}${jarfile}-repack.jar"/> + <!--delete file="${dir}${jarfile}-repack.jar"/--> <delete file="${dir}${jarfile}.jar.pack"/> - <delete file="${dir}${jarfile}.jar"/> + <!--delete file="${dir}${jarfile}.jar"/--> + <rename src="${dir}${jarfile}-repack.jar" dest="${dir}${jarfile}.jar" replace="yes"/> </target> <target name="compress-resource"> Modified: trunk/LWJGL/platform_build/build-applet.xml =================================================================== --- trunk/LWJGL/platform_build/build-applet.xml 2010-08-28 13:47:18 UTC (rev 3405) +++ trunk/LWJGL/platform_build/build-applet.xml 2010-08-28 16:39:16 UTC (rev 3406) @@ -31,121 +31,121 @@ <target name="-applet"> <!-- Create lwjgl_applet.jar --> - <jar destfile="applet/lwjgl_applet.jar" taskname="lwjgl_applet.jar"> + <jar destfile="applet/basic/lwjgl_applet.jar" taskname="lwjgl_applet.jar"> <fileset refid="lwjgl_applet.fileset" /> </jar> <!-- create each of the native jars --> - <jar destfile="applet/windows_natives.jar" taskname="windows_natives.jar"> + <jar destfile="applet/basic/windows_natives.jar" taskname="windows_natives.jar"> <fileset dir="${lwjgl.lib}/windows"> <patternset refid="lwjgl-windows.fileset"/> </fileset> </jar> - <signjar jar="applet/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="applet/basic/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <jar destfile="applet/linux_natives.jar" taskname="linux_natives.jar"> + <jar destfile="applet/basic/linux_natives.jar" taskname="linux_natives.jar"> <fileset dir="${lwjgl.lib}/linux"> <patternset refid="lwjgl-linux.fileset"/> </fileset> </jar> - <signjar jar="applet/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="applet/basic/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <jar destfile="applet/macosx_natives.jar" taskname="macosx_natives.jar"> + <jar destfile="applet/basic/macosx_natives.jar" taskname="macosx_natives.jar"> <fileset dir="${lwjgl.lib}/macosx"> <patternset refid="lwjgl-macosx.fileset"/> </fileset> </jar> - <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="applet/basic/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <jar destfile="applet/solaris_natives.jar" taskname="solaris_natives.jar"> + <jar destfile="applet/basic/solaris_natives.jar" taskname="solaris_natives.jar"> <fileset dir="${lwjgl.lib}/solaris"> <patternset refid="lwjgl-solaris.fileset"/> </fileset> </jar> - <signjar jar="applet/solaris_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="applet/basic/solaris_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> <fileset dir="${lwjgl.res}" includes="applet*"/> </jar> - <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet" overwrite="true"/> - <copy file="${lwjgl.lib}/lwjgl-debug.jar" todir="applet" overwrite="true"/> - <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet" overwrite="true"/> - <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet" overwrite="true"/> - <copy file="${lwjgl.lib}/jinput.jar" todir="applet" overwrite="true"/> - <copy file="${lwjgl.lib}/lzma.jar" todir="applet" overwrite="true"/> - <zip destfile="applet/res.jar"> - <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/> - </zip> - <signjar jar="applet/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="applet/lzma.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet/basic" overwrite="true"/> + <copy file="${lwjgl.lib}/lwjgl-debug.jar" todir="applet/basic" overwrite="true"/> + <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet/basic" overwrite="true"/> + <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet/basic" overwrite="true"/> + <copy file="${lwjgl.lib}/jinput.jar" todir="applet/basic" overwrite="true"/> + <copy file="${lwjgl.lib}/lzma.jar" todir="applet/advance" overwrite="true"/> + <signjar jar="applet/basic/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="applet/advance/lzma.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <copy file="applet/basic/lwjgl_util_applet.jar" todir="applet/advance" overwrite="true"/> + <!-- LZMA only, for 1.4 only clients --> - <antcall target="compress-resource"> - <param name="input" value="applet/lwjgl.jar"/> - <param name="output" value="applet/lwjgl.jar.lzma"/> + <!--antcall target="compress-resource"> + <param name="input" value="applet/basic/lwjgl.jar"/> + <param name="output" value="applet/advance/lwjgl.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/lwjgl-debug.jar"/> - <param name="output" value="applet/lwjgl-debug.jar.lzma"/> + <param name="input" value="applet/basic/lwjgl-debug.jar"/> + <param name="output" value="applet/advance/lwjgl-debug.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/lwjgl_util.jar"/> - <param name="output" value="applet/lwjgl_util.jar.lzma"/> + <param name="input" value="applet/basic/lwjgl_util.jar"/> + <param name="output" value="applet/advance/lwjgl_util.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/jinput.jar"/> - <param name="output" value="applet/jinput.jar.lzma"/> + <param name="input" value="applet/basic/jinput.jar"/> + <param name="output" value="applet/advance/jinput.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/lwjgl_applet.jar"/> - <param name="output" value="applet/lwjgl_applet.jar.lzma"/> + <param name="input" value="applet/basic/lwjgl_applet.jar"/> + <param name="output" value="applet/advance/lwjgl_applet.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/windows_natives.jar"/> - <param name="output" value="applet/windows_natives.jar.lzma"/> - </antcall> + <param name="input" value="applet/basic/windows_natives.jar"/> + <param name="output" value="applet/advance/windows_natives.jar.lzma"/> + </antcall --> + <antcall target="compress-sign-class"> - <param name="dir" value="applet/"/> + <param name="dir" value="applet/basic/"/> + <param name="outputdir" value="applet/advance/"/> <param name="jarfile" value="lwjgl"/> </antcall> <antcall target="compress-sign-class"> - <param name="dir" value="applet/"/> + <param name="dir" value="applet/basic/"/> + <param name="outputdir" value="applet/advance/"/> <param name="jarfile" value="lwjgl-debug"/> </antcall> <antcall target="compress-sign-class"> - <param name="dir" value="applet/"/> + <param name="dir" value="applet/basic/"/> + <param name="outputdir" value="applet/advance/"/> <param name="jarfile" value="lwjgl_util"/> </antcall> <antcall target="compress-sign-class"> - <param name="dir" value="applet/"/> + <param name="dir" value="applet/basic/"/> + <param name="outputdir" value="applet/advance/"/> <param name="jarfile" value="jinput"/> </antcall> <antcall target="compress-sign-class"> - <param name="dir" value="applet/"/> + <param name="dir" value="applet/basic/"/> + <param name="outputdir" value="applet/advance/"/> <param name="jarfile" value="lwjgl_applet"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/windows_natives.jar"/> - <param name="output" value="applet/windows_natives.jar.lzma"/> + <param name="input" value="applet/basic/windows_natives.jar"/> + <param name="output" value="applet/advance/windows_natives.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/macosx_natives.jar"/> - <param name="output" value="applet/macosx_natives.jar.lzma"/> + <param name="input" value="applet/basic/macosx_natives.jar"/> + <param name="output" value="applet/advance/macosx_natives.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/linux_natives.jar"/> - <param name="output" value="applet/linux_natives.jar.lzma"/> + <param name="input" value="applet/basic/linux_natives.jar"/> + <param name="output" value="applet/advance/linux_natives.jar.lzma"/> </antcall> <antcall target="compress-resource"> - <param name="input" value="applet/solaris_natives.jar"/> - <param name="output" value="applet/solaris_natives.jar.lzma"/> - </antcall> - - <antcall target="compress-resource"> - <param name="input" value="applet/res.jar"/> - <param name="output" value="applet/res.jar.lzma"/> + <param name="input" value="applet/basic/solaris_natives.jar"/> + <param name="output" value="applet/advance/solaris_natives.jar.lzma"/> </antcall> </target> </project> \ 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: <sp...@us...> - 2010-09-26 23:43:37
|
Revision: 3412 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3412&view=rev Author: spasi Date: 2010-09-26 23:43:24 +0000 (Sun, 26 Sep 2010) Log Message: ----------- Added support for OpenCL & CL/GL interop + minor improvements. [WIP] Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/platform_build/linux_ant/build.xml trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLSync.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxContextImplementation.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsContextImplementation.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Alternate.java trunk/LWJGL/src/java/org/lwjgl/util/generator/AutoSize.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Check.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Code.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Constant.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GenerateAutos.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JNITypeTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaTypeTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeType.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeTypeTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/PostfixTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/SignatureTranslator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/TypeInfo.java trunk/LWJGL/src/java/org/lwjgl/util/generator/TypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/TypedefsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java trunk/LWJGL/src/native/common/common_tools.c trunk/LWJGL/src/native/common/common_tools.h trunk/LWJGL/src/native/common/extal.c trunk/LWJGL/src/native/common/extal.h trunk/LWJGL/src/native/common/extgl.h trunk/LWJGL/src/native/common/org_lwjgl_openal_AL.c trunk/LWJGL/src/native/linux/linux_al.c trunk/LWJGL/src/native/linux/org_lwjgl_opengl_LinuxContextImplementation.c trunk/LWJGL/src/native/macosx/macosx_al.c trunk/LWJGL/src/native/windows/org_lwjgl_opengl_WindowsContextImplementation.c trunk/LWJGL/src/native/windows/windows_al.c trunk/LWJGL/src/templates/org/lwjgl/openal/AL10.java trunk/LWJGL/src/templates/org/lwjgl/openal/AL11.java trunk/LWJGL/src/templates/org/lwjgl/openal/EFX10.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_debug_output.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_performance_monitor.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_element_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_fence.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_flush_buffer_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_object_purgeable.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_texture_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_vertex_array_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_vertex_array_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/APPLE_vertex_program_evaluators.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_color_buffer_float.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_copy_buffer.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_debug_output.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_buffers.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_draw_instanced.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_framebuffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_geometry_shader4.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_imaging.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_instanced_arrays.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multisample.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_multitexture.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_occlusion_query.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_point_parameters.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_program.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_robustness.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sample_shading.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_compression.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_timer_query.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_transform_feedback2.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_transform_feedback3.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_array_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_viewport_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_draw_buffers.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_element_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_envmap_bumpmap.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_fragment_shader.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_pn_triangles.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_separate_stencil.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_attrib_array_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_bindable_uniform.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_color.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_equation_separate.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_func_separate.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_compiled_vertex_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_depth_bounds_test.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_draw_buffers2.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_draw_instanced.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_draw_range_elements.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_fog_coord.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_framebuffer_blit.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_framebuffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_geometry_shader4.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_multi_draw_arrays.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_point_parameters.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_provoking_vertex.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_secondary_color.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_separate_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_stencil_clear_tag.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_stencil_two_side.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_texture_array.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_texture_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_texture_integer.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_timer_query.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL12.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL13.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL14.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL15.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL21.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL40.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GREMEDY_string_marker.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_conditional_render.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_copy_image.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_evaluators.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_explicit_multisample.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_fence.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_fragment_program.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_framebuffer_multisample_coverage.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_geometry_program4.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_program4.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_occlusion_query.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_pixel_data_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_point_sprite.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_primitive_restart.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_program.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_register_combiners.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_register_combiners2.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback2.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_array_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_buffer_unified_memory.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java trunk/LWJGL/src/java/org/lwjgl/PointerWrapper.java trunk/LWJGL/src/java/org/lwjgl/PointerWrapperAbstract.java trunk/LWJGL/src/java/org/lwjgl/opencl/ trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/APPLEContextLoggingUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/CL.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLCommandQueue.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLContextCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLDevice.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLDeviceImpl.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLEvent.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLEventCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLFunctionAddress.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLKernel.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLKernelImpl.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLMem.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLMemObjectDestructorCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLNativeKernel.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObject.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectChild.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistry.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistryGlobal.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatform.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatformImpl.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgram.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLSampler.java trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/OpenCLException.java trunk/LWJGL/src/java/org/lwjgl/opencl/Util.java trunk/LWJGL/src/java/org/lwjgl/opencl/api/ trunk/LWJGL/src/java/org/lwjgl/opencl/api/Filter.java trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java trunk/LWJGL/src/java/org/lwjgl/test/opencl/ trunk/LWJGL/src/java/org/lwjgl/test/opencl/HelloOpenCL.java trunk/LWJGL/src/java/org/lwjgl/test/opencl/gl/ trunk/LWJGL/src/java/org/lwjgl/test/opencl/gl/DemoFractal.java trunk/LWJGL/src/java/org/lwjgl/test/opencl/gl/Mandelbrot.cl trunk/LWJGL/src/java/org/lwjgl/util/generator/Extern.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Helper.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Imports.java trunk/LWJGL/src/java/org/lwjgl/util/generator/PointerArray.java trunk/LWJGL/src/java/org/lwjgl/util/generator/PointerWrapper.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Private.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Reuse.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALTypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALboolean.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALbyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALdouble.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALenum.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALfloat.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALshort.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALsizei.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALubyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALuint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/openal/ALvoid.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/ trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLDeviceExtension.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPlatformExtension.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLTypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_bitfield.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_bool.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_byte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_char.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_double.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_float.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_int.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_long.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_short.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_uchar.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_uint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/cl_void.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/size_t.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/ trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLTypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLbitfield.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLboolean.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLbyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLchar.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLcharARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLclampd.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLclampf.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLdouble.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLenum.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLfloat.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLhalf.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLhandleARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLint64.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLint64EXT.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLintptr.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLintptrARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLreturn.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLshort.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLsizei.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLsizeiptr.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLsizeiptrARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLtime.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLubyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLuint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLuint64.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLuint64EXT.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLushort.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLvoid.java trunk/LWJGL/src/native/common/CL/ trunk/LWJGL/src/native/common/CL/cl.h trunk/LWJGL/src/native/common/CL/cl_d3d10.h trunk/LWJGL/src/native/common/CL/cl_ext.h trunk/LWJGL/src/native/common/CL/cl_gl.h trunk/LWJGL/src/native/common/CL/cl_gl_ext.h trunk/LWJGL/src/native/common/CL/cl_platform.h trunk/LWJGL/src/native/common/extcl.c trunk/LWJGL/src/native/common/extcl.h trunk/LWJGL/src/native/common/extcl_types.h trunk/LWJGL/src/native/common/extgl_types.h trunk/LWJGL/src/native/common/opencl.h trunk/LWJGL/src/native/common/org_lwjgl_opencl_CL.c trunk/LWJGL/src/native/common/org_lwjgl_opencl_CL.h trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.h trunk/LWJGL/src/native/common/org_lwjgl_opengl_CallbackUtil.c trunk/LWJGL/src/native/common/org_lwjgl_opengl_CallbackUtil.h trunk/LWJGL/src/native/linux/linux_cl.c trunk/LWJGL/src/native/macosx/macosx_cl.c trunk/LWJGL/src/native/windows/windows_cl.c trunk/LWJGL/src/templates/org/lwjgl/opencl/ trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_device_attribute_query.java trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_fp64.java trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_media_ops.java trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_printf.java trunk/LWJGL/src/templates/org/lwjgl/opencl/APPLE_ContextLoggingFunctions.java trunk/LWJGL/src/templates/org/lwjgl/opencl/APPLE_SetMemObjectDestructor.java trunk/LWJGL/src/templates/org/lwjgl/opencl/APPLE_gl_sharing.java trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10GL.java trunk/LWJGL/src/templates/org/lwjgl/opencl/CL11.java trunk/LWJGL/src/templates/org/lwjgl/opencl/EXT_device_fission.java trunk/LWJGL/src/templates/org/lwjgl/opencl/EXT_migrate_memobject.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_3d_image_writes.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_byte_addressable_store.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_fp16.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_fp64.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_event.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_gl_sharing.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_global_int32_base_atomics.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_global_int32_extended_atomics.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_icd.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_int64_base_atomics.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_int64_extended_atomics.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_local_int32_base_atomics.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_local_int32_extended_atomics.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_cl_event.java Removed Paths: ------------- trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtils.java trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/PointerWrapper.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALTypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALboolean.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALbyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALdouble.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALenum.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALfloat.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALshort.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALsizei.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALubyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALuint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ALvoid.java trunk/LWJGL/src/java/org/lwjgl/util/generator/AutoResultSize.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLTypeMap.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLbitfield.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLboolean.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLbyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLchar.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLcharARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLclampd.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLclampf.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLdouble.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLenum.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLfloat.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLhalf.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLhandleARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint64.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLint64EXT.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLintptr.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLintptrARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLpointer.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLreturn.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLshort.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsizei.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsizeiptr.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLsizeiptrARB.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLtime.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLubyte.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint64.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLuint64EXT.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLushort.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GLvoid.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ReferencesGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/StringList.java trunk/LWJGL/src/native/common/org_lwjgl_opengl_AMDDebugOutputCallback.c trunk/LWJGL/src/native/common/org_lwjgl_opengl_ARBDebugOutputCallback.c Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-09-21 09:51:05 UTC (rev 3411) +++ trunk/LWJGL/build.xml 2010-09-26 23:43:24 UTC (rev 3412) @@ -32,19 +32,19 @@ <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" /> <mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" /> </target> - + <!-- Cleans up any files created during the execution of this script --> - <target name="clean" description="Cleans the diectories controlled by this ant script" depends="clean-generated"> + <target name="clean" description="Cleans the directories controlled by this ant script" depends="clean-generated"> <delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" /> <delete dir="${lwjgl.docs}/javadoc" quiet="true" failonerror="false" taskname="cleaning javadoc folder" /> <delete dir="${lwjgl.bin}" quiet="true" failonerror="false" taskname="cleaning bin folder" /> </target> - + <!-- Creates a distribution of LWJGL --> <target name="release" description="Creates a distribution of LWJGL using supplied native binaries"> <!-- Warn user --> <echo message="Before running the release target, please manually compile all platforms and place required files in ${lwjgl.lib}/windows, ${lwjgl.lib}/linux and ${lwjgl.lib}/macosx${line.separator}Missing files will result in a successfull built, but with incomplete release zips"/> - <input + <input message="All data in the ${lwjgl.dist} folder will be deleted. Continue? " validargs="yes,no" addproperty="do.delete" @@ -53,7 +53,7 @@ <equals arg1="no" arg2="${do.delete}"/> </condition> <fail if="do.abort">Build aborted by user.</fail> - + <!-- prepare --> <delete dir="${lwjgl.dist}" quiet="true" failonerror="false" /> <antcall target="clean" /> @@ -72,19 +72,19 @@ <antcall target="-jars_NoDEP" /> <antcall target="javadoc" /> <antcall target="applet-release" /> - + <!-- copy resources to res folder --> <copy todir="${lwjgl.temp}/res"> <fileset dir="res"/> </copy> - + <!-- copy docs --> <copy todir="${lwjgl.temp}/doc"> <fileset dir="${lwjgl.docs}"> <patternset refid="lwjgl-docs.fileset" /> </fileset> </copy> - + <!-- create distribution from files in libs/ and temp/ --> <antcall target="-distribution_javadoc" /> <antcall target="-distribution_source" /> @@ -105,7 +105,7 @@ </fileset> </move> </target> - + <!-- Packages the java files --> <target name="-createdebugjars"> <!-- Create lwjgl.jar --> @@ -116,7 +116,7 @@ </manifest> </jar> </target> - + <!-- Packages the java files --> <target name="-createjars"> <!-- Create lwjgl.jar --> @@ -126,7 +126,7 @@ <attribute name="Sealed" value="true"/> </manifest> </jar> - + <!-- Create lwjgl_util_applet.jar --> <jar destfile="${lwjgl.temp}/jar/lwjgl_util_applet.jar" taskname="lwjgl_util_applet.jar"> <fileset refid="lwjgl_util_applet.fileset" /> @@ -151,7 +151,7 @@ <target name="-distribute"> <delete> <fileset dir="${lwjgl.temp}/native/" includes="**/*"/> - </delete> + </delete> <copy todir="${lwjgl.temp}/jar"> <fileset dir="${lwjgl.lib}/" includes="*.jar"/> @@ -175,20 +175,20 @@ <fileset dir="${lwjgl.lib}/solaris"> <patternset refid="lwjgl-solaris.fileset" /> </fileset> - </copy> - + </copy> + <!-- create base package --> <zip destfile="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip"> <zipfileset dir="${lwjgl.temp}" prefix="lwjgl-${lwjgl.version}/"> <patternset refid="lwjgl_base"/> - </zipfileset> + </zipfileset> </zip> - + <!-- create applet package --> <zip destfile="${lwjgl.dist}/lwjgl_applet-${lwjgl.version}.zip"> <zipfileset dir="." prefix="lwjgl_applet-${lwjgl.version}/"> <patternset refid="lwjgl_applet"/> - </zipfileset> + </zipfileset> </zip> </target> @@ -196,14 +196,14 @@ <target name="-distribution_javadoc"> <zip destfile="${lwjgl.dist}/lwjgl-docs-${lwjgl.version}.zip" basedir="${lwjgl.docs}" includes="javadoc/**" /> </target> - + <!-- Creates a versioned distribution of the source code --> <target name="-distribution_source"> <zip destfile="${lwjgl.dist}/lwjgl-source-${lwjgl.version}.zip"> <fileset refid="lwjgl.source.fileset" /> </zip> - </target> - + </target> + <!-- Generates the native headers from source files --> <target name="headers" description="invokes javah on java classes" depends="compile"> <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes"> @@ -251,17 +251,18 @@ <class name="org.lwjgl.openal.AL" /> <class name="org.lwjgl.opengl.GLContext" /> <class name="org.lwjgl.opengl.Pbuffer" /> - <class name="org.lwjgl.opengl.AMDDebugOutputCallback" /> - <class name="org.lwjgl.opengl.ARBDebugOutputCallback" /> + <class name="org.lwjgl.opengl.CallbackUtil" /> + <class name="org.lwjgl.opencl.CL" /> + <class name="org.lwjgl.opencl.CallbackUtil" /> </javah> </target> - + <target name="touch-version"> <touch file="${lwjgl.src.native}/windows/org_lwjgl_opengl_Display.c"/> <touch file="${lwjgl.src.native}/linux/org_lwjgl_opengl_Display.c"/> <touch file="${lwjgl.src.native}/macosx/org_lwjgl_opengl_Display.m"/> </target> - + <target name="version-mismatch"> <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/WindowsSysImplementation.java" property="lwjgl.java.windows.version"> <filterchain> @@ -276,7 +277,7 @@ <containsstring contains="JNI_VERSION ="/> </tokenfilter> </filterchain> - </loadfile> + </loadfile> <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/MacOSXSysImplementation.java" property="lwjgl.java.macosx.version"> <filterchain> <tokenfilter> @@ -297,7 +298,7 @@ <containsstring contains="#define org_lwjgl_LinuxSysImplementation_JNI_VERSION"/> </tokenfilter> </filterchain> - </loadfile> + </loadfile> <loadfile srcfile="${lwjgl.src.native}/macosx/org_lwjgl_MacOSXSysImplementation.h" property="lwjgl.native.macosx.version"> <filterchain> <tokenfilter> @@ -307,14 +308,14 @@ </loadfile> <echo> lwjgl.java.windows.version = ${lwjgl.java.windows.version} - lwjgl.native.windows.version = ${lwjgl.native.windows.version} + lwjgl.native.windows.version = ${lwjgl.native.windows.version} lwjgl.java.linux.version = ${lwjgl.java.linux.version} - lwjgl.native.linux.version = ${lwjgl.native.linux.version} + lwjgl.native.linux.version = ${lwjgl.native.linux.version} lwjgl.java.macosx.version = ${lwjgl.java.macosx.version} - lwjgl.native.macosx.version = ${lwjgl.native.macosx.version} + lwjgl.native.macosx.version = ${lwjgl.native.macosx.version} </echo> </target> - + <macrodef name="version-check"> <attribute name="platform"/> <sequential> @@ -325,7 +326,7 @@ <pathelement path="${java.class.path}"/> </classpath> </java> - + <fail message="Unable to load native library: ${nativetest.err}"> <condition> <not> @@ -333,27 +334,28 @@ </not> </condition> </fail> - + <echo message="Successfully executed NativeTest"/> </sequential> </macrodef> - + <!-- Compiles the Java source code --> <target name="compile" description="Compiles the java source code" depends="-initialize"> - <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core"> + <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core"> <src path="${lwjgl.src}/java/"/> <src path="${lwjgl.src}/generated/"/> <include name="org/lwjgl/*.java"/> <include name="org/lwjgl/input/**"/> <include name="org/lwjgl/opengl/**"/> <include name="org/lwjgl/openal/**"/> + <include name="org/lwjgl/opencl/**"/> <include name="org/lwjgl/util/**"/> <exclude name="org/lwjgl/util/generator/**"/> </javac> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" /> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" /> - </target> - + <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.5" target="1.5" taskname="test" /> + <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.5" target="1.5" taskname="examples" /> + </target> + <target name="compile_native" depends="headers, touch-version, version-mismatch" description="Compiles the native files"> <condition property="lwjgl.platform.windows"> <os family="windows" /> @@ -374,7 +376,7 @@ <os name="Mac OS X" /> </condition> <antcall target="-compile_native_macosx" /> - </target> + </target> <!-- Compiles LWJGL on Win32 platforms --> <target name="-compile_native_win32" if="lwjgl.platform.windows"> @@ -410,7 +412,7 @@ <copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/> <version-check platform="macosx"/> </target> - + <target name="repack200" description="Pack200-repack a jar file"> <pack200 src="${input}" destfile="${output}" repack="true"/> </target> @@ -430,7 +432,7 @@ <arg value="${output}"/> </java> </target> - + <target name="compress-sign-class"> <antcall target="repack200"> <param name="input" value="${dir}${jarfile}.jar"/> @@ -450,14 +452,14 @@ <!--delete file="${dir}${jarfile}.jar"/--> <rename src="${dir}${jarfile}-repack.jar" dest="${dir}${jarfile}.jar" replace="yes"/> </target> - + <target name="compress-resource"> <antcall target="lzma"> <param name="input" value="${input}"/> <param name="output" value="${output}"/> </antcall> </target> - + <target name="applettest" depends="applet"> <exec executable="appletviewer"> <arg value="-J-Djava.security.policy=applet/appletviewer.policy"/> @@ -487,8 +489,8 @@ <sysproperty key="java.library.path" value="${native_path_expanded}"/> <arg line="${args}"/> </java> - </target> - + </target> + <!-- Creates the Javadoc --> <target name="javadoc" description="Creates javadoc from java source code"> <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API" useexternalfile="true"> Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-09-21 09:51:05 UTC (rev 3411) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-09-26 23:43:24 UTC (rev 3412) @@ -2,19 +2,22 @@ <!-- ================================================================== --> <!-- Global properties for build --> <!-- ================================================================== --> - <property name="lwjgl.src" location="src" /> - <property name="lwjgl.src.native" location="${lwjgl.src}/native" /> - <property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" /> - <property name="lwjgl.src.templates" location="${lwjgl.src}/templates" /> - <property name="lwjgl.bin" location="bin" /> - <property name="lwjgl.lib" location="libs" /> - <property name="lwjgl.dist" location="dist" /> - <property name="lwjgl.docs" location="doc" /> - <property name="lwjgl.temp" location="temp" /> - <property name="lwjgl.res" location="res" /> + <property name="lwjgl.src" location="src" /> + <property name="lwjgl.src.native" location="${lwjgl.src}/native" /> + <property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" /> + <property name="lwjgl.src.templates" location="${lwjgl.src}/templates" /> + <property name="lwjgl.bin" location="bin" /> + <property name="lwjgl.lib" location="libs" /> + <property name="lwjgl.dist" location="dist" /> + <property name="lwjgl.docs" location="doc" /> + <property name="lwjgl.temp" location="temp" /> + <property name="lwjgl.res" location="res" /> <property name="lwjgl.version" value="2.6" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> + <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/> + <property name="opencl-template-pattern" value="org/lwjgl/opencl/CL*.java,${opencl-template-pattern-extensions}"/> + <!-- ================================================================== --> <!-- Filesets used for targets --> <!-- ================================================================== --> @@ -39,18 +42,16 @@ <include name="org/lwjgl/test/**" /> <include name="org/lwjgl/examples/**" /> </fileset> - + <!-- More files to include in the lwjgl_test.jar file --> <fileset id="lwjgl_test_extra.fileset" dir="${lwjgl.src}/java"> <exclude name="**.*" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFP.fp" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFP.vp" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFSH.fsh" /> - <include name="org/lwjgl/test/opengl/shaders/shaderFSH.vsh" /> - <include name="org/lwjgl/test/opengl/shaders/shaderVP.vp" /> - <include name="org/lwjgl/test/opengl/shaders/shaderVSH.vsh" /> - <include name="org/lwjgl/test/opengl/shaders/shaderUNI.vsh" /> - </fileset> + <include name="org/lwjgl/test/opengl/shaders/*.fp" /> + <include name="org/lwjgl/test/opengl/shaders/*.vp" /> + <include name="org/lwjgl/test/opengl/shaders/*.vsh" /> + <include name="org/lwjgl/test/opengl/shaders/*.fsh" /> + <include name="org/lwjgl/test/opencl/gl/*.cl /> + </fileset> <!-- Files to include in the lwjgl_util.jar file --> <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}"> @@ -66,7 +67,7 @@ <include name="org/lwjgl/test/applet/**"/> <include name="org/lwjgl/test/opengl/awt/AWTGearsCanvas.class"/> </fileset> - + <!-- Files to make Javadoc from --> <fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}"> <include name="**/*.java" /> @@ -95,15 +96,15 @@ <include name="jinput-dx8*.dll" /> <include name="jinput-raw*.dll" /> </patternset> - + <!-- Files to include in linux, glibc2.3 package --> <patternset id="lwjgl-linux.fileset"> <include name="liblwjgl*.so" /> - <include name="libopenal*.so" /> + <include name="libopenal*.so" /> <include name="libjinput-linux.so" /> <include name="libjinput-linux64.so" /> </patternset> - + <!-- Files to include in mac os x package --> <patternset id="lwjgl-macosx.fileset"> <include name="liblwjgl.jnilib" /> @@ -111,13 +112,13 @@ <include name="libjinput-osx.jnilib" /> <include name="libjinput-osx-legacy.jnilib" /> </patternset> - + <!-- Files to include in solaris package --> <patternset id="lwjgl-solaris.fileset"> <include name="liblwjgl*.so" /> - <include name="libopenal.so" /> + <include name="libopenal.so" /> </patternset> - + <!-- Files to include in source distribution --> <fileset id="lwjgl.source.fileset" dir="."> <include name="build.xml" /> @@ -132,7 +133,7 @@ <exclude name="res/Missing_you.mod" /> <exclude name="res/phero*.*" /> </patternset> - + <!-- files in the optional package --> <patternset id="lwjgl_optional"> <include name="res/**" /> @@ -143,15 +144,15 @@ <include name="doc/CREDITS" /> <include name="doc/LICENSE" /> <include name="doc/README" /> - </patternset> - + </patternset> + <!-- files in the lwjgl_applet package --> <patternset id="lwjgl_applet"> <include name="applet/**" /> <exclude name="applet/appletviewer.policy" /> <exclude name="applet/lwjglkeystore" /> - </patternset> - + </patternset> + <uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/windows/lwjgl.dll" > <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/> <srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/> Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2010-09-21 09:51:05 UTC (rev 3411) +++ trunk/LWJGL/platform_build/build-generator.xml 2010-09-26 23:43:24 UTC (rev 3412) @@ -11,21 +11,38 @@ <!-- Compiles the Java generator source code --> <target name="generators" description="Compiles the native method generators"> <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator"> + <include name="org/lwjgl/util/generator/openal/**.java"/> + <include name="org/lwjgl/util/generator/opengl/**.java"/> + <include name="org/lwjgl/util/generator/opencl/**.java"/> <compilerarg value="-Xlint:all"/> </javac> <!-- Compile helper classes used by the templates --> - <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.4" target="1.4" taskname="generator"> + <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.5" target="1.5" taskname="generator"> + <include name="org/lwjgl/PointerWrapper.java"/> + <include name="org/lwjgl/PointerBuffer.java"/> + <!-- OpenGL --> <include name="org/lwjgl/opengl/GLSync.java"/> <include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/> <include name="org/lwjgl/opengl/ARBDebugOutputCallback.java"/> - <include name="org/lwjgl/opengl/PointerWrapper.java"/> + <!-- OpenCL --> + <include name="org/lwjgl/opencl/CLPlatform.java"/> + <include name="org/lwjgl/opencl/CLDevice.java"/> + <include name="org/lwjgl/opencl/CLContext.java"/> + <include name="org/lwjgl/opencl/CLContextCallback.java"/> + <include name="org/lwjgl/opencl/CLCommandQueue.java"/> + <include name="org/lwjgl/opencl/CLMem.java"/> + <include name="org/lwjgl/opencl/CLMemObjectDestructorCallback.java"/> + <include name="org/lwjgl/opencl/CLBuildProgramCallback.java"/> + <include name="org/lwjgl/opencl/CLNativeKernel.java"/> + <include name="org/lwjgl/opencl/CLEventCallback.java"/> + <include name="org/lwjgl/opencl/CLFunctionAddress.java"/> </javac> </target> <!-- Proxy target to generate it all --> - <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/> + <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references, generate-opencl, generate-opencl-capabilities" description="Generates java and native source"/> - <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references" description="Generates java and native source"/> + <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references, generate-opencl-debug, generate-opencl-capabilities-debug" description="Generates java and native source with debug functionality"/> <!-- Generate OpenAL --> <target name="generate-openal" depends="generators" description="Generates java and native source for AL"> @@ -39,7 +56,7 @@ <arg path="${lwjgl.src}/generated"/> <arg value="-d"/> <arg path="${lwjgl.src.native}/generated"/> - <arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/> + <arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/> <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/> </apply> </target> @@ -56,7 +73,7 @@ <arg path="${lwjgl.src}/generated"/> <arg value="-d"/> <arg path="${lwjgl.src.native}/generated"/> - <arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/> + <arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/> <arg value="-Ageneratechecks"/> <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/> </apply> @@ -75,7 +92,7 @@ <arg value="-d"/> <arg path="${lwjgl.src.native}/generated"/> <arg value="-Acontextspecific"/> - <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/> + <arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/> <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> </target> @@ -94,17 +111,17 @@ <arg path="${lwjgl.src.native}/generated"/> <arg value="-Ageneratechecks"/> <arg value="-Acontextspecific"/> - <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/> + <arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/> <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> </target> - <!-- Generate references --> + <!-- Generate OpenGL references --> <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> <arg value="-nocompile"/> <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/> + <arg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessorFactory"/> <arg value="-cp"/> <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> <arg value="-s"/> @@ -113,12 +130,12 @@ </apply> </target> - <!-- Generate context capabilities --> + <!-- Generate OpenGL context capabilities --> <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> <arg value="-nocompile"/> <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/> + <arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/> <arg value="-cp"/> <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> <arg value="-s"/> @@ -128,12 +145,12 @@ </apply> </target> - <!-- Generate context capabilities [DEBUG] --> + <!-- Generate OpenGL context capabilities [DEBUG] --> <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL"> <apply executable="apt" parallel="true"> <arg value="-nocompile"/> <arg value="-factory"/> - <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/> + <arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/> <arg value="-cp"/> <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> <arg value="-s"/> @@ -143,4 +160,72 @@ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/> </apply> </target> + + <!-- Generate OpenCL --> + <target name="generate-opencl" depends="generators" description="Generates java and native source for CL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-d"/> + <arg path="${lwjgl.src.native}/generated"/> + <arg value="-Acontextspecific"/> + <arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/> + <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/> + </apply> + </target> + + <!-- Generate OpenCL [DEBUG] --> + <target name="generate-opencl-debug" depends="generators" description="Generates java and native source for CL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-d"/> + <arg path="${lwjgl.src.native}/generated"/> + <arg value="-Ageneratechecks"/> + <arg value="-Acontextspecific"/> + <arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/> + <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/> + </apply> + </target> + + <!-- Generate OpenCL capabilities --> + <target name="generate-opencl-capabilities" depends="generators" description="Generates capabilities for CL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-Acontextspecific"/> + <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/> + </apply> + </target> + + <!-- Generate OpenCL capabilities [DEBUG] --> + <target name="generate-opencl-capabilities-debug" depends="generators" description="Generates capabilities for CL"> + <apply executable="apt" parallel="true"> + <arg value="-nocompile"/> + <arg value="-factory"/> + <arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/> + <arg value="-cp"/> + <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/> + <arg value="-s"/> + <arg path="${lwjgl.src}/generated"/> + <arg value="-Ageneratechecks"/> + <arg value="-Acontextspecific"/> + <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/> + </apply> + </target> </project> Modified: trunk/LWJGL/platform_build/linux_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/linux_ant/build.xml 2010-09-21 09:51:05 UTC (rev 3411) +++ trunk/LWJGL/platform_build/linux_ant/build.xml 2010-09-26 23:43:24 UTC (rev 3412) @@ -16,7 +16,7 @@ <fileset dir="." includes="*.so"/> </delete> </target> - + <target name="compile"> <exec executable="uname" outputproperty="hwplatform"> <arg value="-m"/> @@ -27,10 +27,10 @@ <condition property="cflags_pthread" value="-pthreads" else="-pthread"> <os name="SunOS" /> </condition> - <condition property="version_script_flags32" value="" else="-Wl,--version-script=${native}/linux/lwjgl.map"> + <condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'"> <os name="SunOS" /> </condition> - <condition property="version_script_flags64" value="-m64" else="-Wl,--version-script=${native}/linux/lwjgl.map"> + <condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'"> <and> <os name="SunOS" /> </and> @@ -50,7 +50,7 @@ </or> </not> </condition> - + <!-- On linux, the 64 bit jre doesn't have the 32 bit libs --> <condition property="build.64bit.only"> <and> @@ -58,11 +58,11 @@ <equals arg1="${hwplatform}" arg2="x86_64"/> </and> </condition> - + <antcall target="compile32"/> <antcall target="compile64"/> </target> - + <target name="compile32" unless="build.64bit.only"> <mkdir dir="x32"/> <apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true"> @@ -89,7 +89,7 @@ </apply> </target> - <target name="compile64" unless="build.32bit.only"> + <target name="compile64" unless="build.32bit.only"> <mkdir dir="x64"/> <apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true"> <arg line="${cflags64} ${cflags_pthread}"/> Modified: trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-09-21 09:51:05 UTC (rev 3411) +++ trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-09-26 23:43:24 UTC (rev 3412) @@ -87,13 +87,27 @@ } } - /** Helper methods to ensure an IntBuffer is null-terminated */ + /** Helper method to ensure an IntBuffer is null-terminated */ public static void checkNullTerminated(IntBuffer buf) { if ( buf.get(buf.limit() - 1) != 0 ) { throw new IllegalArgumentException("Missing null termination"); } } + /** Helper method to ensure a LongBuffer is null-terminated */ + public static void checkNullTerminated(LongBuffer buf) { + if ( buf.get(buf.limit() - 1) != 0 ) { + throw new IllegalArgumentException("Missing null termination"); + } + } + + /** Helper method to ensure a PointerBuffer is null-terminated */ + public static void checkNullTerminated(PointerBuffer buf) { + if ( buf.get(buf.limit() - 1) != 0 ) { + throw new IllegalArgumentException("Missing null termination"); + } + } + public static void checkNotNull(Object o) { if ( LWJGLUtil.CHECKS && o == null) throw new IllegalArgumentException("Null argument"); @@ -138,6 +152,15 @@ } } + public static void checkDirect(PointerBuffer buf) { + // NO-OP, PointerBuffer is always direct. + } + + public static void checkArray(Object[] array) { + if ( LWJGLUtil.CHECKS && array == null ) + throw new IllegalArgumentException("Invalid array"); + } + /** * This is a separate call to help inline checkBufferSize. */ @@ -145,6 +168,18 @@ throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size); } + private static void throwBufferSizeException(PointerBuffer buf, int size) { + throw new IllegalArgumentException("Number of remaining pointer buffer elements is " + buf.remaining() + ", must be at least " + size); + } + + private static void throwArraySizeException(Object[] array, int size) { + throw new IllegalArgumentException("Number of array elements is " + array.length + ", must be at least " + size); + } + + private static void throwArraySizeException(long[] array, int size) { + throw new IllegalArgumentException("Number of array elements is " + array.length + ", must be at least " + size); + } + /** * Helper method to ensure a buffer is big enough to receive data from a * glGet* operation. @@ -202,4 +237,21 @@ checkDirect(buf); } } -} + + public static void checkBuffer(PointerBuffer buf, int size) { + if ( LWJGLUtil.CHE... [truncated message content] |
From: <sp...@us...> - 2010-09-28 21:11:47
|
Revision: 3418 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3418&view=rev Author: spasi Date: 2010-09-28 21:11:35 +0000 (Tue, 28 Sep 2010) Log Message: ----------- Ported codebase to Java 1.5. Misc OpenCL fixes and API improvements. Changed fractal demo to use events/sync objects instead of cl/glFinish for synchronization. (untested) Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/NondirectBufferWrapper.java trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java trunk/LWJGL/src/java/org/lwjgl/PointerWrapperAbstract.java trunk/LWJGL/src/java/org/lwjgl/Sys.java trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java trunk/LWJGL/src/java/org/lwjgl/examples/Game.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Entity.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/ShotEntity.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/SoundManager.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Sprite.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Texture.java trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java trunk/LWJGL/src/java/org/lwjgl/input/Controller.java trunk/LWJGL/src/java/org/lwjgl/input/ControllerEvent.java trunk/LWJGL/src/java/org/lwjgl/input/Controllers.java trunk/LWJGL/src/java/org/lwjgl/input/Cursor.java trunk/LWJGL/src/java/org/lwjgl/input/JInputController.java trunk/LWJGL/src/java/org/lwjgl/input/Keyboard.java trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java trunk/LWJGL/src/java/org/lwjgl/input/OpenGLPackageAccess.java trunk/LWJGL/src/java/org/lwjgl/openal/AL.java trunk/LWJGL/src/java/org/lwjgl/openal/ALC10.java trunk/LWJGL/src/java/org/lwjgl/openal/ALC11.java trunk/LWJGL/src/java/org/lwjgl/openal/ALCcontext.java trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java trunk/LWJGL/src/java/org/lwjgl/openal/EFXUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/APIUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/APPLEContextLoggingUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/CL.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLCommandQueue.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLDevice.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLEvent.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLKernel.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLMem.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObject.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectChild.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRegistry.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatform.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgram.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLSampler.java trunk/LWJGL/src/java/org/lwjgl/opencl/Util.java trunk/LWJGL/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/APIUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java trunk/LWJGL/src/java/org/lwjgl/opengl/AWTUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java trunk/LWJGL/src/java/org/lwjgl/opengl/CallbackUtil.java trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java trunk/LWJGL/src/java/org/lwjgl/opengl/ContextAttribs.java trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java trunk/LWJGL/src/java/org/lwjgl/opengl/DisplayMode.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java trunk/LWJGL/src/java/org/lwjgl/opengl/GLUConstants.java trunk/LWJGL/src/java/org/lwjgl/opengl/GlobalLock.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxEvent.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxKeycodes.java trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxMouse.java trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java trunk/LWJGL/src/java/org/lwjgl/opengl/PeerInfo.java trunk/LWJGL/src/java/org/lwjgl/opengl/ReferencesStack.java trunk/LWJGL/src/java/org/lwjgl/opengl/RenderTexture.java trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsAWTGLCanvasPeerInfo.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeyboard.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsKeycodes.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsRegistry.java trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java trunk/LWJGL/src/java/org/lwjgl/test/DisplayTest.java trunk/LWJGL/src/java/org/lwjgl/test/WindowCreationTest.java trunk/LWJGL/src/java/org/lwjgl/test/applet/AppletLoaderTest.java trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java trunk/LWJGL/src/java/org/lwjgl/test/applet/OpenAL.java trunk/LWJGL/src/java/org/lwjgl/test/applet/OpenGL.java trunk/LWJGL/src/java/org/lwjgl/test/applet/Speed.java trunk/LWJGL/src/java/org/lwjgl/test/applet/Test.java trunk/LWJGL/src/java/org/lwjgl/test/glu/tessellation/TessCallback.java trunk/LWJGL/src/java/org/lwjgl/test/glu/tessellation/TessellationTest.java trunk/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java trunk/LWJGL/src/java/org/lwjgl/test/input/KeyboardTest.java trunk/LWJGL/src/java/org/lwjgl/test/input/MouseCreationTest.java trunk/LWJGL/src/java/org/lwjgl/test/input/MouseTest.java trunk/LWJGL/src/java/org/lwjgl/test/input/TestControllers.java trunk/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java trunk/LWJGL/src/java/org/lwjgl/test/openal/OpenALInfo.java trunk/LWJGL/src/java/org/lwjgl/test/openal/PositionTest.java trunk/LWJGL/src/java/org/lwjgl/test/opencl/HelloOpenCL.java trunk/LWJGL/src/java/org/lwjgl/test/opencl/gl/DemoFractal.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/Gears.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/PbufferTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/SyncTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/VBOIndexTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/VBOTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/VersionTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/AWTGears.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/AWTGearsCanvas.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/AWTTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/DemoBox.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/DisplayParentTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRenderer.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRendererRTT.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/Shader.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderFP.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderFSH.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderVP.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderVSH.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java trunk/LWJGL/src/java/org/lwjgl/util/Display.java trunk/LWJGL/src/java/org/lwjgl/util/ReadableColor.java trunk/LWJGL/src/java/org/lwjgl/util/ReadableDimension.java trunk/LWJGL/src/java/org/lwjgl/util/ReadablePoint.java trunk/LWJGL/src/java/org/lwjgl/util/ReadableRectangle.java trunk/LWJGL/src/java/org/lwjgl/util/Renderable.java trunk/LWJGL/src/java/org/lwjgl/util/Timer.java trunk/LWJGL/src/java/org/lwjgl/util/WritableColor.java trunk/LWJGL/src/java/org/lwjgl/util/WritableDimension.java trunk/LWJGL/src/java/org/lwjgl/util/WritablePoint.java trunk/LWJGL/src/java/org/lwjgl/util/WritableRectangle.java trunk/LWJGL/src/java/org/lwjgl/util/XPMFile.java trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Helper.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Cylinder.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Disk.java trunk/LWJGL/src/java/org/lwjgl/util/glu/GLU.java trunk/LWJGL/src/java/org/lwjgl/util/glu/GLUtessellator.java trunk/LWJGL/src/java/org/lwjgl/util/glu/GLUtessellatorCallback.java trunk/LWJGL/src/java/org/lwjgl/util/glu/MipMap.java trunk/LWJGL/src/java/org/lwjgl/util/glu/PartialDisk.java trunk/LWJGL/src/java/org/lwjgl/util/glu/PixelStoreState.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Project.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Quadric.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Registry.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Sphere.java trunk/LWJGL/src/java/org/lwjgl/util/glu/Util.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/Normal.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/PriorityQ.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/Render.java trunk/LWJGL/src/java/org/lwjgl/util/glu/tessellation/Sweep.java trunk/LWJGL/src/java/org/lwjgl/util/jinput/KeyMap.java trunk/LWJGL/src/java/org/lwjgl/util/jinput/LWJGLKeyboard.java trunk/LWJGL/src/java/org/lwjgl/util/jinput/LWJGLMouse.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Matrix.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Matrix2f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Matrix3f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Matrix4f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Quaternion.java trunk/LWJGL/src/java/org/lwjgl/util/vector/ReadableVector.java trunk/LWJGL/src/java/org/lwjgl/util/vector/ReadableVector2f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/ReadableVector3f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/ReadableVector4f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Vector.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Vector2f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/Vector3f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/WritableVector2f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/WritableVector3f.java trunk/LWJGL/src/java/org/lwjgl/util/vector/WritableVector4f.java trunk/LWJGL/src/native/common/extcl_types.h trunk/LWJGL/src/native/common/org_lwjgl_opencl_CL.c trunk/LWJGL/src/native/common/org_lwjgl_opencl_CL.h trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_icd.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/opencl/CLObjectRetainable.java trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilAbstract.java trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java trunk/LWJGL/src/templates/org/lwjgl/opencl/AMD_event_callback.java trunk/LWJGL/src/templates/org/lwjgl/opencl/KHR_d3d10_sharing.java Removed Paths: ------------- trunk/LWJGL/src/java/org/lwjgl/opencl/CLDeviceImpl.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLKernelImpl.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLPlatformImpl.java Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/build.xml 2010-09-28 21:11:35 UTC (rev 3418) @@ -16,74 +16,88 @@ <!-- Initialize build --> <!-- ================================================================== --> <target name="-initialize"> - <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> - <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing bin folder" /> - <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" /> - <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" /> - <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" /> - <mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" /> - <mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" /> - <mkdir dir="${lwjgl.temp}/jar" taskname="initialiazing temp/jar folder" /> - <mkdir dir="${lwjgl.temp}/doc" taskname="initialiazing temp/doc folder" /> - <mkdir dir="${lwjgl.temp}/res" taskname="initialiazing temp/res folder" /> - <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" /> - <mkdir dir="${lwjgl.temp}/native/windows" taskname="initialiazing temp/windows folder" /> - <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" /> - <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" /> - <mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" /> + <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> + <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" /> + <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" /> + <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" /> + <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" /> + <mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" /> + <mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" /> + <mkdir dir="${lwjgl.temp}/jar" taskname="initialiazing temp/jar folder" /> + <mkdir dir="${lwjgl.temp}/doc" taskname="initialiazing temp/doc folder" /> + <mkdir dir="${lwjgl.temp}/res" taskname="initialiazing temp/res folder" /> + <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" /> + <mkdir dir="${lwjgl.temp}/native/windows" taskname="initialiazing temp/windows folder" /> + <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" /> + <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" /> + <mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" /> </target> <!-- Cleans up any files created during the execution of this script --> <target name="clean" description="Cleans the directories controlled by this ant script" depends="clean-generated"> <delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" /> <delete dir="${lwjgl.docs}/javadoc" quiet="true" failonerror="false" taskname="cleaning javadoc folder" /> - <delete dir="${lwjgl.bin}" quiet="true" failonerror="false" taskname="cleaning bin folder" /> + <!-- Delete java classes only to avoid unnecessary native recompilation --> + <delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" /> </target> + <!-- Useful when we need to force native recompilation --> + <target name="clean-native" description="Cleans bin folder's native directory" depends="clean-generated-native"> + <delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" /> + <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" /> + </target> + + <target name="clean-all" depends="clean, clean-generated-native" description="Cleans all directories controlled by this ant script"> + <delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" /> + </target> + <!-- Creates a distribution of LWJGL --> <target name="release" description="Creates a distribution of LWJGL using supplied native binaries"> <!-- Warn user --> <echo message="Before running the release target, please manually compile all platforms and place required files in ${lwjgl.lib}/windows, ${lwjgl.lib}/linux and ${lwjgl.lib}/macosx${line.separator}Missing files will result in a successfull built, but with incomplete release zips"/> - <input - message="All data in the ${lwjgl.dist} folder will be deleted. Continue? " - validargs="yes,no" - addproperty="do.delete" - /> - <condition property="do.abort"> - <equals arg1="no" arg2="${do.delete}"/> - </condition> - <fail if="do.abort">Build aborted by user.</fail> + <input + message="All data in the ${lwjgl.dist} folder will be deleted. Continue? " + validargs="yes,no" + addproperty="do.delete" + /> + <condition property="do.abort"> + <equals arg1="no" arg2="${do.delete}"/> + </condition> + <fail if="do.abort">Build aborted by user.</fail> - <!-- prepare --> - <delete dir="${lwjgl.dist}" quiet="true" failonerror="false" /> - <antcall target="clean" /> - <antcall target="-initialize" /> + <!-- prepare --> + <delete dir="${lwjgl.dist}" quiet="true" failonerror="false" /> + <antcall target="clean" /> + <antcall target="-initialize" /> - <!-- compile and create jars --> - <antcall target="generate-debug"/> - <antcall target="compile" /> - <antcall target="-createdebugjars" /> + <!-- compile and create debug jars --> + <antcall target="generate-debug" /> + <antcall target="compile" /> + <antcall target="-createdebugjars" /> + <!-- Generator will skip all templates if we don't clean --> - <delete dir="${lwjgl.bin}" quiet="true" failonerror="false" taskname="cleaning bin folder" /> - <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> - <antcall target="generate-all"/> - <antcall target="compile" /> - <antcall target="-createjars" /> - <antcall target="-jars_NoDEP" /> - <antcall target="javadoc" /> - <antcall target="applet-release" /> + <delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" /> - <!-- copy resources to res folder --> - <copy todir="${lwjgl.temp}/res"> - <fileset dir="res"/> - </copy> + <!-- compile and create jars --> + <antcall target="generate-all" /> + <antcall target="compile" /> + <antcall target="-createjars" /> - <!-- copy docs --> + <antcall target="-jars_NoDEP" /> + <antcall target="javadoc" /> + <antcall target="applet-release" /> + + <!-- copy resources to res folder --> + <copy todir="${lwjgl.temp}/res"> + <fileset dir="res"/> + </copy> + + <!-- copy docs --> <copy todir="${lwjgl.temp}/doc"> <fileset dir="${lwjgl.docs}"> <patternset refid="lwjgl-docs.fileset" /> </fileset> - </copy> + </copy> <!-- create distribution from files in libs/ and temp/ --> <antcall target="-distribution_javadoc" /> @@ -219,7 +233,7 @@ <class name="org.lwjgl.opengl.LinuxContextImplementation" /> <class name="org.lwjgl.opengl.LinuxCanvasImplementation" /> </javah> - + <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes"> <class name="org.lwjgl.opengl.WindowsKeyboard" /> <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" /> @@ -231,7 +245,7 @@ <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo" /> <class name="org.lwjgl.opengl.WindowsContextImplementation" /> </javah> - + <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes"> <class name="org.lwjgl.MacOSXSysImplementation" /> <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" /> @@ -241,7 +255,7 @@ <class name="org.lwjgl.opengl.MacOSXDisplay" /> <class name="org.lwjgl.opengl.MacOSXContextImplementation" /> </javah> - + <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes"> <class name="org.lwjgl.opengl.AWTSurfaceLock" /> <class name="org.lwjgl.DefaultSysImplementation" /> @@ -342,6 +356,7 @@ <!-- Compiles the Java source code --> <target name="compile" description="Compiles the java source code" depends="-initialize"> <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core"> + <!--<compilerarg value="-Xlint:unchecked"/>--> <src path="${lwjgl.src}/java/"/> <src path="${lwjgl.src}/generated/"/> <include name="org/lwjgl/*.java"/> @@ -493,7 +508,7 @@ <!-- Creates the Javadoc --> <target name="javadoc" description="Creates javadoc from java source code"> - <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API" useexternalfile="true"> + <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL API" useexternalfile="true"> <fileset refid="lwjgl.javadoc.fileset" /> <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle> <bottom><![CDATA[<i>Copyright © 2002-2009 lwjgl.org. All Rights Reserved.</i>]]></bottom> Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/platform_build/build-generator.xml 2010-09-28 21:11:35 UTC (rev 3418) @@ -1,13 +1,18 @@ <project name="generator"> <!-- clean the generated files --> - <target name="clean-generated" description="Deletes the generated java and native source"> + <target name="clean-generated" description="Deletes the generated java source"> <delete quiet="true" failonerror="false"> <fileset dir="${lwjgl.src}/generated" includes="**"/> - <fileset dir="${lwjgl.src.native}/generated" includes="**"/> </delete> </target> + <target name="clean-generated-native" description="Deletes the generated native source"> + <delete quiet="true" failonerror="false"> + <fileset dir="${lwjgl.src.native}/generated" includes="**"/> + </delete> + </target> + <!-- Compiles the Java generator source code --> <target name="generators" description="Compiles the native method generators"> <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator"> Modified: trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -157,7 +157,7 @@ } public static void checkArray(Object[] array) { - if ( LWJGLUtil.CHECKS && array == null ) + if ( LWJGLUtil.CHECKS && (array == null || array.length == 0) ) throw new IllegalArgumentException("Invalid array"); } Modified: trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -338,7 +338,7 @@ */ public static String[] getLibraryPaths(String libname, String[] platform_lib_names, ClassLoader classloader) { // need to pass path of possible locations of library to native side - List possible_paths = new ArrayList(); + List<String> possible_paths = new ArrayList<String>(); String classloader_path = getPathFromClassLoader(libname, classloader); if (classloader_path != null) { @@ -346,18 +346,17 @@ possible_paths.add(classloader_path); } - for (int i = 0; i < platform_lib_names.length; i++) { - String platform_lib_name = platform_lib_names[i]; + for ( String platform_lib_name : platform_lib_names ) { String lwjgl_classloader_path = getPathFromClassLoader("lwjgl", classloader); - if (lwjgl_classloader_path != null) { + if ( lwjgl_classloader_path != null ) { log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) - + File.separator + platform_lib_name); + + File.separator + platform_lib_name); } // add Installer path String alternative_path = getPrivilegedProperty("org.lwjgl.librarypath"); - if (alternative_path != null) { + if ( alternative_path != null ) { possible_paths.add(alternative_path + File.separator + platform_lib_name); } @@ -365,7 +364,7 @@ String java_library_path = getPrivilegedProperty("java.library.path"); StringTokenizer st = new StringTokenizer(java_library_path, File.pathSeparator); - while (st.hasMoreTokens()) { + while ( st.hasMoreTokens() ) { String path = st.nextToken(); possible_paths.add(path + File.separator + platform_lib_name); } @@ -379,15 +378,13 @@ } //create needed string array - String[] paths = new String[possible_paths.size()]; - possible_paths.toArray(paths); - return paths; + return possible_paths.toArray(new String[possible_paths.size()]); } static void execPrivileged(final String[] cmd_array) throws Exception { try { - Process process = (Process)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { + Process process = AccessController.doPrivileged(new PrivilegedExceptionAction<Process>() { + public Process run() throws Exception { return Runtime.getRuntime().exec(cmd_array); } }); @@ -401,8 +398,8 @@ } private static String getPrivilegedProperty(final String property_name) { - return (String)AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return AccessController.doPrivileged(new PrivilegedAction<String>() { + public String run() { return System.getProperty(property_name); } }); @@ -422,16 +419,15 @@ private static String getPathFromClassLoader(final String libname, final ClassLoader classloader) { try { log("getPathFromClassLoader: searching for: " + libname); - Class c = classloader.getClass(); + Class<?> c = classloader.getClass(); while (c != null) { - final Class clazz = c; + final Class<?> clazz = c; try { - return (String)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - Method findLibrary = clazz.getDeclaredMethod("findLibrary", new Class[]{String.class}); + return AccessController.doPrivileged(new PrivilegedExceptionAction<String>() { + public String run() throws Exception { + Method findLibrary = clazz.getDeclaredMethod("findLibrary", String.class); findLibrary.setAccessible(true); - Object[] arguments = new Object[] {libname}; - String path = (String)findLibrary.invoke(classloader, arguments); + String path = (String)findLibrary.invoke(classloader, libname); return path; } }); @@ -450,12 +446,12 @@ * Gets a boolean property as a privileged action. */ private static boolean getPrivilegedBoolean(final String property_name) { - Boolean value = (Boolean)AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - return new Boolean(Boolean.getBoolean(property_name)); + Boolean value = AccessController.doPrivileged(new PrivilegedAction<Boolean>() { + public Boolean run() { + return Boolean.getBoolean(property_name); } }); - return value.booleanValue(); + return value; } /** Modified: trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/LinuxSysImplementation.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -39,7 +39,7 @@ * $Id$ */ final class LinuxSysImplementation extends J2SESysImplementation { - private final static int JNI_VERSION = 19; + private static final int JNI_VERSION = 19; static { java.awt.Toolkit.getDefaultToolkit(); // This will make sure libjawt.so is loaded @@ -55,8 +55,7 @@ String[] browsers = {"xdg-open", "firefox", "mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"}; - for (int i = 0; i < browsers.length; i ++) { - final String browser = browsers[i]; + for ( final String browser : browsers ) { try { LWJGLUtil.execPrivileged(new String[] { browser, url }); return true; Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -42,7 +42,7 @@ * $Id$ */ final class MacOSXSysImplementation extends J2SESysImplementation { - private final static int JNI_VERSION = 19; + private static final int JNI_VERSION = 19; static { // Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3 Modified: trunk/LWJGL/src/java/org/lwjgl/NondirectBufferWrapper.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/NondirectBufferWrapper.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/NondirectBufferWrapper.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -49,16 +49,16 @@ * $Id: BufferChecks.java 2762 2007-04-11 16:13:05Z elias_naur $ */ public final class NondirectBufferWrapper { - private final static int INITIAL_BUFFER_SIZE = 1; + private static final int INITIAL_BUFFER_SIZE = 1; - private final static ThreadLocal thread_buffer = new ThreadLocal() { - protected Object initialValue() { + private static final ThreadLocal<CachedBuffers> thread_buffer = new ThreadLocal<CachedBuffers>() { + protected CachedBuffers initialValue() { return new CachedBuffers(INITIAL_BUFFER_SIZE); } }; private static CachedBuffers getCachedBuffers(int minimum_byte_size) { - CachedBuffers buffers = (CachedBuffers)thread_buffer.get(); + CachedBuffers buffers = thread_buffer.get(); int current_byte_size = buffers.byte_buffer.capacity(); if (minimum_byte_size > current_byte_size) { buffers = new CachedBuffers(minimum_byte_size); @@ -378,7 +378,7 @@ return direct_buffer; } - private final static class CachedBuffers { + private static final class CachedBuffers { private final ByteBuffer byte_buffer; private final ShortBuffer short_buffer_big; private final IntBuffer int_buffer_big; Modified: trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/PointerBuffer.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -49,7 +49,7 @@ boolean is64 = false; try { Method m = Class.forName("org.lwjgl.Sys").getDeclaredMethod("is64Bit", (Class[])null); - is64 = ((Boolean)m.invoke(null, (Object[])null)).booleanValue(); + is64 = (Boolean)m.invoke(null, (Object[])null); } catch (Throwable t) { // ignore } finally { @@ -63,10 +63,22 @@ protected final IntBuffer view32; protected final LongBuffer view64; + /** + * Creates a new PointerBuffer with the specified capacity. + * + * @param capacity the PointerBuffer size, in number of pointers + */ public PointerBuffer(final int capacity) { this(BufferUtils.createByteBuffer(capacity * getPointerSize())); } + /** + * Creates a new PointerBuffer using the specified ByteBuffer as its pointer + * data source. This is useful for users that do their own memory management + * over a big ByteBuffer, instead of allocating many small ones. + * + * @param source the source buffer + */ public PointerBuffer(final ByteBuffer source) { if ( !source.isDirect() ) throw new IllegalArgumentException("ByteBuffer is not direct"); @@ -91,6 +103,11 @@ return pointers; } + /** Returns true if the underlying architecture is 64bit. */ + public static boolean is64Bit() { + return is64Bit; + } + /** * Returns the pointer size in bytes, based on the underlying architecture. * @@ -769,7 +786,7 @@ * @return A summary string */ public String toString() { - StringBuffer sb = new StringBuffer(48); + StringBuilder sb = new StringBuilder(48); sb.append(getClass().getName()); sb.append("[pos="); sb.append(position()); Modified: trunk/LWJGL/src/java/org/lwjgl/PointerWrapperAbstract.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/PointerWrapperAbstract.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/PointerWrapperAbstract.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -44,16 +44,30 @@ this.pointer = pointer; } - public final boolean isNull() { - return pointer == 0; + /** + * Returns true if this object represents a valid pointer. + * The pointer might be invalid because it is NULL or because + * some other action has deleted the object that this pointer + * represents. + * + * @return true if the pointer is valid + */ + public boolean isValid() { + return pointer != 0; } - public final void checkNull() { - if ( LWJGLUtil.DEBUG && pointer == 0 ) - throw new IllegalStateException("This pointer is null."); + /** + * Checks if the pointer is valid and throws an IllegalStateException if + * it is not. This method is a NO-OP, unless the org.lwjgl.util.Debug + * property has been set to true. + */ + public final void checkValid() { + if ( LWJGLUtil.DEBUG && !isValid() ) + throw new IllegalStateException("This pointer is not valid."); } - public long getPointer() { + public final long getPointer() { + checkValid(); return pointer; } @@ -72,4 +86,7 @@ return (int)(pointer ^ (pointer >>> 32)); } + public String toString() { + return getClass().getSimpleName() + " pointer (0x" + Long.toHexString(pointer) + ")"; + } } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -63,7 +63,7 @@ private static final boolean is64Bit; private static void doLoadLibrary(final String lib_name) { - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { String library_path = System.getProperty("org.lwjgl.librarypath"); if (library_path != null) { @@ -215,22 +215,22 @@ // Attempt to use Webstart if we have it available try { // Lookup the javax.jnlp.BasicService object - final Class serviceManagerClass = Class.forName("javax.jnlp.ServiceManager"); - Method lookupMethod = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - return serviceManagerClass.getMethod("lookup", new Class[] {String.class}); + final Class<?> serviceManagerClass = Class.forName("javax.jnlp.ServiceManager"); + Method lookupMethod = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() { + public Method run() throws Exception { + return serviceManagerClass.getMethod("lookup", String.class); } }); Object basicService = lookupMethod.invoke(serviceManagerClass, new Object[] {"javax.jnlp.BasicService"}); - final Class basicServiceClass = Class.forName("javax.jnlp.BasicService"); - Method showDocumentMethod = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - return basicServiceClass.getMethod("showDocument", new Class[] {URL.class}); + final Class<?> basicServiceClass = Class.forName("javax.jnlp.BasicService"); + Method showDocumentMethod = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() { + public Method run() throws Exception { + return basicServiceClass.getMethod("showDocument", URL.class); } }); try { - Boolean ret = (Boolean) showDocumentMethod.invoke(basicService, new Object[] {new URL(url)}); - return ret.booleanValue(); + Boolean ret = (Boolean)showDocumentMethod.invoke(basicService, new URL(url)); + return ret; } catch (MalformedURLException e) { e.printStackTrace(System.err); return false; Modified: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -45,12 +45,12 @@ * $Id$ */ final class WindowsSysImplementation extends DefaultSysImplementation { - private final static int JNI_VERSION = 23; + private static final int JNI_VERSION = 23; static { Sys.initialize(); } - + public int getRequiredJNIVersion() { return JNI_VERSION; } @@ -64,7 +64,7 @@ } private static native long nGetTime(); - public final boolean has64Bit() { + public boolean has64Bit() { return true; } @@ -75,19 +75,17 @@ * public */ try { - Long hwnd_obj = (Long)AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws Exception { - Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation", null); + return AccessController.doPrivileged(new PrivilegedExceptionAction<Long>() { + public Long run() throws Exception { + Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation"); getImplementation_method.setAccessible(true); - Object display_impl = getImplementation_method.invoke(null, null); - Class WindowsDisplay_class = Class.forName("org.lwjgl.opengl.WindowsDisplay"); - Method getHwnd_method = WindowsDisplay_class.getDeclaredMethod("getHwnd", null); + Object display_impl = getImplementation_method.invoke(null); + Class<?> WindowsDisplay_class = Class.forName("org.lwjgl.opengl.WindowsDisplay"); + Method getHwnd_method = WindowsDisplay_class.getDeclaredMethod("getHwnd"); getHwnd_method.setAccessible(true); - Long hwnd = (Long)getHwnd_method.invoke(display_impl, null); - return hwnd; + return (Long)getHwnd_method.invoke(display_impl); } }); - return hwnd_obj.longValue(); } catch (PrivilegedActionException e) { throw new Error(e); } Modified: trunk/LWJGL/src/java/org/lwjgl/examples/Game.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/examples/Game.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/examples/Game.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2008 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 + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * 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 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -35,8 +35,9 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.openal.AL; import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.GL11; +import static org.lwjgl.opengl.GL11.*; + /** * * This is a <em>very basic</em> skeleton to init a game and run it. @@ -46,24 +47,24 @@ * $Id$ */ public class Game { - + /** Game title */ public static final String GAME_TITLE = "My Game"; - + /** Desired frame time */ private static final int FRAMERATE = 60; - + /** Exit the game */ private static boolean finished; - + /** A rotating square! */ private static float angle; - + /** * No constructor needed - this class is static */ private Game() {} - + /** * Application init * @param args Commandline args @@ -78,10 +79,10 @@ } finally { cleanup(); } - + System.exit(0); } - + /** * Initialise the game * @throws Exception if init fails @@ -94,25 +95,25 @@ // Enable vsync if we can Display.setVSyncEnabled(true); - + Display.create(); - + // Start up the sound system AL.create(); - + // TODO: Load in your textures etc here - + // Put the window into orthographic projection mode with 1:1 pixel ratio. // We haven't used GLU here to do this to avoid an unnecessary dependency. - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GL11.glOrtho(0.0, Display.getDisplayMode().getWidth(), 0.0, Display.getDisplayMode().getHeight(), -1.0, 1.0); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); - GL11.glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); - + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0.0, Display.getDisplayMode().getWidth(), 0.0, Display.getDisplayMode().getHeight(), -1.0, 1.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + } - + /** * Runs the game (the "main loop") */ @@ -120,7 +121,7 @@ while (!finished) { // Always call Window.update(), all the time Display.update(); - + if (Display.isCloseRequested()) { // Check for O/S close requests finished = true; @@ -144,7 +145,7 @@ } } } - + /** * Do any game-specific cleanup */ @@ -153,11 +154,11 @@ // Stop the sound AL.destroy(); - + // Close the window Display.destroy(); } - + /** * Do all calculations, handle input, etc. */ @@ -170,24 +171,24 @@ // TODO: all your game logic goes here. angle += 2.0f % 360; } - + /** * Render the current frame */ private static void render() { - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); // TODO: all your rendering goes here - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); - GL11.glPushMatrix(); - GL11.glTranslatef(Display.getDisplayMode().getWidth() / 2, Display.getDisplayMode().getHeight() / 2, 0.0f); - GL11.glRotatef(angle, 0, 0, 1.0f); - GL11.glBegin(GL11.GL_QUADS); - GL11.glVertex2i(-50, -50); - GL11.glVertex2i(50, -50); - GL11.glVertex2i(50, 50); - GL11.glVertex2i(-50, 50); - GL11.glEnd(); - GL11.glPopMatrix(); + glClear(GL_COLOR_BUFFER_BIT); + glPushMatrix(); + glTranslatef(Display.getDisplayMode().getWidth() / 2, Display.getDisplayMode().getHeight() / 2, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + glBegin(GL_QUADS); + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + glEnd(); + glPopMatrix(); } } Modified: trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Entity.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Entity.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Entity.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2008 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 + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * 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 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -37,13 +37,13 @@ * An entity represents any element that appears in the game. The * entity is responsible for resolving collisions and movement * based on a set of properties defined either by subclass or externally. - * + * * Note that doubles are used for positions. This may seem strange * given that pixels locations are integers. However, using double means * that an entity can move a partial pixel. It doesn't of course mean that * they will be display half way through a pixel but allows us not lose * accuracy as we move. - * + * * @author Kevin Glass */ public abstract class Entity { @@ -71,12 +71,12 @@ /** * Construct a entity based on a sprite image and a location. - * - * @param ref The reference to the image to be displayed for this entity + * + * @param sprite The reference to the image to be displayed for this entity * @param x The initial x location of this entity * @param y The initial y location of this entity */ - public Entity(Sprite sprite, int x, int y) { + protected Entity(Sprite sprite, int x, int y) { this.sprite = sprite; this.x = x; this.y = y; @@ -85,7 +85,7 @@ /** * Request that this entity move itself based on a certain ammount * of time passing. - * + * * @param delta The ammount of time that has passed in milliseconds */ public void move(long delta) { @@ -96,7 +96,7 @@ /** * Set the horizontal speed of this entity - * + * * @param dx The horizontal speed of this entity (pixels/sec) */ public void setHorizontalMovement(float dx) { @@ -105,7 +105,7 @@ /** * Set the vertical speed of this entity - * + * * @param dy The vertical speed of this entity (pixels/sec) */ public void setVerticalMovement(float dy) { @@ -114,7 +114,7 @@ /** * Get the horizontal speed of this entity - * + * * @return The horizontal speed of this entity (pixels/sec) */ public float getHorizontalMovement() { @@ -123,7 +123,7 @@ /** * Get the vertical speed of this entity - * + * * @return The vertical speed of this entity (pixels/sec) */ public float getVerticalMovement() { @@ -146,7 +146,7 @@ /** * Get the x location of this entity - * + * * @return The x location of this entity */ public int getX() { @@ -155,7 +155,7 @@ /** * Get the y location of this entity - * + * * @return The y location of this entity */ public int getY() { @@ -164,7 +164,7 @@ /** * Check if this entity collised with another. - * + * * @param other The other entity to check collision against * @return True if the entities collide with each other */ @@ -177,7 +177,7 @@ /** * Notification that this entity collided with another. - * + * * @param other The entity with which this entity collided. */ public abstract void collidedWith(Entity other); Modified: trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java 2010-09-27 12:09:52 UTC (rev 3417) +++ trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java 2010-09-28 21:11:35 UTC (rev 3418) @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2008 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 + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * 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 + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -39,32 +39,33 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.DisplayMode; -import org.lwjgl.opengl.GL11; +import static org.lwjgl.opengl.GL11.*; + /** * The main hook of our game. This class with both act as a manager - * for the display and central mediator for the game logic. - * + * for the display and central mediator for the game logic. + * * Display management will consist of a loop that cycles round all * entities in the game asking them to move and then drawing them * in the appropriate place. With the help of an inner class it * will also allow the player to control the main ship. - * + * * As a mediator it will be informed when entities within our game * detect events (e.g. alient killed, played died) and will take * appropriate game actions. - * + * * <p> * NOTE:<br> * This game is a LWJGLized implementation of the Space Invaders game by Kevin - * Glass. The original implementation is renderer agnostic and supports other + * Glass. The original implementation is renderer agnostic and supports other * OpenGL implementations as well as Java2D. This version has been made specific - * for LWJGL, and has added input control as well as sound (which the original doesn't, + * for LWJGL, and has added input control as well as sound (which the original doesn't, * at the time of writing). * You can find the original article here:<br> * <a href="http://www.cokeandcode.com/" target="_blank">http://www.cokeandcode.com</a> * </p> - * + * * @author Kevin Glass * @author Brian Matzon */ @@ -83,10 +84,10 @@ private TextureLoader textureLoader; /** The list of all the entities that exist in our game */ - private ArrayList entities = new ArrayList(); + private ArrayList<Entity> entities = new ArrayList<Entity>(); /** The list of entities that need to be removed from the game this loop */ - private ArrayList removeList = new ArrayList(); + private ArrayList<Entity> removeList = new ArrayList<Entity>(); /** The entity representing the player */ private ShipEntity ship; @@ -113,7 +114,7 @@ private float moveSpeed = 300; /** The time at which last fired a shot */ - private long lastFire = 0; + private long lastFire; /** The interval between our players shot (ms) */ private long firingInterval = 500; @@ -125,16 +126,16 @@ private boolean waitingForKeyPress = true; /** True if game logic needs to be applied this loop, normally as a result of a game event */ - private boolean logicRequiredThisLoop = false; + private boolean logicRequiredThisLoop; /** The time at which the last rendering looped started from the point of view of the game logic */ private long lastLoopTime = getTime(); /** True if the fire key has been released */ - private boolean fireHasBeenReleased = false; + private boolean fireHasBeenReleased; /** The time since the last record of fps */ - private long lastFpsTime = 0; + private long lastFpsTime; /** The recorded fps */ private int fps; @@ -167,15 +168,14 @@ /** Mouse movement on x axis */ private int mouseX; - + /** Is this an application or applet */ - private static boolean isApplication = false; + private static boolean isApplication; /** * Construct our game and set it running. * @param fullscreen - * - * @param renderingType The type of rendering to use (should be one of the contansts from ResourceFactory) + * */ public Game(boolean fullscreen) { this.fullscreen = fullscreen; @@ -184,7 +184,7 @@ /** * Get the high resolution time in milliseconds - * + * * @return The high resolution time in milliseconds */ public static long getTime() { @@ -196,8 +196,8 @@ } /** - * Sleep for a fixed number of milliseconds. - * + * Sleep for a fixed number of milliseconds. + * * @param duration The amount of time in milliseconds to sleep for */ public static void sleep(long duration) { @@ -217,25 +217,25 @@ Display.setTitle(WINDOW_TITLE); Display.setFullscreen(fullscreen); Display.create(); - + // grab the mouse, dont want that hideous cursor when we're playing! - if (isApplication) { + if (isApplication) { Mouse.setGrabbed(true); } // enable textures since we're going to use these for our sprites - GL11.glEnable(GL11.GL_TEXTURE_2D); + glEnable(GL_TEXTURE_2D); // disable the OpenGL depth test since we're rendering 2D graphics - GL11.glDisable(GL11.GL_DEPTH_TEST); + glDisable(GL_DEPTH_TEST); - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); + glMatrixMode(GL_PROJECTION); + glLoad... [truncated message content] |
From: <sp...@us...> - 2010-10-02 12:19:07
|
Revision: 3428 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3428&view=rev Author: spasi Date: 2010-10-02 12:19:00 +0000 (Sat, 02 Oct 2010) Log Message: ----------- Attempt to fix build issues. Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-generator.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-10-01 22:37:45 UTC (rev 3427) +++ trunk/LWJGL/build.xml 2010-10-02 12:19:00 UTC (rev 3428) @@ -34,23 +34,21 @@ </target> <!-- Cleans up any files created during the execution of this script --> - <target name="clean" description="Cleans the directories controlled by this ant script" depends="clean-generated"> - <delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" /> - <delete dir="${lwjgl.docs}/javadoc" quiet="true" failonerror="false" taskname="cleaning javadoc folder" /> + <target name="clean" description="Cleans all directories controlled by this ant script" depends="clean-java, clean-native"/> + + <!-- Cleans up any non-native files created during the execution of this script --> + <target name="clean-java" description="Cleans non-native files generated by this ant script" depends="clean-generated"> + <delete dir="${lwjgl.temp}" quiet="true" failonerror="false" taskname="cleaning temp folder" /> + <delete dir="${lwjgl.docs}/javadoc" quiet="true" failonerror="false" taskname="cleaning javadoc folder" /> <!-- Delete java classes only to avoid unnecessary native recompilation --> - <delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" /> - </target> + <delete dir="${lwjgl.bin}/org" quiet="true" failonerror="false" taskname="cleaning bin folder" /> + </target> <!-- Useful when we need to force native recompilation --> - <target name="clean-native" description="Cleans bin folder's native directory" depends="clean-generated-native"> + <target name="clean-native" description="Cleans native files generated by this ant script" depends="clean-generated-native"> <delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" /> - <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" /> </target> - <target name="clean-all" depends="clean, clean-generated-native" description="Cleans all directories controlled by this ant script"> - <delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" /> - </target> - <!-- Creates a distribution of LWJGL --> <target name="release" description="Creates a distribution of LWJGL using supplied native binaries"> <!-- Warn user --> @@ -67,7 +65,7 @@ <!-- prepare --> <delete dir="${lwjgl.dist}" quiet="true" failonerror="false" /> - <antcall target="clean" /> + <antcall target="clean-java" /> <antcall target="-initialize" /> <!-- compile and create debug jars --> @@ -335,6 +333,7 @@ <sequential> <java classname="org.lwjgl.test.NativeTest" logError="false" resultproperty="nativetest.res" outputproperty="nativetest.out" errorproperty="nativetest.err" fork="true"> <jvmarg value="-Djava.library.path=libs/@{platform}"/> + <jvmarg value="-Dorg.lwjgl.util.Debug=true"/> <classpath> <pathelement path="${lwjgl.bin}"/> <pathelement path="${java.class.path}"/> @@ -371,7 +370,7 @@ <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.5" target="1.5" taskname="examples" /> </target> - <target name="compile_native" depends="headers, touch-version, version-mismatch" description="Compiles the native files"> + <target name="compile_native" depends="-initialize, headers, touch-version, version-mismatch" description="Compiles the native files"> <condition property="lwjgl.platform.windows"> <os family="windows" /> </condition> Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2010-10-01 22:37:45 UTC (rev 3427) +++ trunk/LWJGL/platform_build/build-generator.xml 2010-10-02 12:19:00 UTC (rev 3428) @@ -7,8 +7,8 @@ </delete> </target> - <target name="clean-generated-native" description="Deletes the generated native source"> - <delete quiet="true" failonerror="false"> + <target name="clean-generated-native" description="Deletes the generated native source" depends="clean-generated"> + <delete quiet="false" failonerror="false"> <fileset dir="${lwjgl.src.native}/generated" includes="**"/> </delete> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-10-12 19:21:42
|
Revision: 3440 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3440&view=rev Author: matzon Date: 2010-10-12 19:21:35 +0000 (Tue, 12 Oct 2010) Log Message: ----------- updates to webstart to streamline process Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/platform_build/build-webstart.xml Added Paths: ----------- trunk/LWJGL/www/webstart/ trunk/LWJGL/www/webstart/demo.php trunk/LWJGL/www/webstart/extension.jnlp trunk/LWJGL/www/webstart/logo.png trunk/LWJGL/www/webstart/source.php Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-10-12 17:44:19 UTC (rev 3439) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-10-12 19:21:35 UTC (rev 3440) @@ -13,6 +13,7 @@ <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> <property name="lwjgl.version" value="2.6" /> + <property name="lwjgl.web" location="www" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/> Modified: trunk/LWJGL/platform_build/build-webstart.xml =================================================================== --- trunk/LWJGL/platform_build/build-webstart.xml 2010-10-12 17:44:19 UTC (rev 3439) +++ trunk/LWJGL/platform_build/build-webstart.xml 2010-10-12 19:21:35 UTC (rev 3440) @@ -17,32 +17,39 @@ </antcall> </target> - <!-- --> + <!-- Create webstart demo and extension from release files --> <target name="-webstart_demo" description="Using released files, creates the necessary files used for jnlp demos"> <!-- delete existing temp --> <delete dir="${lwjgl.temp}"/> - <!-- unzip common files --> - <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/temp" overwrite="true"/> + <!-- unzip release to temp dir --> + <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/webstart/temp" overwrite="true"/> - <!-- move files to unified structure --> - <move todir="${lwjgl.temp}/jnlp/temp"> - <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/"> - <include name="**"/> - </fileset> - </move> + <!-- DEMO SECTION --> + <move file="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/jar/lwjgl_test.jar" tofile="${lwjgl.temp}/webstart/lwjgl_test.jar"/> + <jar destfile="${lwjgl.temp}/webstart/lwjgl_test.jar" update="true"> + <manifest> + <attribute name="Sealed" value="true"/> + </manifest> + </jar> + <jar destfile="${lwjgl.temp}/webstart/media.jar" basedir="${lwjgl.res}"> + <manifest> + <attribute name="Sealed" value="true"/> + </manifest> + </jar> - <!-- move relevant files to root --> - <move todir="${lwjgl.temp}/jnlp/" flatten="true"> - <fileset dir="${lwjgl.temp}/jnlp/temp"> + <!-- EXTENSION SECTION --> + <move todir="${lwjgl.temp}/webstart/${lwjgl.version}/" flatten="true"> + <fileset dir="${lwjgl.temp}/webstart/temp"> <include name="**/jinput.jar"/> <include name="**/lwjgl*.jar"/> + <exclude name="**/lwjgl_util_applet.jar"/> + <exclude name="**/lwjgl-debug.jar"/> </fileset> </move> - <!-- update Trusted-Library --> - <jar destfile="${lwjgl.temp}/jnlp/lwjgl.jar" update="true"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" update="true"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -57,7 +64,7 @@ </manifest> </jar> - <jar destfile="${lwjgl.temp}/jnlp/jinput.jar" update="true"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" update="true"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -72,7 +79,7 @@ </manifest> </jar> - <jar destfile="${lwjgl.temp}/jnlp/lwjgl_util.jar" update="true"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" update="true"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -87,14 +94,8 @@ </manifest> </jar> - <jar destfile="${lwjgl.temp}/jnlp/lwjgl_test.jar" update="true"> - <manifest> - <attribute name="Sealed" value="true"/> - </manifest> - </jar> - <!-- create native jars --> - <jar destfile="${lwjgl.temp}/jnlp/native_windows.jar" basedir="${lwjgl.temp}/jnlp/temp/native/windows"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/windows"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -109,7 +110,7 @@ </manifest> </jar> - <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/linux"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -124,7 +125,7 @@ </manifest> </jar> - <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/macosx"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -139,7 +140,7 @@ </manifest> </jar> - <jar destfile="${lwjgl.temp}/jnlp/native_solaris.jar" basedir="${lwjgl.temp}/jnlp/temp/native/solaris"> + <jar destfile="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" basedir="${lwjgl.temp}/webstart/temp/lwjgl-${lwjgl.version}/native/solaris"> <manifest> <attribute name="Specification-Title" value="LWJGL ${lwjgl.version}"/> <attribute name="Specification-Version" value="${lwjgl.version}"/> @@ -153,21 +154,28 @@ <attribute name="Trusted-Library" value="true"/> </manifest> </jar> - - <!-- create media jar --> - <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"> - <manifest> - <attribute name="Sealed" value="true"/> - </manifest> - </jar> <!-- sign 'em --> - <signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - <signjar jar="${lwjgl.temp}/jnlp/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_solaris.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + <signjar jar="${lwjgl.temp}/webstart/${lwjgl.version}/native_windows.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> + + <!-- copy over extension jnlp file --> + <copy todir="${lwjgl.temp}/webstart/${lwjgl.version}"> + <fileset dir="${lwjgl.web}/webstart"> + <include name="extension.jnlp"/> + </fileset> + <filterset> + <filter token="LWJGL_VERSION" value="${lwjgl.version}"/> + </filterset> + </copy> + + <!-- nuke extracted dir --> + <delete dir="${lwjgl.temp}/webstart/temp"/> + </target> </project> \ No newline at end of file Added: trunk/LWJGL/www/webstart/demo.php =================================================================== --- trunk/LWJGL/www/webstart/demo.php (rev 0) +++ trunk/LWJGL/www/webstart/demo.php 2010-10-12 19:21:35 UTC (rev 3440) @@ -0,0 +1,35 @@ +<? +header("Content-type: application/x-java-jnlp-file"); +?> + +<!-- JNLP File for LWJGL Demos --> +<jnlp + spec="1.0+" + codebase="http://lwjgl.org/webstart/" + href="demo.php/<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>"> + <information> + <title>LWJGL Demo [<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>]</title> + <vendor>LWJGL</vendor> + <homepage href="http://lwjgl.org/"/> + <description>Demonstration of LWJGL</description> + <description kind="short">Technology Preview</description> + <icon kind="splash" href="logo.png" /> + <offline-allowed/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="lwjgl_test.jar" main="true"/> + <jar href="media.jar"/> + <extension name="lwjgl" href="http://lwjgl.org/webstart/2.5/extension.jnlp" /> + </resources> + <application-desc main-class="org.lwjgl.<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>"> + <?php + if(isset($HTTP_GET_VARS['arguments'])) { + $arguments = $HTTP_GET_VARS['arguments']; + foreach ($arguments as $argument) { + echo "<argument>" . $argument . "</argument>\n"; + } + } + ?> + </application-desc> +</jnlp> Added: trunk/LWJGL/www/webstart/extension.jnlp =================================================================== --- trunk/LWJGL/www/webstart/extension.jnlp (rev 0) +++ trunk/LWJGL/www/webstart/extension.jnlp 2010-10-12 19:21:35 UTC (rev 3440) @@ -0,0 +1,36 @@ +<jnlp codebase="http://lwjgl.org/webstart/@LWJGL_VERSION@" href="extension.jnlp"> + <information> + <title>LWJGL</title> + <vendor>lwjgl.org</vendor> + <homepage href="http://lwjgl.org/"/> + <description>LWJGL webstart extension</description> + <description kind="short">LWJGL webstart extension</description> + <offline-allowed/> + </information> + <update check="background" policy="always"/> + <security> + <all-permissions/> + </security> + <resources> + <jar href="lwjgl.jar"/> + <jar href="lwjgl_util.jar"/> + <jar href="jinput.jar"/> + </resources> + <resources os="Windows"> + <j2se version="1.4+"/> + <nativelib href="native_windows.jar"/> + </resources> + <resources os="Linux"> + <j2se version="1.4+"/> + <nativelib href="native_linux.jar"/> + </resources> + <resources os="Mac OS X"> + <j2se version="1.4+"/> + <nativelib href="native_macosx.jar"/> + </resources> + <resources os="SunOS" arch="x86"> + <j2se version="1.4+"/> + <nativelib href="native_solaris.jar"/> + </resources> + <component-desc /> +</jnlp> Added: trunk/LWJGL/www/webstart/logo.png =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/www/webstart/logo.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/LWJGL/www/webstart/source.php =================================================================== --- trunk/LWJGL/www/webstart/source.php (rev 0) +++ trunk/LWJGL/www/webstart/source.php 2010-10-12 19:21:35 UTC (rev 3440) @@ -0,0 +1,4 @@ +<?php + header("Location: http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/" . $_GET['path'] . "?rev=HEAD&content-type=text/vnd.viewcvs-markup"); + exit; +?> \ 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: <ma...@us...> - 2010-11-24 21:48:29
|
Revision: 3456 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3456&view=rev Author: matzon Date: 2010-11-24 21:48:23 +0000 (Wed, 24 Nov 2010) Log Message: ----------- adding support for zeroing buffers - patch'ish by MatthiasM Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java Added Paths: ----------- trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2010-11-11 21:25:20 UTC (rev 3455) +++ trunk/LWJGL/build.xml 2010-11-24 21:48:23 UTC (rev 3456) @@ -266,6 +266,7 @@ <class name="org.lwjgl.opengl.CallbackUtil" /> <class name="org.lwjgl.opencl.CL" /> <class name="org.lwjgl.opencl.CallbackUtil" /> + <class name="org.lwjgl.BufferUtils" /> </javah> </target> Modified: trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java 2010-11-11 21:25:20 UTC (rev 3455) +++ trunk/LWJGL/src/java/org/lwjgl/BufferUtils.java 2010-11-24 21:48:23 UTC (rev 3456) @@ -155,4 +155,41 @@ return buffer.position() << getElementSizeExponent(buffer); } + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(ByteBuffer b) { + zeroBuffer0(b, b.position(), b.remaining()); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(ShortBuffer b) { + zeroBuffer0(b, b.position()*2L, b.remaining()*2L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(CharBuffer b) { + zeroBuffer0(b, b.position()*2L, b.remaining()*2L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(IntBuffer b) { + zeroBuffer0(b, b.position()*4L, b.remaining()*4L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(FloatBuffer b) { + zeroBuffer0(b, b.position()*4L, b.remaining()*4L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(LongBuffer b) { + zeroBuffer0(b, b.position()*8L, b.remaining()*8L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(DoubleBuffer b) { + zeroBuffer0(b, b.position()*8L, b.remaining()*8L); + } + + /** Fill buffer with zeros from position to remaining */ + private static native void zeroBuffer0(Buffer b, long off, long size); } Added: trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c (rev 0) +++ trunk/LWJGL/src/native/common/org_lwjgl_BufferUtils.c 2010-11-24 21:48:23 UTC (rev 3456) @@ -0,0 +1,5 @@ +#include "org_lwjgl_BufferUtils.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_BufferUtils_zeroBuffer0(JNIEnv *env, jclass clazz, jobject buffer, jlong offset, jlong size) { + memset((char*)(*env)->GetDirectBufferAddress(env, buffer) + (size_t)offset, 0, (size_t)size); +} \ 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: <ma...@us...> - 2011-01-28 21:11:42
|
Revision: 3479 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3479&view=rev Author: matzon Date: 2011-01-28 21:11:35 +0000 (Fri, 28 Jan 2011) Log Message: ----------- updating version to 2.7 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2011-01-25 06:43:28 UTC (rev 3478) +++ trunk/LWJGL/platform_build/build-definitions.xml 2011-01-28 21:11:35 UTC (rev 3479) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.6" /> + <property name="lwjgl.version" value="2.7" /> <property name="lwjgl.web" location="www" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-01-25 06:43:28 UTC (rev 3478) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-01-28 21:11:35 UTC (rev 3479) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.6"; + private static final String VERSION = "2.7"; private static final String POSTFIX64BIT = "64"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-01-28 21:51:35
|
Revision: 3480 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3480&view=rev Author: matzon Date: 2011-01-28 21:51:29 +0000 (Fri, 28 Jan 2011) Log Message: ----------- adding initial maven support by Ruben Garat, updating Credits file in the process Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/doc/CREDITS Added Paths: ----------- trunk/LWJGL/maven/ trunk/LWJGL/maven/build.xml trunk/LWJGL/maven/lwjgl-parent.pom trunk/LWJGL/maven/lwjgl-platform.pom trunk/LWJGL/maven/lwjgl.pom trunk/LWJGL/maven/lwjgl_util.pom trunk/LWJGL/maven/lwjgl_util_applet.pom trunk/LWJGL/platform_build/build-maven.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2011-01-28 21:11:35 UTC (rev 3479) +++ trunk/LWJGL/build.xml 2011-01-28 21:51:29 UTC (rev 3480) @@ -6,6 +6,7 @@ <import file="platform_build/build-generator.xml"/> <import file="platform_build/build-applet.xml"/> <import file="platform_build/build-webstart.xml"/> + <import file="platform_build/build-maven.xml"/> <!-- ================================================================== --> <!-- Everything below this line is targets. --> Modified: trunk/LWJGL/doc/CREDITS =================================================================== --- trunk/LWJGL/doc/CREDITS 2011-01-28 21:11:35 UTC (rev 3479) +++ trunk/LWJGL/doc/CREDITS 2011-01-28 21:51:29 UTC (rev 3480) @@ -16,6 +16,8 @@ - Simon Felix - Ryan McNally - Ciardhubh <ciardhubh[at]ciardhubh.de> + - Jens von Pilgrim + - Ruben Garat additional credits goes to: - Joseph I. Valenzuela [OpenAL stuff] Added: trunk/LWJGL/maven/build.xml =================================================================== --- trunk/LWJGL/maven/build.xml (rev 0) +++ trunk/LWJGL/maven/build.xml 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,147 @@ +<project name="maven" xmlns:artifact="antlib:org.apache.maven.artifact.ant"> + + <property name="mavenrepo" value="mvnrepo" /> + <property name="mavenrepoId" value="tmprepo" /> + + + <target name="deploy"> + + <!-- deploying parent.pom --> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl-parent.pom" /> + <arg value="-Dfile=lwjgl-parent.pom" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <!-- deploying lwjgl.jar --> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl.pom" /> + <arg value="-Dfile=lwjgl.jar" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl.pom" /> + <arg value="-Dfile=lwjgl-sources.jar" /> + <arg value="-Dclassifier=sources" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl.pom" /> + <arg value="-Dfile=lwjgl-javadoc.jar" /> + <arg value="-Dclassifier=javadoc" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <!-- deploying natives --> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl-platform.pom" /> + <arg value="-Dfile=lwjgl-platform-natives-win.jar" /> + <arg value="-Dclassifier=natives-win" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl-platform.pom" /> + <arg value="-Dfile=lwjgl-platform-natives-linux.jar" /> + <arg value="-Dclassifier=natives-linux" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl-platform.pom" /> + <arg value="-Dfile=lwjgl-platform-natives-mac.jar" /> + <arg value="-Dclassifier=natives-mac" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <!-- deploying lwjgl_util.jar --> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl_util.pom" /> + <arg value="-Dfile=lwjgl_util.jar" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl_util.pom" /> + <arg value="-Dfile=lwjgl_util-sources.jar" /> + <arg value="-Dclassifier=sources" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl_util.pom" /> + <arg value="-Dfile=lwjgl_util-javadoc.jar" /> + <arg value="-Dclassifier=javadoc" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <!-- deploying lwjgl_util_applet.jar --> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl_util_applet.pom" /> + <arg value="-Dfile=lwjgl_util_applet.jar" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl_util.pom" /> + <arg value="-Dfile=lwjgl_util_applet-sources.jar" /> + <arg value="-Dclassifier=sources" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=lwjgl_util.pom" /> + <arg value="-Dfile=lwjgl_util_applet-javadoc.jar" /> + <arg value="-Dclassifier=javadoc" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + </target> + + +</project> \ No newline at end of file Added: trunk/LWJGL/maven/lwjgl-parent.pom =================================================================== --- trunk/LWJGL/maven/lwjgl-parent.pom (rev 0) +++ trunk/LWJGL/maven/lwjgl-parent.pom 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,27 @@ + <project> + <modelVersion>4.0.0</modelVersion> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <packaging>pom</packaging> + <name>Lighweight Java Game Library</name> + <version>@VERSION@</version> + <description>Lighweight Java Game Library</description> + <url>http://lwjgl.org/</url> + <licenses> + <license> + <name>BSD</name> + <url>http://lwjgl.org/license.php</url> + <distribution>repo</distribution> + </license> + </licenses> + <scm> + <url>http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/</url> + <connection>https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib </connection> + </scm> + <developers> + <developer> + <id>Matzon</id> + <name>Brian Matzon</name> + </developer> + </developers> +</project> Added: trunk/LWJGL/maven/lwjgl-platform.pom =================================================================== --- trunk/LWJGL/maven/lwjgl-platform.pom (rev 0) +++ trunk/LWJGL/maven/lwjgl-platform.pom 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,19 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <version>@VERSION@</version> + </parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>lwjgl-platform</artifactId> + <packaging>jar</packaging> + <name>Lighweight Java Game Library - Platform</name> + <version>@VERSION@</version> + <description>Lighweight Java Game Library - Platform</description> + <url>http://lwjgl.org/</url> + <scm> + <url>http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/</url> + <connection>https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib </connection> + </scm> +</project> Added: trunk/LWJGL/maven/lwjgl.pom =================================================================== --- trunk/LWJGL/maven/lwjgl.pom (rev 0) +++ trunk/LWJGL/maven/lwjgl.pom 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,40 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <version>@VERSION@</version> + </parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>lwjgl</artifactId> + <packaging>jar</packaging> + <name>Lighweight Java Game Library</name> + <version>@VERSION@</version> + <description>Lighweight Java Game Library</description> + <url>http://lwjgl.org/</url> + <scm> + <url>http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/</url> + <connection>https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib </connection> + </scm> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>lwjgl-platform</artifactId> + <version>${project.version}</version> + <classifier>natives-win</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>lwjgl-platform</artifactId> + <version>${project.version}</version> + <classifier>natives-linux</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>lwjgl-platform</artifactId> + <version>${project.version}</version> + <classifier>natives-mac</classifier> + </dependency> + </dependencies> +</project> Added: trunk/LWJGL/maven/lwjgl_util.pom =================================================================== --- trunk/LWJGL/maven/lwjgl_util.pom (rev 0) +++ trunk/LWJGL/maven/lwjgl_util.pom 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,26 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <version>@VERSION@</version> + </parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>lwjgl_util</artifactId> + <packaging>jar</packaging> + <name>Lighweight Java Game Library</name> + <version>@VERSION@</version> + <description>Lighweight Java Game Library</description> + <url>http://lwjgl.org/</url> + <scm> + <url>http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/</url> + <connection>https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib </connection> + </scm> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>lwjgl</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> Added: trunk/LWJGL/maven/lwjgl_util_applet.pom =================================================================== --- trunk/LWJGL/maven/lwjgl_util_applet.pom (rev 0) +++ trunk/LWJGL/maven/lwjgl_util_applet.pom 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,19 @@ + <project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <version>@VERSION@</version> + </parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>lwjgl_util_applet</artifactId> + <packaging>jar</packaging> + <name>Lighweight Java Game Library</name> + <version>@VERSION@</version> + <description>Lighweight Java Game Library</description> + <url>http://lwjgl.org/</url> + <scm> + <url>http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/</url> + <connection>https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib </connection> + </scm> +</project> Added: trunk/LWJGL/platform_build/build-maven.xml =================================================================== --- trunk/LWJGL/platform_build/build-maven.xml (rev 0) +++ trunk/LWJGL/platform_build/build-maven.xml 2011-01-28 21:51:29 UTC (rev 3480) @@ -0,0 +1,155 @@ +<project name="maven"> + <property name="lwjgl.src.java" location="${lwjgl.src}/java" /> + <property name="lwjgl.src.generated" location="${lwjgl.src}/generated" /> + <property name="lwjgl.maven" location="maven" /> + <property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" /> + + <property name="lwjgl.src.java" location="${lwjgl.src}/java" /> + + <property name="lwjgl-maven-version" value="2.7.0"/> + + <fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}"> + <patternset refid="lwjgl.package.pattern" /> + </fileset> + + <fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}"> + <include name="**/*" /> + </fileset> + <fileset id="lwjgl_util_applet-sources.fileset" dir="${lwjgl.src.java}"> + <patternset refid="lwjgl_util_applet.package.pattern" /> + </fileset> + + <fileset id="lwjgl_util-sources.fileset" dir="${lwjgl.src.java}"> + <patternset refid="lwjgl_util.package.pattern" /> + </fileset> + + + <target name="maven-full"> + <antcall target="clean-java" /> + <antcall target="-initialize" /> + + <antcall target="generate-all" /> + <antcall target="compile" /> + <antcall target="-createjars" /> + <antcall target="maven"/> + </target> + + <target name="maven"> + <delete dir="${lwjgl.dstMaven}" quiet="true" failonerror="false" taskname="cleaning maven dist" /> + <mkdir dir="${lwjgl.dstMaven}" taskname="initialiazing temp maven folder" /> + <antcall target="-copylwjgljars" /> + <antcall target="-createmavensourcejars" /> + <antcall target="-createmavenjavadocs" /> + <antcall target="-createmavennativejars" /> + <antcall target="-copymavenpoms"/> + <antcall target="-copymavendeploybuild"/> + <antcall target="-copymaventdist"/> + </target> + + + <target name="-copylwjgljars"> + <copy todir="${lwjgl.dstMaven}"> + <fileset dir="${lwjgl.temp}/jar/"> + <patternset> + <include name="lwjgl.jar" /> + <include name="lwjgl_util.jar" /> + <include name="lwjgl_util_applet.jar" /> + </patternset> + </fileset> + </copy> + </target> + + <!-- Packages the java files --> + <target name="-createmavensourcejars"> + + <jar destfile="${lwjgl.dstMaven}/lwjgl-sources.jar" taskname="lwjgl-sources.jar"> + <fileset refid="lwjgl-sources.manual.fileset" /> + <fileset refid="lwjgl-sources.generated.fileset" /> + </jar> + + <jar destfile="${lwjgl.dstMaven}/lwjgl_util_applet-sources.jar" taskname="lwjgl_util_applet-sources.jar"> + <fileset refid="lwjgl_util_applet-sources.fileset" /> + </jar> + + <jar destfile="${lwjgl.dstMaven}/lwjgl_util-sources.jar" taskname="lwjgl_util-sources.jar"> + <fileset refid="lwjgl_util-sources.fileset" /> + </jar> + </target> + + <target name="-createmavenjavadocs"> + <!-- Creates the Javadoc --> + + <javadoc destdir="${lwjgl.dstMaven}/lwjgl-javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL API" useexternalfile="true"> + <fileset refid="lwjgl-sources.manual.fileset"/> + <fileset refid="lwjgl-sources.generated.fileset"/> + <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle> + <bottom><![CDATA[<i>Copyright © 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom> + </javadoc> + <jar destfile="${lwjgl.dstMaven}/lwjgl-javadoc.jar" taskname="lwjgl-javadoc.jar"> + <fileset dir="${lwjgl.dstMaven}/lwjgl-javadoc" /> + </jar> + + <javadoc destdir="${lwjgl.dstMaven}/lwjgl_util-javadoc" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/lwjgl.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL UTIL API" useexternalfile="true"> + <fileset refid="lwjgl_util-sources.fileset"/> + <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle> + <bottom><![CDATA[<i>Copyright © 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom> + </javadoc> + <jar destfile="${lwjgl.dstMaven}/lwjgl_util-javadoc.jar" taskname="lwjgl_util-javadoc.jar"> + <fileset dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" /> + </jar> + + <javadoc destdir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/lwjgl.jar" author="true" version="true" use="true" source="1.5" windowtitle="LWJGL UTIL API" useexternalfile="true"> + <fileset refid="lwjgl_util_applet-sources.fileset"/> + <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle> + <bottom><![CDATA[<i>Copyright © 2002-2010 lwjgl.org. All Rights Reserved.</i>]]></bottom> + </javadoc> + <jar destfile="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc.jar" taskname="lwjgl_util_applet-javadoc.jar"> + <fileset dir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" /> + </jar> + + <delete dir="${lwjgl.dstMaven}/lwjgl-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl" /> + <delete dir="${lwjgl.dstMaven}/lwjgl_util-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util" /> + <delete dir="${lwjgl.dstMaven}/lwjgl_util_applet-javadoc" quiet="true" failonerror="false" taskname="cleaning maven javadoc temps lwjgl_util_applet" /> + </target> + + <target name="-createmavennativejars"> + <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-win.jar" taskname="lwjgl-platform-natives-win.jar"> + <fileset dir="${lwjgl.lib}/windows"> + <patternset refid="lwjgl-windows-lwjgl.fileset"/> + </fileset> + </jar> + <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-linux.jar" taskname="lwjgl-platform-natives-linux.jar"> + <fileset dir="${lwjgl.lib}/linux"> + <patternset refid="lwjgl-linux-lwjgl.fileset"/> + </fileset> + </jar> + <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-mac.jar" taskname="lwjgl-platform-natives-mac.jar"> + <fileset dir="${lwjgl.lib}/macosx"> + <patternset refid="lwjgl-macosx-lwjgl.fileset"/> + </fileset> + </jar> + </target> + + <target name="-copymavenpoms"> + <copy todir="${lwjgl.dstMaven}"> + <fileset dir="${lwjgl.maven}"> + <include name="*.pom" /> + </fileset> + <filterset> + <filter token="VERSION" value="${lwjgl-maven-version}"/> + </filterset> + </copy> + </target> + + <target name="-copymavendeploybuild"> + <copy todir="${lwjgl.dstMaven}"> + <fileset dir="${lwjgl.maven}"> + <include name="build.xml" /> + </fileset> + </copy> + </target> + + <target name="-copymaventdist"> + <zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" /> + </target> +</project> \ 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: <ma...@us...> - 2011-01-28 21:55:22
|
Revision: 3481 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3481&view=rev Author: matzon Date: 2011-01-28 21:55:16 +0000 (Fri, 28 Jan 2011) Log Message: ----------- applying patch to update lwjgl_util_applet.jar with resources directly Modified Paths: -------------- trunk/LWJGL/build.xml trunk/LWJGL/platform_build/build-applet.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2011-01-28 21:51:29 UTC (rev 3480) +++ trunk/LWJGL/build.xml 2011-01-28 21:55:16 UTC (rev 3481) @@ -142,6 +142,7 @@ <!-- Create lwjgl_util_applet.jar --> <jar destfile="${lwjgl.temp}/jar/lwjgl_util_applet.jar" taskname="lwjgl_util_applet.jar"> + <fileset dir="${lwjgl.res}" includes="applet*"/> <fileset refid="lwjgl_util_applet.fileset" /> <manifest> <attribute name="Sealed" value="true"/> Modified: trunk/LWJGL/platform_build/build-applet.xml =================================================================== --- trunk/LWJGL/platform_build/build-applet.xml 2011-01-28 21:51:29 UTC (rev 3480) +++ trunk/LWJGL/platform_build/build-applet.xml 2011-01-28 21:55:16 UTC (rev 3481) @@ -63,10 +63,6 @@ </fileset> </jar> <signjar jar="applet/basic/solaris_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/> - - <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true"> - <fileset dir="${lwjgl.res}" includes="applet*"/> - </jar> <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet/basic" overwrite="true"/> <copy file="${lwjgl.lib}/lwjgl-debug.jar" todir="applet/basic" overwrite="true"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-02-09 21:09:40
|
Revision: 3488 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3488&view=rev Author: matzon Date: 2011-02-09 21:09:33 +0000 (Wed, 09 Feb 2011) Log Message: ----------- Upgrading OpenAL-Soft to latest version .. cbe288aa93de6 and moving to 2.7.1 Modified Paths: -------------- trunk/LWJGL/libs/linux/libopenal.so trunk/LWJGL/libs/linux/libopenal64.so trunk/LWJGL/libs/solaris/libopenal.so trunk/LWJGL/libs/solaris/libopenal64.so trunk/LWJGL/libs/windows/OpenAL32.dll trunk/LWJGL/libs/windows/OpenAL64.dll trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/libs/linux/libopenal.so =================================================================== (Binary files differ) Modified: trunk/LWJGL/libs/linux/libopenal64.so =================================================================== (Binary files differ) Modified: trunk/LWJGL/libs/solaris/libopenal.so =================================================================== (Binary files differ) Modified: trunk/LWJGL/libs/solaris/libopenal64.so =================================================================== (Binary files differ) Modified: trunk/LWJGL/libs/windows/OpenAL32.dll =================================================================== (Binary files differ) Modified: trunk/LWJGL/libs/windows/OpenAL64.dll =================================================================== (Binary files differ) Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2011-02-06 21:07:30 UTC (rev 3487) +++ trunk/LWJGL/platform_build/build-definitions.xml 2011-02-09 21:09:33 UTC (rev 3488) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.7" /> + <property name="lwjgl.version" value="2.7.1" /> <property name="lwjgl.web" location="www" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-02-06 21:07:30 UTC (rev 3487) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-02-09 21:09:33 UTC (rev 3488) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.7"; + private static final String VERSION = "2.7.1"; private static final String POSTFIX64BIT = "64"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-02-14 20:42:22
|
Revision: 3490 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3490&view=rev Author: matzon Date: 2011-02-14 20:42:15 +0000 (Mon, 14 Feb 2011) Log Message: ----------- arielsans maven jinput patch Modified Paths: -------------- trunk/LWJGL/maven/build.xml trunk/LWJGL/maven/lwjgl-parent.pom trunk/LWJGL/maven/lwjgl.pom trunk/LWJGL/platform_build/build-maven.xml Added Paths: ----------- trunk/LWJGL/maven/jinput-platform.pom trunk/LWJGL/maven/jinput.pom Modified: trunk/LWJGL/maven/build.xml =================================================================== --- trunk/LWJGL/maven/build.xml 2011-02-09 21:12:01 UTC (rev 3489) +++ trunk/LWJGL/maven/build.xml 2011-02-14 20:42:15 UTC (rev 3490) @@ -1,15 +1,26 @@ <project name="maven" xmlns:artifact="antlib:org.apache.maven.artifact.ant"> - <property name="mavenrepo" value="mvnrepo" /> - <property name="mavenrepoId" value="tmprepo" /> + <property name="mavenrepo" value="file://m2repo" /> + <property name="mavenrepoId" value="tmprepoid" /> + <target name="install"> + <antcall target="execute"> + <param name="mvncommand" value="org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file"/> + </antcall> + </target> <target name="deploy"> + <antcall target="execute"> + <param name="mvncommand" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file"/> + </antcall> + </target> + + <target name="execute"> - <!-- deploying parent.pom --> + <!-- parent.pom --> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl-parent.pom" /> @@ -17,10 +28,10 @@ <arg value="-Plwjglgpg" /> </artifact:mvn> - <!-- deploying lwjgl.jar --> + <!-- lwjgl.jar --> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl.pom" /> @@ -29,7 +40,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl.pom" /> @@ -39,7 +50,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl.pom" /> @@ -48,10 +59,10 @@ <arg value="-Plwjglgpg" /> </artifact:mvn> - <!-- deploying natives --> + <!-- lwjgl natives --> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl-platform.pom" /> @@ -61,7 +72,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl-platform.pom" /> @@ -71,7 +82,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl-platform.pom" /> @@ -80,10 +91,10 @@ <arg value="-Plwjglgpg" /> </artifact:mvn> - <!-- deploying lwjgl_util.jar --> + <!-- lwjgl_util.jar --> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl_util.pom" /> @@ -92,7 +103,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl_util.pom" /> @@ -102,7 +113,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl_util.pom" /> @@ -111,10 +122,10 @@ <arg value="-Plwjglgpg" /> </artifact:mvn> - <!-- deploying lwjgl_util_applet.jar --> + <!-- lwjgl_util_applet.jar --> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl_util_applet.pom" /> @@ -123,7 +134,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl_util.pom" /> @@ -133,7 +144,7 @@ </artifact:mvn> <artifact:mvn> - <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" /> + <arg value="${mvncommand}" /> <arg value="-Durl=${mavenrepo}" /> <arg value="-DrepositoryId=${mavenrepoId}" /> <arg value="-DpomFile=lwjgl_util.pom" /> @@ -141,7 +152,50 @@ <arg value="-Dclassifier=javadoc" /> <arg value="-Plwjglgpg" /> </artifact:mvn> + + <!-- jinput.jar --> + + <artifact:mvn> + <arg value="${mvncommand}" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=jinput.pom" /> + <arg value="-Dfile=jinput.jar" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <!-- jinput natives --> + + <artifact:mvn> + <arg value="${mvncommand}" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=jinput-platform.pom" /> + <arg value="-Dfile=jinput-platform-natives-win.jar" /> + <arg value="-Dclassifier=natives-win" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="${mvncommand}" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=jinput-platform.pom" /> + <arg value="-Dfile=jinput-platform-natives-linux.jar" /> + <arg value="-Dclassifier=natives-linux" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + + <artifact:mvn> + <arg value="${mvncommand}" /> + <arg value="-Durl=${mavenrepo}" /> + <arg value="-DrepositoryId=${mavenrepoId}" /> + <arg value="-DpomFile=jinput-platform.pom" /> + <arg value="-Dfile=jinput-platform-natives-mac.jar" /> + <arg value="-Dclassifier=natives-mac" /> + <arg value="-Plwjglgpg" /> + </artifact:mvn> + </target> - - + </project> \ No newline at end of file Added: trunk/LWJGL/maven/jinput-platform.pom =================================================================== --- trunk/LWJGL/maven/jinput-platform.pom (rev 0) +++ trunk/LWJGL/maven/jinput-platform.pom 2011-02-14 20:42:15 UTC (rev 3490) @@ -0,0 +1,32 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <version>@VERSION@</version> + </parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>jinput-platform</artifactId> + <packaging>jar</packaging> + <name>JInput - Java Game Controller API</name> + <version>@VERSION@</version> + <description>JInput - Java Game Controller API</description> + <url>http://java.net/projects/jinput</url> + <licenses> + <license> + <name>BSD</name> + <url>http://www.opensource.org/licenses/bsd-license.php</url> + <distribution>repo</distribution> + </license> + </licenses> + <developers> + <developer> + <id>Members</id> + <url>http://java.net/projects/jinput/members</url> + </developer> + </developers> + <scm> + <url>http://java.net/projects/jinput/sources/svn/show</url> + <connection>https://svn.java.net/svn/jinput~svn </connection> + </scm> +</project> Added: trunk/LWJGL/maven/jinput.pom =================================================================== --- trunk/LWJGL/maven/jinput.pom (rev 0) +++ trunk/LWJGL/maven/jinput.pom 2011-02-14 20:42:15 UTC (rev 3490) @@ -0,0 +1,52 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>parent</artifactId> + <version>@VERSION@</version> + </parent> + <groupId>org.lwjgl.lwjgl</groupId> + <artifactId>jinput</artifactId> + <packaging>jar</packaging> + <name>JInput - Java Game Controller API</name> + <version>@VERSION@</version> + <description>JInput - Java Game Controller API</description> + <url>http://java.net/projects/jinput</url> + <licenses> + <license> + <name>BSD</name> + <url>http://www.opensource.org/licenses/bsd-license.php</url> + <distribution>repo</distribution> + </license> + </licenses> + <developers> + <developer> + <id>Members</id> + <url>http://java.net/projects/jinput/members</url> + </developer> + </developers> + <scm> + <url>http://java.net/projects/jinput/sources/svn/show</url> + <connection>https://svn.java.net/svn/jinput~svn </connection> + </scm> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jinput-platform</artifactId> + <version>${project.version}</version> + <classifier>natives-win</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jinput-platform</artifactId> + <version>${project.version}</version> + <classifier>natives-linux</classifier> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jinput-platform</artifactId> + <version>${project.version}</version> + <classifier>natives-mac</classifier> + </dependency> + </dependencies> +</project> Modified: trunk/LWJGL/maven/lwjgl-parent.pom =================================================================== --- trunk/LWJGL/maven/lwjgl-parent.pom 2011-02-09 21:12:01 UTC (rev 3489) +++ trunk/LWJGL/maven/lwjgl-parent.pom 2011-02-14 20:42:15 UTC (rev 3490) @@ -20,8 +20,8 @@ </scm> <developers> <developer> - <id>Matzon</id> - <name>Brian Matzon</name> + <id>Developers</id> + <url>http://lwjgl.org/credits.php</url> </developer> </developers> </project> Modified: trunk/LWJGL/maven/lwjgl.pom =================================================================== --- trunk/LWJGL/maven/lwjgl.pom 2011-02-09 21:12:01 UTC (rev 3489) +++ trunk/LWJGL/maven/lwjgl.pom 2011-02-14 20:42:15 UTC (rev 3490) @@ -36,5 +36,10 @@ <version>${project.version}</version> <classifier>natives-mac</classifier> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jinput</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> </project> Modified: trunk/LWJGL/platform_build/build-maven.xml =================================================================== --- trunk/LWJGL/platform_build/build-maven.xml 2011-02-09 21:12:01 UTC (rev 3489) +++ trunk/LWJGL/platform_build/build-maven.xml 2011-02-14 20:42:15 UTC (rev 3490) @@ -43,6 +43,7 @@ <antcall target="-createmavennativejars" /> <antcall target="-copymavenpoms"/> <antcall target="-copymavendeploybuild"/> + <antcall target="-addjinput"/> <antcall target="-copymaventdist"/> </target> @@ -148,6 +149,43 @@ </fileset> </copy> </target> + + <!-- JINPUT --> + <target name="-addjinput"> + <antcall target="-copyjinputjar" /> + <antcall target="-createmavennativejinputjars" /> + </target> + + <target name="-copyjinputjar"> + <copy todir="${lwjgl.dstMaven}"> + <fileset dir="${lwjgl.lib}"> + <patternset> + <include name="jinput.jar" /> + </patternset> + </fileset> + </copy> + </target> + + + <target name="-createmavennativejinputjars"> + <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-win.jar" taskname="jinput-platform-natives-win.jar"> + <fileset dir="${lwjgl.lib}/windows"> + <patternset refid="lwjgl-windows-jinput.fileset"/> + </fileset> + </jar> + <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-linux.jar" taskname="jinput-platform-natives-linux.jar"> + <fileset dir="${lwjgl.lib}/linux"> + <patternset refid="lwjgl-linux-jinput.fileset"/> + </fileset> + </jar> + <jar destfile="${lwjgl.dstMaven}/jinput-platform-natives-mac.jar" taskname="jinput-platform-natives-mac.jar"> + <fileset dir="${lwjgl.lib}/macosx"> + <patternset refid="lwjgl-macosx-jinput.fileset"/> + </fileset> + </jar> + </target> + + <!-- END JINPUT --> <target name="-copymaventdist"> <zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-02-20 20:26:23
|
Revision: 3493 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3493&view=rev Author: kappa1 Date: 2011-02-20 20:26:17 +0000 (Sun, 20 Feb 2011) Log Message: ----------- AppletLoader: replace appletlogo.png with appletlogo.gif (43% smaller) Modified Paths: -------------- trunk/LWJGL/applet/advance/appletloader.html trunk/LWJGL/applet/basic/basicapplet.html Added Paths: ----------- trunk/LWJGL/res/appletlogo.gif Removed Paths: ------------- trunk/LWJGL/res/appletlogo.png Modified: trunk/LWJGL/applet/advance/appletloader.html =================================================================== --- trunk/LWJGL/applet/advance/appletloader.html 2011-02-17 19:43:33 UTC (rev 3492) +++ trunk/LWJGL/applet/advance/appletloader.html 2011-02-20 20:26:17 UTC (rev 3493) @@ -16,7 +16,7 @@ <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> <!-- logo to paint while loading, will be centered --> - <param name="al_logo" value="appletlogo.png"> + <param name="al_logo" value="appletlogo.gif"> <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> <param name="al_progressbar" value="appletprogress.gif"> Modified: trunk/LWJGL/applet/basic/basicapplet.html =================================================================== --- trunk/LWJGL/applet/basic/basicapplet.html 2011-02-17 19:43:33 UTC (rev 3492) +++ trunk/LWJGL/applet/basic/basicapplet.html 2011-02-20 20:26:17 UTC (rev 3493) @@ -16,7 +16,7 @@ <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> <!-- logo to paint while loading, will be centered --> - <param name="al_logo" value="appletlogo.png"> + <param name="al_logo" value="appletlogo.gif"> <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> <param name="al_progressbar" value="appletprogress.gif"> Added: trunk/LWJGL/res/appletlogo.gif =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/res/appletlogo.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/LWJGL/res/appletlogo.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-03-06 01:34:12
|
Revision: 3494 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3494&view=rev Author: kappa1 Date: 2011-03-06 01:34:06 +0000 (Sun, 06 Mar 2011) Log Message: ----------- AppletLoader: "al_logo" and "al_progress" are now optional parameters, they default to "appletlogo.gif" and "appletprogress.gif". Credit to arielsan for patch. Modified Paths: -------------- trunk/LWJGL/applet/advance/appletloader.html trunk/LWJGL/applet/basic/basicapplet.html trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java Modified: trunk/LWJGL/applet/advance/appletloader.html =================================================================== --- trunk/LWJGL/applet/advance/appletloader.html 2011-02-20 20:26:17 UTC (rev 3493) +++ trunk/LWJGL/applet/advance/appletloader.html 2011-03-06 01:34:06 UTC (rev 3494) @@ -15,12 +15,6 @@ <!-- Main Applet Class --> <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> - <!-- logo to paint while loading, will be centered --> - <param name="al_logo" value="appletlogo.gif"> - - <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> - <param name="al_progressbar" value="appletprogress.gif"> - <!-- List of Jars to add to classpath --> <param name="al_jars" value="lwjgl_applet.jar.pack.lzma, lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma"> @@ -50,6 +44,12 @@ <!-- foreground color to paint with, defaults to black --> <!-- <param name="boxfgcolor" value="#ffffff"> --> + <!-- logo to paint while loading, will be centered, defaults to "appletlogo.gif" --> + <!-- <param name="al_logo" value="appletlogo.gif"> --> + + <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done, defaults to "appletprogress.gif" --> + <!-- <param name="al_progressbar" value="appletprogress.gif"> --> + <!-- whether to run in debug mode --> <!-- <param name="al_debug" value="true"> --> Modified: trunk/LWJGL/applet/basic/basicapplet.html =================================================================== --- trunk/LWJGL/applet/basic/basicapplet.html 2011-02-20 20:26:17 UTC (rev 3493) +++ trunk/LWJGL/applet/basic/basicapplet.html 2011-03-06 01:34:06 UTC (rev 3494) @@ -15,12 +15,6 @@ <!-- Main Applet Class --> <param name="al_main" value="org.lwjgl.test.applet.GearsApplet"> - <!-- logo to paint while loading, will be centered --> - <param name="al_logo" value="appletlogo.gif"> - - <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done --> - <param name="al_progressbar" value="appletprogress.gif"> - <!-- List of Jars to add to classpath --> <param name="al_jars" value="lwjgl_applet.jar, lwjgl.jar, jinput.jar, lwjgl_util.jar"> @@ -50,6 +44,12 @@ <!-- foreground color to paint with, defaults to black --> <!-- <param name="boxfgcolor" value="#ffffff"> --> + <!-- logo to paint while loading, will be centered, defaults to "appletlogo.gif" --> + <!-- <param name="al_logo" value="appletlogo.gif"> --> + + <!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done, defaults to "appletprogress.gif" --> + <!-- <param name="al_progressbar" value="appletprogress.gif"> --> + <!-- whether to run in debug mode --> <!-- <param name="al_debug" value="true"> --> Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-02-20 20:26:17 UTC (rev 3493) +++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-03-06 01:34:06 UTC (rev 3494) @@ -99,9 +99,6 @@ * <li>al_main - [String] Full package and class the applet to instantiate and display when loaded.</li> * <li>al_jars - [String] Comma seperated list of jars to download.</li> * <p> - * <li>al_logo - [String Path of of the logo resource to paint while loading.</li> - * <li>al_progressbar - [String] Path of the progressbar resource to paint on top of the logo, width clipped by percentage.</li> - * <p> * <li>al_windows - [String] Jar containing native files for windows.</li> * <li>al_linux - [String] Jar containing native files for linux.</li> * <li>al_mac - [String] Jar containing native files for mac.</li> @@ -126,6 +123,9 @@ * <li>boxbgcolor - [String] any String AWT color ("red", "blue", etc), RGB (0-255) or hex formated color (#RRGGBB) to use as background. <i>Default: #ffffff</i>.</li> * <li>boxfgcolor - [String] any String AWT color ("red", "blue", etc), RGB (0-255) or hex formated color (#RRGGBB) to use as foreground. <i>Default: #000000</i>.</li> * <p> + * <li>al_logo - [String Path of of the logo resource to paint while loading.<i>Default: "appletlogo.gif"</i>.</li> + * <li>al_progressbar - [String] Path of the progressbar resource to paint on top of the logo, width clipped by percentage.<i>Default: "appletprogress.gif"</i>.</li> + * <p> * <li>lwjgl_arguments - </li> [String] used to pass the hidden LWJGL parameters to LWJGL e.g. ("-Dorg.lwjgl.input.Mouse.allowNegativeMouseCoords=true -Dorg.lwjgl.util.Debug=true").</li> * </ul> * </p> @@ -270,7 +270,7 @@ setState(STATE_INIT); // sanity check - String[] requiredArgs = {"al_main", "al_logo", "al_progressbar", "al_jars"}; + String[] requiredArgs = {"al_main", "al_jars"}; for ( String requiredArg : requiredArgs ) { if ( getParameter(requiredArg) == null ) { fatalErrorOccured("missing required applet parameter: " + requiredArg, null); @@ -292,13 +292,9 @@ setBackground(bgColor); fgColor = getColor("boxfgcolor", Color.black); - // load logos, if value is "" then skip - if (getParameter("al_logo").length() > 0) { - logo = getImage(getParameter("al_logo")); - } - if (getParameter("al_progressbar").length() > 0) { - progressbar = getImage(getParameter("al_progressbar")); - } + // load logos, if value is "" then an image is not loaded + logo = getImage(getStringParameter("al_logo", "appletlogo.gif")); + progressbar = getImage(getStringParameter("al_progressbar", "appletprogress.gif")); // check for lzma support try { @@ -1563,6 +1559,9 @@ */ protected Image getImage(String s) { + // if s is "" then don't load an image + if (s.length() == 0) return null; + Image image = null; try { @@ -1688,9 +1687,23 @@ return defaultColor; } } + + /** + * Retrieves the String value for the parameter + * @param name Name of parameter + * @param defaultValue default value to return if no such parameter + * @return value of parameter or defaultValue + */ + protected String getStringParameter(String name, String defaultValue) { + String parameter = getParameter(name); + if (parameter != null) { + return parameter; + } + return defaultValue; + } /** - * Retrieves the boolean value for the applet + * Retrieves the boolean value for the parameter * @param name Name of parameter * @param defaultValue default value to return if no such parameter * @return value of parameter or defaultValue This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2011-04-08 03:41:25
|
Revision: 3514 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3514&view=rev Author: spasi Date: 2011-04-08 03:41:19 +0000 (Fri, 08 Apr 2011) Log Message: ----------- Fixed JDK5 compilation issue and added SpriteShootout textures. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java Added Paths: ----------- trunk/LWJGL/res/ball.png trunk/LWJGL/res/ball_sm.png Added: trunk/LWJGL/res/ball.png =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/res/ball.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/LWJGL/res/ball_sm.png =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/res/ball_sm.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java 2011-04-07 21:36:19 UTC (rev 3513) +++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java 2011-04-08 03:41:19 UTC (rev 3514) @@ -479,7 +479,7 @@ final FloatBuffer depths = BufferUtils.createFloatBuffer(count * 2); final float depthStep = 1.9f / count; - float depth = Math.nextAfter(1.0f, Float.MIN_VALUE); + float depth = Float.parseFloat("0x1.fffffep-1"); // Front-to-back for ( int i = 0; i < count; i++ ) { depths.put(depth); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |