https://forum.jogamp.org/newDirectFloatBuffer-description-tp3515981p3516197.html
> Hi
>
> I'm looking for a detailed description of the method
> newDirectFloatBuffer().
>
> Looking at the JavaDoc I get a 1 liner.
>
> I found the following at
>
https://sites.google.com/site/justinscsstuff/rendering-methods/vertex-arrays>
> "
> We cannot use normal Java arrays in the glVertexPointer,
> glColorPointer, glNormalPointer, and glTexCoordPointer functions.
> Instead, we must use direct buffers; these are buffers that use memory
> outside of the Java heap. Using a direct buffer means garbage
> collection will never relocate the data stored in these arrays around
> inside the heap; the buffer uses a fixed area in the operating
> system's memory.
> In JOGL, functions that have untyped parameters (GLvoid*) with
> deferred use (not used immediately) must use direct buffers. The
> pointer functions above are examples of this: the data inside the
> buffers isn't used until glDrawArrays is called. If a non-direct
> buffer was used, garbage collection may occur between glVertexPointer
> and glDrawArrays, potentially causing the memory address of the buffer
> to change, and who knows what glDrawArrays would actually render!
> Direct buffers are also nice for Java programs that have higher memory
> requirements - which is often the case when working with graphics -
> because you're not limited by the size of the Java heap.
> "
>
> but curious how accurate this is without a formal description at jogamp.
>
> Thanks
>
> Graham
dependent) ordering. Justin's description about the reasoning behind
direct nio usage is spot on. Direct nio is currently the only way on the
JVM to reach high data transfer throughput between java and native code.