LWJGL can run on both 32bit and 64bit architectures. Since LWJGL applications deal with native memory directly, this interface provides necessary information about the underlying architecture of the running JVM process.
When interacting with native functions, pointer values are mapped to Java long. LWJGL automatically converts long values to the correct pointer
addresses when used in native code. Native functions sometimes require arrays of pointer values; the PointerBuffer class may be used for that
purpose. It has an API similar to a java. but handles pointer casts automatically.
| Modifier and Type | Class and Description |
|---|---|
| public abstract static class | Pointer.
Default |
| Modifier and Type | Field and Description |
|---|---|
| public static final boolean | BITS32
Will be true on a 32bit JVM. |
| public static final boolean | BITS64
Will be true on a 64bit JVM. |
| public static final int | CLONG_SHIFT
The value of |
| public static final int | CLONG_SIZE
The value of |
| public static final int | POINTER_SHIFT
The pointer size power-of-two. |
| public static final int | POINTER_SIZE
The pointer size in bytes. |
| Modifier and Type | Method and Description |
|---|---|
| public long |
| BITS32 | back to summary |
|---|---|
| public static final boolean BITS32 Will be true on a 32bit JVM. | |
| BITS64 | back to summary |
|---|---|
| public static final boolean BITS64 Will be true on a 64bit JVM. | |
| CLONG_SHIFT | back to summary |
|---|---|
| public static final int CLONG_SHIFT The value of | |
| CLONG_SIZE | back to summary |
|---|---|
| public static final int CLONG_SIZE The value of | |
| POINTER_SHIFT | back to summary |
|---|---|
| public static final int POINTER_SHIFT The pointer size power-of-two. Will be 2 on a 32bit JVM and 3 on a 64bit one. | |
| POINTER_SIZE | back to summary |
|---|---|
| public static final int POINTER_SIZE The pointer size in bytes. Will be 4 on a 32bit JVM and 8 on a 64bit one. | |
| address | back to summary |
|---|---|
| public long address() Returns the raw pointer address as a
| |
Pointer implementation.
| Modifier and Type | Field and Description |
|---|---|
| protected static final long | |
| protected long | |
| protected static final long | |
| protected static final long | |
| protected static final long | |
| protected static final long | |
| protected static final long | |
| protected static final Unsafe |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public long | address()
Implements org. long value.
|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public int | |
| public String |
| ADDRESS | back to summary |
|---|---|
| protected static final long ADDRESS | |
| address | back to summary |
|---|---|
| protected long address | |
| BUFFER_CAPACITY | back to summary |
|---|---|
| protected static final long BUFFER_CAPACITY | |
| BUFFER_CONTAINER | back to summary |
|---|---|
| protected static final long BUFFER_CONTAINER | |
| BUFFER_LIMIT | back to summary |
|---|---|
| protected static final long BUFFER_LIMIT | |
| BUFFER_MARK | back to summary |
|---|---|
| protected static final long BUFFER_MARK | |
| BUFFER_POSITION | back to summary |
|---|---|
| protected static final long BUFFER_POSITION | |
| UNSAFE | back to summary |
|---|---|
| protected static final Unsafe UNSAFE | |
| Default | back to summary |
|---|---|
| protected Default(long address) | |
| address | back to summary |
|---|---|
| public long address() Implements org. Doc from org. Returns the raw pointer address as a
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |