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.
Description
Section titled “Description”Create it after the OpenGL backend is registered; JOID reads its size from OpenGL and never deletes it.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
GlBorrowedTexture | of(int texture) factory | Wraps the texture of that OpenGL name. |
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. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Inherited from BorrowedTexture (10)
getWidth · getHeight · isMipmapped · getHandle · isValid · getSupplier · mipmap · allocate · upload · delete
Inherited from ITexture (1)
Creation details
Section titled “Creation details”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.
Method details
Section titled “Method details”int getId()
Returns the current OpenGL name of the texture.
sample
Section titled “sample”void sample(TextureSampling sampling)
Sets the filter and the wrap of the bound texture to that sampling.
getBridge
Section titled “getBridge”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
