Package com.raylib
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 equalgetArrayElement
(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()
setFormat
(int value) Data format (PixelFormat type)setHeight
(int value) Texture base heightsetId
(int value) OpenGL texture idsetMipmaps
(int value) Mipmap levels, 1 by defaultsetWidth
(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
OpenGL texture id -
getWidth
public int getWidth()Texture base width -
setWidth
Texture base width -
getHeight
public int getHeight()Texture base height -
setHeight
Texture base height -
getMipmaps
public int getMipmaps()Mipmap levels, 1 by default -
setMipmaps
Mipmap levels, 1 by default -
getFormat
public int getFormat()Data format (PixelFormat type) -
setFormat
Data format (PixelFormat type)
-