Package org.boxutil.config
Class BoxThreadSync.Rendering
java.lang.Object
org.boxutil.config.BoxThreadSync.Rendering
- Enclosing class:
- BoxThreadSync
In rendering loop: beforeRendering => runBeforeRenderingDelayGLCmd => applyMemoryBarrier => beginRendering => beginIllumination => runBeginIlluminationDelayGLCmd => afterRendering => logical...
-
Method Summary
Modifier and TypeMethodDescriptionstatic Phaserstatic Phaserstatic Phaserstatic Phaserstatic voidofferBeforeRenderingDelayGLCmd(Runnable cmd, boolean inCampaign) Submits OpenGL command packets to the deferred execution queue associated with the specified barrier point.static voidofferBeginIlluminationDelayGLCmd(Runnable cmd, boolean inCampaign) Submits OpenGL command packets to the deferred execution queue associated with the specified barrier point.static voidofferMemoryBarrier(int barriers, boolean inCampaign) Submits OpenGL memory barrier to the collector.
-
Method Details
-
beforeRendering
-
offerBeforeRenderingDelayGLCmd
Submits OpenGL command packets to the deferred execution queue associated with the specified barrier point.These packets are executed on the main thread during the relevant phase.
The execution order of the packets in the queue should not be assumed to be the same as the order in which they were enqueued.
- Parameters:
inCampaign-trueif in campaign, otherwisefalseif in combat.
-
offerMemoryBarrier
public static void offerMemoryBarrier(int barriers, boolean inCampaign) Submits OpenGL memory barrier to the collector.These barriers are apply on the main thread at just before the
beginRenderingsync.Has default barriers in each frame:
GL42.GL_BUFFER_UPDATE_BARRIER_BIT,GL43.GL_SHADER_STORAGE_BARRIER_BIT,GL44.GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT- Parameters:
barriers- Same asGL42.glMemoryBarrier(int), the provided barrier bits are combined internally using a bitwise OR, and are executed uniformly after the barrier point, thereby avoiding multiple repeated barrier calls.
-
beginRendering
-
beginIllumination
-
offerBeginIlluminationDelayGLCmd
Submits OpenGL command packets to the deferred execution queue associated with the specified barrier point.These packets are executed on the main thread during the relevant phase.
The execution order of the packets in the queue should not be assumed to be the same as the order in which they were enqueued.
- Parameters:
inCampaign-trueif in campaign, otherwisefalseif in combat.
-
afterRendering
-