Bug 389 - Mixed types in generated code.
Summary: Mixed types in generated code.
Status: VERIFIED WORKSFORME
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: P3 enhancement
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2010-03-17 01:22 CET by Sven Gothel
Modified: 2010-03-27 21:29 CET (History)
0 users

See Also:
Type: FEATURE
SCM Refs:
a41f4d504d2f8cf58114d570d23f757ab2659cfc
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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()