Skip to content

GlStateJournal

final class GlStateJournal
Package: dev.joid.base.opengl.render.state · Module: base-opengl · Source: GlStateJournal.java
Backends: LWJGL 2 LWJGL 3

The record of the OpenGL states that JOID touched since the guard was entered, with their values before the first change.

The first change of a state during a recording reads and keeps its value; restore() writes the kept values back, in the order of GlStateKey. JournalGlBinding calls its methods for you.

ReturnsSignatureSummary
GlStateJournal(IGlBinding binding, GlCapabilities capabilities)Creates an empty journal that reads and writes the state through the binding of the backend.

ReturnsSignatureSummary
voidstart()Starts a recording and forgets what it knew of the active unit, the bound textures and the bound vertex array.
voidrestore()Stops the recording and writes back every kept value.
voidexcludeTexture(int texture)Never records the parameters of that texture, a texture of JOID.
voidincludeTexture(int texture)Records the parameters of that texture again, once JOID deleted it.
voidexcludeVertexArray(int array)Never records the attributes of that vertex array, an array of JOID.
voidtrackTexture(int texture)Remembers the texture bound to the active unit.
voidtrackVertexArray(int array)Remembers the bound vertex array.
voidtrackActiveTexture(int unit)Remembers the active texture unit.
voidtouch(GlStateKey key)Keeps the value of that state before its first change of the recording.
voidtouch(GlStateKey key, int container)Keeps the value of that state of one container, such as one capability or one buffer target, before its first change of the recording.
voidsaveTexture()Keeps the active unit and the texture bound to it.
voidsaveReadBuffer()Keeps the read framebuffer and its read buffer.
voidsaveSampler(int unit)Keeps the active unit and the sampler of that unit.
voidsaveFrameBuffer(int target)Keeps the framebuffers bound to that target: the draw one, the read one, or both.
voidsaveTextureParameter(int name)Keeps that parameter of the bound texture, unless the texture belongs to JOID.
voidsaveVertexAttribute(int index)Keeps that attribute of the bound vertex array, with the array and the array buffer, unless the array belongs to JOID.

GlStateJournal(IGlBinding binding, GlCapabilities capabilities)

Creates an empty journal that reads and writes the state through the binding of the backend.

void start()

Starts a recording and forgets what it knew of the active unit, the bound textures and the bound vertex array.

void restore()

Stops the recording and writes back every kept value.

void excludeTexture(int texture)

Never records the parameters of that texture, a texture of JOID.

void includeTexture(int texture)

Records the parameters of that texture again, once JOID deleted it.

void excludeVertexArray(int array)

Never records the attributes of that vertex array, an array of JOID.

void trackTexture(int texture)

Remembers the texture bound to the active unit.

void trackVertexArray(int array)

Remembers the bound vertex array.

void trackActiveTexture(int unit)

Remembers the active texture unit.

void touch(GlStateKey key)

Keeps the value of that state before its first change of the recording.

void touch(GlStateKey key, int container)

Keeps the value of that state of one container, such as one capability or one buffer target, before its first change of the recording.

void saveTexture()

Keeps the active unit and the texture bound to it.

void saveReadBuffer()

Keeps the read framebuffer and its read buffer.

void saveSampler(int unit)

Keeps the active unit and the sampler of that unit.

void saveFrameBuffer(int target)

Keeps the framebuffers bound to that target: the draw one, the read one, or both.

void saveTextureParameter(int name)

Keeps that parameter of the bound texture, unless the texture belongs to JOID.

void saveVertexAttribute(int index)

Keeps that attribute of the bound vertex array, with the array and the array buffer, unless the array belongs to JOID.


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