Skip to content

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.

ReturnsSignatureSummary
thismipmap(boolean mipmap) fluent abstractIf true, the texture keeps a full chain of mipmap levels, built from the first level at each upload.
thisallocate(int width, int height) fluent abstractAllocates the storage at that size in pixels.
thisupload(int[] pixels) fluent abstractUploads the pixels, one ARGB int per texel, row after row, then builds the mipmaps.
voiddelete() abstractReleases the texture.
intgetWidth() abstractReturns the width, in pixels; 0 before allocate.
intgetHeight() abstractReturns the height, in pixels; 0 before allocate.
booleanisMipmapped() abstractIf true, the texture has mipmap levels.
booleanisAllocated() defaultIf true, the texture has storage to sample.

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.


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

Report a problem with this page