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 window, @Nullable TracyFrameCapture tracyFrameCapture)
    • limitDisplayFPS

      public static void limitDisplayFPS(int frameRateLimit)
    • enableScissor

      public static void enableScissor(int x, int y, int width, int height)
    • disableScissor

      public static void disableScissor()
    • enableStencil

      public static void enableStencil(StencilTest stencilTest)
    • disableStencil

      public static void disableStencil()
    • setShaderFog

      public static void setShaderFog(FogParameters shaderFog)
    • getShaderFog

      public static FogParameters getShaderFog()
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(double shaderGlintAlpha)
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(float shaderGlintAlpha)
    • getShaderGlintAlpha

      public static float getShaderGlintAlpha()
    • setShaderLights

      public static void setShaderLights(org.joml.Vector3f lightingVector0, org.joml.Vector3f lightingVector1)
    • getShaderLights

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

      public static void setShaderColor(float red, float green, float blue, float alpha)
    • getShaderColor

      public static float[] getShaderColor()
    • lineWidth

      public static void lineWidth(float shaderLineWidth)
    • 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 window, int glDebugVerbosity, boolean synchronous, BiFunction<ResourceLocation,ShaderType,String> defaultShaderSource, boolean renderDebugLabels)
    • setErrorCallback

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

      public static void setupDefaultState()
    • setupOverlayColor

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

      public static void teardownOverlayColor()
    • setupLevelDiffuseLighting

      public static void setupLevelDiffuseLighting(org.joml.Vector3f lightingVector0, org.joml.Vector3f lightingVector1)
    • setupGuiFlatDiffuseLighting

      public static void setupGuiFlatDiffuseLighting(org.joml.Vector3f lightingVector1, org.joml.Vector3f lightingVector2)
    • setupGui3DDiffuseLighting

      public static void setupGui3DDiffuseLighting(org.joml.Vector3f lightingVector1, org.joml.Vector3f lightingVector2)
    • setShaderTexture

      public static void setShaderTexture(int index, @Nullable GpuTexture texture)
    • getShaderTexture

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

      public static void setProjectionMatrix(org.joml.Matrix4f projectionMatrix, ProjectionType projectionType)
    • setTextureMatrix

      public static void setTextureMatrix(org.joml.Matrix4f textureMatrix)
    • 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 formatMode)
    • setShaderGameTime

      public static void setShaderGameTime(long tickTime, float partialTicks)
    • getShaderGameTime

      public static float getShaderGameTime()
    • getProjectionType

      public static ProjectionType getProjectionType()
    • getQuadVertexBuffer

      public static GpuBuffer getQuadVertexBuffer()
    • setModelOffset

      public static void setModelOffset(float x, float y, float z)
    • resetModelOffset

      public static void resetModelOffset()
    • getModelOffset

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

      public static void queueFencedTask(Runnable task)
    • 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()