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.NativeResourceLayout
struct Texture_t { void * handle; ETextureTypeeType(); EColorSpaceeColorSpace(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTexture.BufferAn array ofTexturestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intECOLORSPACE
ETYPE
HANDLEThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description Texture(java.nio.ByteBuffer container)Creates aTextureinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Texturecalloc()Returns a newTextureinstance allocated withmemCalloc.static Texture.Buffercalloc(int capacity)Returns a newTexture.Bufferinstance allocated withmemCalloc.static Texture.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newTexture.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static Texturecalloc(org.lwjgl.system.MemoryStack stack)Returns a newTextureinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static TexturecallocStack()Deprecated.static Texture.BuffercallocStack(int capacity)Deprecated.static Texture.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static TexturecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static Texturecreate()Returns a newTextureinstance allocated withBufferUtils.static Texture.Buffercreate(int capacity)Returns a newTexture.Bufferinstance allocated withBufferUtils.static Texturecreate(long address)Returns a newTextureinstance for the specified memory address.static Texture.Buffercreate(long address, int capacity)Create aTexture.Bufferinstance at the specified memory.static TexturecreateSafe(long address)static Texture.BuffercreateSafe(long address, int capacity)inteColorSpace()TextureeColorSpace(int value)Sets the specified value to theeColorSpace()field.inteType()TextureeType(int value)Sets the specified value to theeType()field.longhandle()Texturehandle(long value)Sets the specified value to thehandlefield.static Texturemalloc()Returns a newTextureinstance allocated withmemAlloc.static Texture.Buffermalloc(int capacity)Returns a newTexture.Bufferinstance allocated withmemAlloc.static Texture.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newTexture.Bufferinstance allocated on the specifiedMemoryStack.static Texturemalloc(org.lwjgl.system.MemoryStack stack)Returns a newTextureinstance allocated on the specifiedMemoryStack.static TexturemallocStack()Deprecated.static Texture.BuffermallocStack(int capacity)Deprecated.static Texture.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static TexturemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intneColorSpace(long struct)Unsafe version ofeColorSpace().static voidneColorSpace(long struct, int value)Unsafe version ofeColorSpace.static intneType(long struct)Unsafe version ofeType().static voidneType(long struct, int value)Unsafe version ofeType.static longnhandle(long struct)Unsafe version ofhandle().static voidnhandle(long struct, long value)Unsafe version ofhandle.Textureset(long handle, int eType, int eColorSpace)Initializes this struct with the specified values.Textureset(Texture src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
Texture
public Texture(java.nio.ByteBuffer container)
Creates aTextureinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
handle
public long handle()
- Returns:
- the value of the
handlefield.
-
eType
public int eType()
-
eColorSpace
public int eColorSpace()
-
handle
public Texture handle(long value)
Sets the specified value to thehandlefield.
-
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 newTextureinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static Texture calloc()
Returns a newTextureinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static Texture create()
Returns a newTextureinstance allocated withBufferUtils.
-
create
public static Texture create(long address)
Returns a newTextureinstance for the specified memory address.
-
createSafe
@Nullable public static Texture createSafe(long address)
-
malloc
public static Texture.Buffer malloc(int capacity)
Returns a newTexture.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static Texture.Buffer calloc(int capacity)
Returns a newTexture.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static Texture.Buffer create(int capacity)
Returns a newTexture.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static Texture.Buffer create(long address, int capacity)
Create aTexture.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static Texture.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static Texture mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static Texture callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static Texture mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static Texture callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static Texture.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static Texture.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static Texture.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static Texture.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static Texture malloc(org.lwjgl.system.MemoryStack stack)
Returns a newTextureinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static Texture calloc(org.lwjgl.system.MemoryStack stack)
Returns a newTextureinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static Texture.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTexture.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static Texture.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newTexture.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-