Package icyllis.arc3d.granite
Class DrawAtlas.AtlasToken
java.lang.Object
icyllis.arc3d.granite.DrawAtlas.AtlasToken
- Enclosing class:
DrawAtlas
AtlasToken is used to sequence uploads relative to each other and to batches of draws.
AtlasToken is represented as an unsigned long sequence number. Wrapping is allowed, 0 is reserved for the invalid token. Do not use operator to compare, use method instead.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compare
(long lhs, long rhs) Compares two tokens with wrapping.static boolean
inInterval
(long token, long start, long end) Returns true if the token is in the [start, end] inclusive interval.static long
next
(long token) Returns next valid sequence number.
-
Field Details
-
INVALID_TOKEN
public static final long INVALID_TOKEN- See Also:
-
-
Method Details
-
next
public static long next(long token) Returns next valid sequence number. -
compare
public static int compare(long lhs, long rhs) Compares two tokens with wrapping. -
inInterval
public static boolean inInterval(long token, long start, long end) Returns true if the token is in the [start, end] inclusive interval.
-