aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/common/PointerBuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* GlueGen Struct [1]: Enhance com.jogamp.common.nio.* to serve a most ↵Sven Gothel2023-06-161-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | native-free-code Struct-Code generation Recfactored all NIO buffer utils to Buffers, i.e. buffer <-> address, memcpy, strnlen, etc Buffers: - Added copyNativeToDirectByteBuffer(..), allowing to copy a native memory slice into a direct buffer. - Added typeNameToBufferClass(String) and sizeOfBufferElem(Class<? extends Buffer>) - Completed slize2<Type>(..) buffer-mapping methods - Exposure of safe getDirectByteBuffer(..) w/ null-check (package private) Added NativeBuffer.storeDirectAddress(..), allowing to write the array address into a native buffer (struct, etc), allowing to referencing the ElementBuffer (linear array of elements) and PointerBuffer (array of pointer). Hint: This can be read via PointerBuffer.wrap(..).get(0) Added ElementBuffer (a NativeBuffer) mapping an array of elements, completing native abstraction next to PointerBuffer (array of pointer). ElementBuffer can dereference an existing element-array by native address via ElementBuffer.derefPointer(..). Views of its content can be directly accessed via ElementBuffer.slice(..). +++ These utilities and buffer abstractions will allow to reuse code and simplify the GlueGen struct get/set implementations and help to reduce native code injection.
* remove warningsSven Gothel2011-06-101-1/+3
|
* Fix C / JNI compilation: Add/use javah, recompile if out of date,Sven Gothel2011-06-071-0/+2
|
* introduced com.jogamp.common.{nio,os} packages and moved some classes.Michael Bien2010-03-311-1/+1
|
* http://www.jogamp.org/bugzilla/show_bug.cgi?id=392Sven Gothel2010-03-301-0/+10
32bit/64bit values and arrays are misrepresented - PointerBuffer: Adding methods PointeRBuffer referenceBuffer(int index, Buffer data) PointeRBuffer referenceBuffer(Buffer data) Buffer getReferencedBuffer(int index) Buffer getReferencedBuffer() Adding a reference of a given direct Buffer to this pointer buffer, and retrieving a previously referenced direct Buffer. This allows a more convenient handling of PointerBuffer with the user API's ..