-
Notifications
You must be signed in to change notification settings - Fork 3
Basic
squid233 edited this page Dec 30, 2024
·
11 revisions
OverrunGL is designed based on Java FFM API.
MemoryLayout
s describes a carrier and the byte size of a type.
The types in the table this below can be directly converted from/to C.
Value Layout | Java Type | C/C++ Type |
---|---|---|
JAVA_BYTE | byte | char |
JAVA_SHORT | short | short |
JAVA_INT | int | int |
JAVA_LONG | long | long long |
JAVA_CHAR | char | short |
JAVA_BOOLEAN | boolean | char/bool |
JAVA_FLOAT | float | float |
JAVA_DOUBLE | double | double |
ADDRESS | MemorySegment | void* |
Any pointer types can be directly converted to MemorySegment
even if it is a pointer of struct or other pointers of pointer.
✔️ int*
✔️ my_struct*
✔️ void**
✔️ other_struct***
Return values whose memory layout is ValueLayout.ADDRESS
with target layout will be reinterpreted to correspoding size.
Copyright (c) 2022-2024 Overrun Organization. In case of any problems with this wiki, please search or create an issue.