From: <sp...@us...> - 2010-11-05 17:14:02
|
Revision: 3454 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3454&view=rev Author: spasi Date: 2010-11-05 17:13:56 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Fixed @Reuse + @BufferObject generation. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-10-28 21:39:55 UTC (rev 3453) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-11-05 17:13:56 UTC (rev 3454) @@ -75,19 +75,19 @@ printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.CACHEDRESULT, generate_error_checks, context_specific); } - // Skip the native function if we're re-using. Reuse reuse_annotation = method.getAnnotation(Reuse.class); - if ( reuse_annotation != null ) - return; - Alternate alt_annotation = method.getAnnotation(Alternate.class); if ( alt_annotation == null || (alt_annotation.nativeAlt() && !alt_annotation.skipNative()) ) { if ( alt_annotation != null && method.getSimpleName().equals(alt_annotation.value()) ) throw new RuntimeException("An alternate function with native code should have a different name than the main function."); - printJavaNativeStub(writer, method, Mode.NORMAL, generate_error_checks, context_specific); + + if ( reuse_annotation == null ) + printJavaNativeStub(writer, method, Mode.NORMAL, generate_error_checks, context_specific); + if (Utils.hasMethodBufferObjectParameter(method)) { printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.BUFFEROBJECT, generate_error_checks, context_specific); - printJavaNativeStub(writer, method, Mode.BUFFEROBJECT, generate_error_checks, context_specific); + if ( reuse_annotation == null ) + printJavaNativeStub(writer, method, Mode.BUFFEROBJECT, generate_error_checks, context_specific); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |