ITexture
interface ITexture
Known subtypes: BorrowedTexture, Texture, IGlTexture, IVulkanTexture
Package: dev.joid.lib.bridge.render.texture · Module: core · Source: ITexture.java
A texture of the render bridge, owned by JOID or borrowed from the host.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
this | mipmap(boolean mipmap) fluent abstract | If true, the texture keeps a full chain of mipmap levels, built from the first level at each upload. |
this | allocate(int width, int height) fluent abstract | Allocates the storage at that size in pixels. |
this | upload(int[] pixels) fluent abstract | Uploads the pixels, one ARGB int per texel, row after row, then builds the mipmaps. |
void | delete() abstract | Releases the texture. |
int | getWidth() abstract | Returns the width, in pixels; 0 before allocate. |
int | getHeight() abstract | Returns the height, in pixels; 0 before allocate. |
boolean | isMipmapped() abstract | If true, the texture has mipmap levels. |
boolean | isAllocated() default | If true, the texture has storage to sample. |
Method details
Section titled “Method details”mipmap
Section titled “mipmap”this mipmap(boolean mipmap) fluent abstract
If true, the texture keeps a full chain of mipmap levels, built from the first level at each upload.
allocate
Section titled “allocate”this allocate(int width, int height) fluent abstract
Allocates the storage at that size in pixels.
upload
Section titled “upload”this upload(int[] pixels) fluent abstract
Uploads the pixels, one ARGB int per texel, row after row, then builds the mipmaps.
delete
Section titled “delete”void delete() abstract
Releases the texture.
getWidth
Section titled “getWidth”int getWidth() abstract
Returns the width, in pixels; 0 before allocate.
getHeight
Section titled “getHeight”int getHeight() abstract
Returns the height, in pixels; 0 before allocate.
isMipmapped
Section titled “isMipmapped”boolean isMipmapped() abstract
If true, the texture has mipmap levels.
isAllocated
Section titled “isAllocated”boolean isAllocated() default
If true, the texture has storage to sample.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
