Top Description Inners Fields Constructors Methods
org.lwjgl.opengles

pack-priv final Class APIUtil

extends Object
Class Inheritance
Imports
org.lwjgl.BufferUtils, .LWJGLUtil, .MemoryUtil, .PointerBuffer, java.nio.ByteBuffer, .FloatBuffer, .IntBuffer, .LongBuffer

Utility class for OpenGL ES API calls.
Author
spasi

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final ThreadLocal<char[]>
private static final ThreadLocal<PointerBuffer>
private static final int
private static final ThreadLocal<APIUtil.Buffers>
private static final ThreadLocal<ByteBuffer>
private static final int
private static final int
private static final ThreadLocal<IntBuffer>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static ByteBuffer
encode(final ByteBuffer
The target buffer
buffer
,
final CharSequence
The source string
string
)

Simple ASCII encoding.

private static char[]
getArray(final int size)

pack-priv static long

Returns:

the String as a ByteBuffer
getBuffer
(final CharSequence string)

Returns a buffer containing the specified string as bytes.

pack-priv static long

Returns:

the String as a ByteBuffer
getBuffer
(final CharSequence string, final int offset)

Returns a buffer containing the specified string as bytes, starting at the specified offset.

pack-priv static long

Returns:

the Strings as a ByteBuffer
getBuffer
(final CharSequence[] strings)

Returns a buffer containing the specified strings as bytes.

pack-priv static ByteBuffer
getBufferByte(final int size)

pack-priv static long
private static ByteBuffer
getBufferByteOffset(final int size)

pack-priv static FloatBuffer
pack-priv static IntBuffer
pack-priv static LongBuffer
pack-priv static long

Returns:

the String as a ByteBuffer
getBufferNT
(final CharSequence string)

Returns a buffer containing the specified string as bytes, including null-termination.

pack-priv static long

Returns:

the Strings as a ByteBuffer
getBufferNT
(final CharSequence[] strings)

Returns a buffer containing the specified strings as bytes, including null-termination.

pack-priv static PointerBuffer
getBufferPointer(final int size)

pack-priv static long
getInt(final int value)

pack-priv static IntBuffer
pack-priv static IntBuffer
getLengths(final int size)

pack-priv static long

Returns:

the String lengths in an IntBuffer
getLengths
(final CharSequence[] strings)

Returns a buffer containing the lengths of the specified strings.

pack-priv static String

Returns:

the buffer as a String.
getString
(final ByteBuffer buffer)

Reads a byte string from the specified buffer.

pack-priv static int
getTotalLength(final CharSequence[] strings)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayTLback to summary
private static final ThreadLocal<char[]> arrayTL
bufferPointerTLback to summary
private static final ThreadLocal<PointerBuffer> bufferPointerTL
BUFFERS_SIZEback to summary
private static final int BUFFERS_SIZE
buffersTLback to summary
private static final ThreadLocal<APIUtil.Buffers> buffersTL
bufferTLback to summary
private static final ThreadLocal<ByteBuffer> bufferTL
INITIAL_BUFFER_SIZEback to summary
private static final int INITIAL_BUFFER_SIZE
INITIAL_LENGTHS_SIZEback to summary
private static final int INITIAL_LENGTHS_SIZE
lengthsTLback to summary
private static final ThreadLocal<IntBuffer> lengthsTL

Constructor Detail

APIUtilback to summary
private APIUtil()

Method Detail

encodeback to summary
private static ByteBuffer encode(final ByteBuffer buffer, final CharSequence string)

Simple ASCII encoding.

Parameters
buffer:ByteBuffer

The target buffer

string:CharSequence

The source string

getArrayback to summary
private static char[] getArray(final int size)
getBufferback to summary
pack-priv static long getBuffer(final CharSequence string)

Returns a buffer containing the specified string as bytes.

Returns:long

the String as a ByteBuffer

getBufferback to summary
pack-priv static long getBuffer(final CharSequence string, final int offset)

Returns a buffer containing the specified string as bytes, starting at the specified offset.

Returns:long

the String as a ByteBuffer

getBufferback to summary
pack-priv static long getBuffer(final CharSequence[] strings)

Returns a buffer containing the specified strings as bytes.

Returns:long

the Strings as a ByteBuffer

getBufferByteback to summary
pack-priv static ByteBuffer getBufferByte(final int size)
getBufferByte0back to summary
pack-priv static long getBufferByte0()
getBufferByteOffsetback to summary
private static ByteBuffer getBufferByteOffset(final int size)
getBufferFloatback to summary
pack-priv static FloatBuffer getBufferFloat()
getBufferIntback to summary
pack-priv static IntBuffer getBufferInt()
getBufferLongback to summary
pack-priv static LongBuffer getBufferLong()
getBufferNTback to summary
pack-priv static long getBufferNT(final CharSequence string)

Returns a buffer containing the specified string as bytes, including null-termination.

Returns:long

the String as a ByteBuffer

getBufferNTback to summary
pack-priv static long getBufferNT(final CharSequence[] strings)

Returns a buffer containing the specified strings as bytes, including null-termination.

Returns:long

the Strings as a ByteBuffer

getBufferPointerback to summary
pack-priv static PointerBuffer getBufferPointer(final int size)
getIntback to summary
pack-priv static long getInt(final int value)
getLengthsback to summary
pack-priv static IntBuffer getLengths()
getLengthsback to summary
pack-priv static IntBuffer getLengths(final int size)
getLengthsback to summary
pack-priv static long getLengths(final CharSequence[] strings)

Returns a buffer containing the lengths of the specified strings.

Returns:long

the String lengths in an IntBuffer

getStringback to summary
pack-priv static String getString(final ByteBuffer buffer)

Reads a byte string from the specified buffer.

Returns:String

the buffer as a String.

getTotalLengthback to summary
pack-priv static int getTotalLength(final CharSequence[] strings)
org.lwjgl.opengles back to summary

private Class APIUtil.Buffers

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final FloatBuffer
pack-priv final IntBuffer
pack-priv final LongBuffer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

floatsback to summary
pack-priv final FloatBuffer floats
intsback to summary
pack-priv final IntBuffer ints
longsback to summary
pack-priv final LongBuffer longs

Constructor Detail

Buffersback to summary
pack-priv Buffers()