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.
Description
Section titled “Description”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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| GlStateJournal(IGlBinding binding, GlCapabilities capabilities) | Creates an empty journal that reads and writes the state through the binding of the backend. |
Methods
Section titled “Methods”Actions
Section titled “Actions”| Returns | Signature | Summary |
|---|---|---|
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. |
Creation details
Section titled “Creation details”GlStateJournal
Section titled “GlStateJournal”GlStateJournal(IGlBinding binding, GlCapabilities capabilities)
Creates an empty journal that reads and writes the state through the binding of the backend.
Method details
Section titled “Method details”void start()
Starts a recording and forgets what it knew of the active unit, the bound textures and the bound vertex array.
restore
Section titled “restore”void restore()
Stops the recording and writes back every kept value.
excludeTexture
Section titled “excludeTexture”void excludeTexture(int texture)
Never records the parameters of that texture, a texture of JOID.
includeTexture
Section titled “includeTexture”void includeTexture(int texture)
Records the parameters of that texture again, once JOID deleted it.
excludeVertexArray
Section titled “excludeVertexArray”void excludeVertexArray(int array)
Never records the attributes of that vertex array, an array of JOID.
trackTexture
Section titled “trackTexture”void trackTexture(int texture)
Remembers the texture bound to the active unit.
trackVertexArray
Section titled “trackVertexArray”void trackVertexArray(int array)
Remembers the bound vertex array.
trackActiveTexture
Section titled “trackActiveTexture”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.
saveTexture
Section titled “saveTexture”void saveTexture()
Keeps the active unit and the texture bound to it.
saveReadBuffer
Section titled “saveReadBuffer”void saveReadBuffer()
Keeps the read framebuffer and its read buffer.
saveSampler
Section titled “saveSampler”void saveSampler(int unit)
Keeps the active unit and the sampler of that unit.
saveFrameBuffer
Section titled “saveFrameBuffer”void saveFrameBuffer(int target)
Keeps the framebuffers bound to that target: the draw one, the read one, or both.
saveTextureParameter
Section titled “saveTextureParameter”void saveTextureParameter(int name)
Keeps that parameter of the bound texture, unless the texture belongs to JOID.
saveVertexAttribute
Section titled “saveVertexAttribute”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
