Package org.lwjgl.openvr
Class Texture
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openvr.Texture
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class Texture extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Member documentation
eType
– one of:eColorSpace
– one of:VR.EColorSpace_ColorSpace_Auto
VR.EColorSpace_ColorSpace_Gamma
VR.EColorSpace_ColorSpace_Linear
Layout
struct Texture_t { void * handle; ETextureType eType; EColorSpace eColorSpace; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Texture.Buffer
An array ofTexture
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ECOLORSPACE
ETYPE
HANDLEThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description Texture(java.nio.ByteBuffer container)
Creates aTexture
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Texture
calloc()
Returns a newTexture
instance allocated withmemCalloc
.static Texture.Buffer
calloc(int capacity)
Returns a newTexture.Buffer
instance allocated withmemCalloc
.static Texture
callocStack()
Returns a newTexture
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static Texture.Buffer
callocStack(int capacity)
Returns a newTexture.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static Texture.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTexture.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static Texture
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newTexture
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static Texture
create()
Returns a newTexture
instance allocated withBufferUtils
.static Texture.Buffer
create(int capacity)
Returns a newTexture.Buffer
instance allocated withBufferUtils
.static Texture
create(long address)
Returns a newTexture
instance for the specified memory address.static Texture.Buffer
create(long address, int capacity)
Create aTexture.Buffer
instance at the specified memory.static Texture
createSafe(long address)
static Texture.Buffer
createSafe(long address, int capacity)
int
eColorSpace()
Returns the value of theeColorSpace
field.Texture
eColorSpace(int value)
Sets the specified value to theeColorSpace
field.int
eType()
Returns the value of theeType
field.Texture
eType(int value)
Sets the specified value to theeType
field.long
handle()
Returns the value of thehandle
field.Texture
handle(long value)
Sets the specified value to thehandle
field.static Texture
malloc()
Returns a newTexture
instance allocated withmemAlloc
.static Texture.Buffer
malloc(int capacity)
Returns a newTexture.Buffer
instance allocated withmemAlloc
.static Texture
mallocStack()
Returns a newTexture
instance allocated on the thread-localMemoryStack
.static Texture.Buffer
mallocStack(int capacity)
Returns a newTexture.Buffer
instance allocated on the thread-localMemoryStack
.static Texture.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTexture.Buffer
instance allocated on the specifiedMemoryStack
.static Texture
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newTexture
instance allocated on the specifiedMemoryStack
.static int
neColorSpace(long struct)
Unsafe version ofeColorSpace()
.static void
neColorSpace(long struct, int value)
Unsafe version ofeColorSpace
.static int
neType(long struct)
Unsafe version ofeType()
.static void
neType(long struct, int value)
Unsafe version ofeType
.static long
nhandle(long struct)
Unsafe version ofhandle()
.static void
nhandle(long struct, long value)
Unsafe version ofhandle
.Texture
set(long handle, int eType, int eColorSpace)
Initializes this struct with the specified values.Texture
set(Texture src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
Texture
public Texture(java.nio.ByteBuffer container)
Creates aTexture
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
handle
public long handle()
Returns the value of thehandle
field.
-
eType
public int eType()
Returns the value of theeType
field.
-
eColorSpace
public int eColorSpace()
Returns the value of theeColorSpace
field.
-
handle
public Texture handle(long value)
Sets the specified value to thehandle
field.
-
eType
public Texture eType(int value)
Sets the specified value to theeType
field.
-
eColorSpace
public Texture eColorSpace(int value)
Sets the specified value to theeColorSpace
field.
-
set
public Texture set(long handle, int eType, int eColorSpace)
Initializes this struct with the specified values.
-
set
public Texture set(Texture src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static Texture malloc()
Returns a newTexture
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static Texture calloc()
Returns a newTexture
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static Texture create()
Returns a newTexture
instance allocated withBufferUtils
.
-
create
public static Texture create(long address)
Returns a newTexture
instance for the specified memory address.
-
createSafe
@Nullable public static Texture createSafe(long address)
-
malloc
public static Texture.Buffer malloc(int capacity)
Returns a newTexture.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static Texture.Buffer calloc(int capacity)
Returns a newTexture.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static Texture.Buffer create(int capacity)
Returns a newTexture.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static Texture.Buffer create(long address, int capacity)
Create aTexture.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static Texture.Buffer createSafe(long address, int capacity)
-
mallocStack
public static Texture mallocStack()
Returns a newTexture
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static Texture callocStack()
Returns a newTexture
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static Texture mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newTexture
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static Texture callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newTexture
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static Texture.Buffer mallocStack(int capacity)
Returns a newTexture.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static Texture.Buffer callocStack(int capacity)
Returns a newTexture.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static Texture.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTexture.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static Texture.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTexture.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nhandle
public static long nhandle(long struct)
Unsafe version ofhandle()
.
-
neType
public static int neType(long struct)
Unsafe version ofeType()
.
-
neColorSpace
public static int neColorSpace(long struct)
Unsafe version ofeColorSpace()
.
-
nhandle
public static void nhandle(long struct, long value)
Unsafe version ofhandle
.
-
neType
public static void neType(long struct, int value)
Unsafe version ofeType
.
-
neColorSpace
public static void neColorSpace(long struct, int value)
Unsafe version ofeColorSpace
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-