Bug 389

Summary: Mixed types in generated code.
Product: [JogAmp] Gluegen Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED WORKSFORME    
Severity: enhancement    
Priority: P3    
Version: 2   
Hardware: All   
OS: all   
Type: FEATURE SCM Refs:
a41f4d504d2f8cf58114d570d23f757ab2659cfc
Workaround: ---

Description Sven Gothel 2010-03-24 08:04:20 CET


---- Reported by sgothel@jausoft.com 2010-03-17 01:22:24 -0400 ----

Allow mixed argument types (arrays, NIO buffers) 
in gluegen generated code.



--- Bug imported by sgothel@jausoft.com 2010-03-24 08:04 EDT  ---

This bug was previously known as _bug_ 1 at http://jogamp.org/bugzilla/show_bug.cgi?id=1
Comment 1 Sven Gothel 2010-03-27 21:29:18 CET
    Mixed types in generated code are functioning now,
    even though not all permutations are generated - still.
    
    However, this patch merges the indirect object passing,
    wheather it is a primitive array or an indirect NIO buffer,
    incl. PointerBuffer.
    
    This allows the usage of only one JNI functions for all combinations.
    
    Only in case of NIODirectOnly, the simplified direct only '0'
    variation is created - otherwise the parametrized '1' variant.
    
    The junit tests proves the implementation and
    almost completes the gluegen junit tests coverage
    for JavaEmitter and ProcAddressEmitter.
    
    Impact/Result:
        - Working mixed array types
        - JOGL GL2 native library shrunk around 30%
        - Simplified gluegen code
        - Almost complete gluegen junit tests
    
    TODO: Complete permutations of array/NIO arguments,
          if desired.
    
    ++++
    
    Misc changes:
    
    - NativeLibrary implements DynamicLookupHelper:
        lookupFunction() -> dynamicLookupFunction()