Class Texture
java.lang.Object
com.raylib.Texture
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal MemorySegment
The native FFI MemorySegment that holds the data this object wraps. -
Constructor Summary
ConstructorsConstructorDescriptionTexture()
Construct with auto memory allocator and fields initialized to zero.Texture
(int id, int width, int height, int mipmaps, int format) Construct with auto memory allocator and fields initialized as specifiedTexture
(MemorySegment memorySegment) Construct by wrapping around an already allocated MemorySegment, perhaps from another objectTexture
(SegmentAllocator arena) Construct with your owm memory allocator and fields not initializedTexture
(SegmentAllocator arena, int id, int width, int height, int mipmaps, int format) Construct with your own memory allocator and fields initialized as specified -
Method Summary
Modifier and TypeMethodDescriptionstatic Texture
allocateArray
(long elementCount) Allocate an array of Texturestatic Texture
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of Textureboolean
Equality is tested on basis of both wrapper objects must refer to same native memory location to be considered equalint
format()
Data format (PixelFormat type)format
(int value) Data format (PixelFormat type)getArrayElement
(int index) int
Data format (PixelFormat type)int
Texture base heightint
getId()
OpenGL texture idint
Mipmap levels, 1 by defaultint
getWidth()
Texture base widthint
hashCode()
int
height()
Texture base heightheight
(int value) Texture base heightint
id()
OpenGL texture idid
(int value) OpenGL texture idint
mipmaps()
Mipmap levels, 1 by defaultmipmaps
(int value) Mipmap levels, 1 by defaultvoid
setFormat
(int value) Data format (PixelFormat type)void
setHeight
(int value) Texture base heightvoid
setId
(int value) OpenGL texture idvoid
setMipmaps
(int value) Mipmap levels, 1 by defaultvoid
setWidth
(int value) Texture base widthint
width()
Texture base widthwidth
(int value) Texture base width
-
Field Details
-
memorySegment
The native FFI MemorySegment that holds the data this object wraps.
-
-
Constructor Details
-
Texture
public Texture()Construct with auto memory allocator and fields initialized to zero. -
Texture
Construct with your owm memory allocator and fields not initialized -
Texture
Construct by wrapping around an already allocated MemorySegment, perhaps from another object -
Texture
public Texture(int id, int width, int height, int mipmaps, int format) Construct with auto memory allocator and fields initialized as specified- Parameters:
id
- OpenGL texture idwidth
- Texture base widthheight
- Texture base heightmipmaps
- Mipmap levels, 1 by defaultformat
- Data format (PixelFormat type)
-
Texture
Construct with your own memory allocator and fields initialized as specified- Parameters:
id
- OpenGL texture idwidth
- Texture base widthheight
- Texture base heightmipmaps
- Mipmap levels, 1 by defaultformat
- Data format (PixelFormat type)
-
-
Method Details
-
equals
-
hashCode
-
getArrayElement
-
allocateArray
Allocate an array of Texture -
allocateArray
Allocate an array of Texture -
getId
public int getId()OpenGL texture id -
setId
public void setId(int value) OpenGL texture id -
id
public int id()OpenGL texture id -
id
OpenGL texture id -
getWidth
public int getWidth()Texture base width -
setWidth
public void setWidth(int value) Texture base width -
width
public int width()Texture base width -
width
Texture base width -
getHeight
public int getHeight()Texture base height -
setHeight
public void setHeight(int value) Texture base height -
height
public int height()Texture base height -
height
Texture base height -
getMipmaps
public int getMipmaps()Mipmap levels, 1 by default -
setMipmaps
public void setMipmaps(int value) Mipmap levels, 1 by default -
mipmaps
public int mipmaps()Mipmap levels, 1 by default -
mipmaps
Mipmap levels, 1 by default -
getFormat
public int getFormat()Data format (PixelFormat type) -
setFormat
public void setFormat(int value) Data format (PixelFormat type) -
format
public int format()Data format (PixelFormat type) -
format
Data format (PixelFormat type)
-