Class RenderSystem

java.lang.Object
com.mojang.blaze3d.systems.RenderSystem

public class RenderSystem extends Object
  • Field Details

    • SCISSOR_STATE

      public static final ScissorState SCISSOR_STATE
    • STENCIL_TEST

      @Nullable public static StencilTest STENCIL_TEST
    • LOGGER

      static final org.slf4j.Logger LOGGER
    • MINIMUM_ATLAS_TEXTURE_SIZE

      public static final int MINIMUM_ATLAS_TEXTURE_SIZE
      See Also:
    • renderThread

      @Nullable private static Thread renderThread
    • DEVICE

      @Nullable private static GpuDevice DEVICE
    • lastDrawTime

      private static double lastDrawTime
    • sharedSequential

      private static final RenderSystem.AutoStorageIndexBuffer sharedSequential
    • sharedSequentialQuad

      private static final RenderSystem.AutoStorageIndexBuffer sharedSequentialQuad
    • sharedSequentialLines

      private static final RenderSystem.AutoStorageIndexBuffer sharedSequentialLines
    • projectionMatrix

      private static org.joml.Matrix4f projectionMatrix
    • savedProjectionMatrix

      private static org.joml.Matrix4f savedProjectionMatrix
    • projectionType

      private static ProjectionType projectionType
    • savedProjectionType

      private static ProjectionType savedProjectionType
    • modelViewStack

      private static final org.joml.Matrix4fStack modelViewStack
    • textureMatrix

      private static org.joml.Matrix4f textureMatrix
    • TEXTURE_COUNT

      public static final int TEXTURE_COUNT
      See Also:
    • shaderTextures

      private static final GpuTexture[] shaderTextures
    • shaderColor

      private static final float[] shaderColor
    • shaderGlintAlpha

      private static float shaderGlintAlpha
    • shaderFog

      private static FogParameters shaderFog
    • shaderLightDirections

      private static final org.joml.Vector3f[] shaderLightDirections
    • shaderGameTime

      private static float shaderGameTime
    • modelOffset

      private static final org.joml.Vector3f modelOffset
    • shaderLineWidth

      private static float shaderLineWidth
    • apiDescription

      private static String apiDescription
    • pollEventsWaitStart

      private static final AtomicLong pollEventsWaitStart
    • pollingEvents

      private static final AtomicBoolean pollingEvents
    • QUAD_VERTEX_BUFFER

      @Nullable private static GpuBuffer QUAD_VERTEX_BUFFER
    • PENDING_FENCES

      private static final ArrayListDeque<RenderSystem.GpuAsyncTask> PENDING_FENCES
    • PIPELINE_MODIFIERS

      private static final PipelineModifierStack PIPELINE_MODIFIERS
  • Constructor Details

    • RenderSystem

      public RenderSystem()
  • Method Details

    • initRenderThread

      public static void initRenderThread()
    • isOnRenderThread

      public static boolean isOnRenderThread()
    • assertOnRenderThread

      public static void assertOnRenderThread()
    • constructThreadException

      private static IllegalStateException constructThreadException()
    • pollEvents

      private static void pollEvents()
    • isFrozenAtPollEvents

      public static boolean isFrozenAtPollEvents()
    • flipFrame

      public static void flipFrame(long p_69496_, @Nullable TracyFrameCapture p_372841_)
    • limitDisplayFPS

      public static void limitDisplayFPS(int p_69831_)
    • enableScissor

      public static void enableScissor(int p_69489_, int p_69490_, int p_69491_, int p_69492_)
    • disableScissor

      public static void disableScissor()
    • enableStencil

      public static void enableStencil(StencilTest stencilTest)
    • disableStencil

      public static void disableStencil()
    • setShaderFog

      public static void setShaderFog(FogParameters p_360454_)
    • getShaderFog

      public static FogParameters getShaderFog()
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(double p_268332_)
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(float p_268329_)
    • getShaderGlintAlpha

      public static float getShaderGlintAlpha()
    • setShaderLights

      public static void setShaderLights(org.joml.Vector3f p_254155_, org.joml.Vector3f p_254006_)
    • getShaderLights

      public static org.joml.Vector3f[] getShaderLights()
    • setShaderColor

      public static void setShaderColor(float p_157430_, float p_157431_, float p_157432_, float p_157433_)
    • getShaderColor

      public static float[] getShaderColor()
    • lineWidth

      public static void lineWidth(float p_69833_)
    • getShaderLineWidth

      public static float getShaderLineWidth()
    • getBackendDescription

      public static String getBackendDescription()
    • getApiDescription

      public static String getApiDescription()
    • initBackendSystem

      public static TimeSource.NanoTimeSource initBackendSystem()
    • initRenderer

      public static void initRenderer(long p_409720_, int p_69581_, boolean p_69582_, BiFunction<ResourceLocation,ShaderType,String> p_410113_, boolean p_410401_)
    • setErrorCallback

      public static void setErrorCallback(org.lwjgl.glfw.GLFWErrorCallbackI p_69901_)
    • setupDefaultState

      public static void setupDefaultState()
    • setupOverlayColor

      public static void setupOverlayColor(@Nullable GpuTexture p_404695_)
    • teardownOverlayColor

      public static void teardownOverlayColor()
    • setupLevelDiffuseLighting

      public static void setupLevelDiffuseLighting(org.joml.Vector3f p_254489_, org.joml.Vector3f p_254541_)
    • setupGuiFlatDiffuseLighting

      public static void setupGuiFlatDiffuseLighting(org.joml.Vector3f p_254419_, org.joml.Vector3f p_254483_)
    • setupGui3DDiffuseLighting

      public static void setupGui3DDiffuseLighting(org.joml.Vector3f p_253859_, org.joml.Vector3f p_253890_)
    • setShaderTexture

      public static void setShaderTexture(int p_157454_, @Nullable GpuTexture p_405442_)
    • getShaderTexture

      @Nullable public static GpuTexture getShaderTexture(int p_157204_)
    • setProjectionMatrix

      public static void setProjectionMatrix(org.joml.Matrix4f p_277884_, ProjectionType p_381637_)
    • setTextureMatrix

      public static void setTextureMatrix(org.joml.Matrix4f p_254081_)
    • resetTextureMatrix

      public static void resetTextureMatrix()
    • backupProjectionMatrix

      public static void backupProjectionMatrix()
    • restoreProjectionMatrix

      public static void restoreProjectionMatrix()
    • getProjectionMatrix

      public static org.joml.Matrix4f getProjectionMatrix()
    • getModelViewMatrix

      public static org.joml.Matrix4f getModelViewMatrix()
    • getModelViewStack

      public static org.joml.Matrix4fStack getModelViewStack()
    • getTextureMatrix

      public static org.joml.Matrix4f getTextureMatrix()
    • getSequentialBuffer

      public static RenderSystem.AutoStorageIndexBuffer getSequentialBuffer(VertexFormat.Mode p_221942_)
    • setShaderGameTime

      public static void setShaderGameTime(long p_157448_, float p_157449_)
    • getShaderGameTime

      public static float getShaderGameTime()
    • getProjectionType

      public static ProjectionType getProjectionType()
    • getQuadVertexBuffer

      public static GpuBuffer getQuadVertexBuffer()
    • setModelOffset

      public static void setModelOffset(float p_401762_, float p_401844_, float p_401774_)
    • resetModelOffset

      public static void resetModelOffset()
    • getModelOffset

      public static org.joml.Vector3f getModelOffset()
    • queueFencedTask

      public static void queueFencedTask(Runnable p_406359_)
    • executePendingTasks

      public static void executePendingTasks()
    • getDevice

      public static GpuDevice getDevice()
    • tryGetDevice

      @Nullable public static GpuDevice tryGetDevice()
    • pushPipelineModifier

      public static void pushPipelineModifier(ResourceKey<PipelineModifier> modifier)
      Neo: Push the provided PipelineModifier to be applied to subsequent rendering.

      Must be paired with a corresponding popPipelineModifier() call after flushing the used buffers

    • popPipelineModifier

      public static void popPipelineModifier()
      Neo: Pop the last PipelineModifier off the modifier stack
    • renderWithPipelineModifier

      public static void renderWithPipelineModifier(ResourceKey<PipelineModifier> modifier, Runnable renderTask)
      Neo: Run the provided Runnable with the provided PipelineModifier applied to the pipelines used by the rendering done in the Runnable
    • applyPipelineModifiers

      @Internal public static RenderPipeline applyPipelineModifiers(RenderPipeline pipeline)
    • ensurePipelineModifiersEmpty

      @Internal public static void ensurePipelineModifiersEmpty()