GlBorrowedTextureBackend
final class GlBorrowedTextureBackend
Implements: IBorrowedTextureBackend
Package: dev.joid.base.opengl.snapshot · Module: base-opengl · Source: GlBorrowedTextureBackend.java
Backends: LWJGL 2 LWJGL 3
The borrowed texture backend of any OpenGL context, over a snapshot backend and a binding.
Description
Section titled “Description”It ships in the snapshot jar of base-opengl and in the dev and demo jars of the backends; the published joid-base-opengl jar does not hold it.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| GlBorrowedTextureBackend(ISnapshotBackend backend, Supplier | Creates the backend over that snapshot backend; the supplier gives the binding once the snapshot backend has created its context. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | create(int width, int height) | Creates the surface of the snapshot backend, then takes the binding. |
void | destroy() | Deletes the textures it created, then destroys the surface. |
void | present() | Presents the surface of the snapshot backend. |
SnapshotImage | capture(int width, int height) | Captures the surface of the snapshot backend. |
String | getRenderer() | Returns the renderer of the snapshot backend. |
ITexture | borrow(Supplier | Returns a GlBorrowedTexture over the texture names that the supplier gives. |
boolean | isBorrowableTexture(Object texture) | If true, the object is an Integer that names a texture of the context. |
Object | createBorrowableTexture(int width, int height, int color, boolean mipmapped) | Creates an RGBA8 texture of that size in that color, with nearest filtering and repeat wrapping, and every mip level when the boolean is true; the texture bound before stays bound. |
Map<String,String> | readBorrowableParameters(Object texture) | Returns the filters and the wraps of the texture as MIN_FILTER, MAG_FILTER, WRAP_S and WRAP_T; the texture bound before stays bound. |
Creation details
Section titled “Creation details”GlBorrowedTextureBackend
Section titled “GlBorrowedTextureBackend”GlBorrowedTextureBackend(ISnapshotBackend backend, Supplier<IGlBinding> bindings)
Creates the backend over that snapshot backend; the supplier gives the binding once the snapshot backend has created its context.
Method details
Section titled “Method details”create
Section titled “create”void create(int width, int height)
Creates the surface of the snapshot backend, then takes the binding.
destroy
Section titled “destroy”void destroy()
Deletes the textures it created, then destroys the surface.
present
Section titled “present”void present()
Presents the surface of the snapshot backend.
capture
Section titled “capture”SnapshotImage capture(int width, int height)
Captures the surface of the snapshot backend.
getRenderer
Section titled “getRenderer”String getRenderer()
Returns the renderer of the snapshot backend.
borrow
Section titled “borrow”ITexture borrow(Supplier<Object> texture)
Returns a GlBorrowedTexture over the texture names that the supplier gives.
isBorrowableTexture
Section titled “isBorrowableTexture”boolean isBorrowableTexture(Object texture)
If true, the object is an Integer that names a texture of the context.
createBorrowableTexture
Section titled “createBorrowableTexture”Object createBorrowableTexture(int width, int height, int color, boolean mipmapped)
Creates an RGBA8 texture of that size in that color, with nearest filtering and repeat wrapping, and every mip level when the boolean is true; the texture bound before stays bound.
readBorrowableParameters
Section titled “readBorrowableParameters”Map<String,String> readBorrowableParameters(Object texture)
Returns the filters and the wraps of the texture as MIN_FILTER, MAG_FILTER, WRAP_S and WRAP_T; the texture bound before stays bound.
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
