Skip to content

GlBorrowedTexture

final class GlBorrowedTexture
Extends: BorrowedTexture<Integer>
Implements: IGlTexture
Package: dev.joid.base.opengl.render.texture · Module: base-opengl · Source: GlBorrowedTexture.java
Backends: LWJGL 2 LWJGL 3

A texture of the host, by OpenGL name, that JOID samples without owning it.

Create it after the OpenGL backend is registered; JOID reads its size from OpenGL and never deletes it.

ReturnsSignatureSummary
GlBorrowedTextureof(int texture) factoryWraps the texture of that OpenGL name.
GlBorrowedTextureof(IntSupplier texture) factoryWraps the texture whose name the supplier returns, read again at each use, for a host that recreates its texture.

ReturnsSignatureSummary
intgetId()Returns the current OpenGL name of the texture.
voidsample(TextureSampling sampling)Sets the filter and the wrap of the bound texture to that sampling.
GlRenderBridgegetBridge()Returns the OpenGL render bridge.
Inherited from BorrowedTexture (10)

getWidth · getHeight · isMipmapped · getHandle · isValid · getSupplier · mipmap · allocate · upload · delete

Inherited from ITexture (1)

isAllocated

GlBorrowedTexture of(int texture) factory

Wraps the texture of that OpenGL name. Throws an IllegalStateException when no OpenGL render bridge is registered.

GlBorrowedTexture of(IntSupplier texture) factory

Wraps the texture whose name the supplier returns, read again at each use, for a host that recreates its texture. Throws an IllegalStateException when no OpenGL render bridge is registered.

int getId()

Returns the current OpenGL name of the texture.

void sample(TextureSampling sampling)

Sets the filter and the wrap of the bound texture to that sampling.

GlRenderBridge getBridge()

Returns the OpenGL render bridge.


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