Class BoxThreadSync.Rendering

java.lang.Object
org.boxutil.config.BoxThreadSync.Rendering
Enclosing class:
BoxThreadSync

public static final class BoxThreadSync.Rendering extends Object
In rendering loop: beforeRendering => runBeforeRenderingDelayGLCmd => applyMemoryBarrier => beginRendering => beginIllumination => runBeginIlluminationDelayGLCmd => afterRendering => logical...
  • Method Details

    • beforeRendering

      public static Phaser beforeRendering()
    • offerBeforeRenderingDelayGLCmd

      public static void offerBeforeRenderingDelayGLCmd(Runnable cmd, boolean inCampaign)
      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 - true if in campaign, otherwise false if 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 beginRendering sync.

      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 as GL42.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

      public static Phaser beginRendering()
    • beginIllumination

      public static Phaser beginIllumination()
    • offerBeginIlluminationDelayGLCmd

      public static void offerBeginIlluminationDelayGLCmd(Runnable cmd, boolean inCampaign)
      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 - true if in campaign, otherwise false if in combat.
    • afterRendering

      public static Phaser afterRendering()