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 pWindow, @Nullable TracyFrameCapture pTracyFrameCapture)
    • limitDisplayFPS

      public static void limitDisplayFPS(int pFrameRateLimit)
    • enableScissor

      public static void enableScissor(int pX, int pY, int pWidth, int pHeight)
    • disableScissor

      public static void disableScissor()
    • enableStencil

      public static void enableStencil(StencilTest stencilTest)
    • disableStencil

      public static void disableStencil()
    • setShaderFog

      public static void setShaderFog(FogParameters pShaderFog)
    • getShaderFog

      public static FogParameters getShaderFog()
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(double pShaderGlintAlpha)
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(float pShaderGlintAlpha)
    • getShaderGlintAlpha

      public static float getShaderGlintAlpha()
    • setShaderLights

      public static void setShaderLights(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1)
    • getShaderLights

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

      public static void setShaderColor(float pRed, float pGreen, float pBlue, float pAlpha)
    • getShaderColor

      public static float[] getShaderColor()
    • lineWidth

      public static void lineWidth(float pShaderLineWidth)
    • 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 pWindow, int pGlDebugVerbosity, boolean pSynchronous, BiFunction<ResourceLocation,ShaderType,String> pDefaultShaderSource, boolean pRenderDebugLabels)
    • setErrorCallback

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

      public static void setupDefaultState()
    • setupOverlayColor

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

      public static void teardownOverlayColor()
    • setupLevelDiffuseLighting

      public static void setupLevelDiffuseLighting(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1)
    • setupGuiFlatDiffuseLighting

      public static void setupGuiFlatDiffuseLighting(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2)
    • setupGui3DDiffuseLighting

      public static void setupGui3DDiffuseLighting(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2)
    • setShaderTexture

      public static void setShaderTexture(int pIndex, @Nullable GpuTexture pTexture)
    • getShaderTexture

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

      public static void setProjectionMatrix(org.joml.Matrix4f pProjectionMatrix, ProjectionType pProjectionType)
    • setTextureMatrix

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

      public static void setShaderGameTime(long pTickTime, float pPartialTicks)
    • getShaderGameTime

      public static float getShaderGameTime()
    • getProjectionType

      public static ProjectionType getProjectionType()
    • getQuadVertexBuffer

      public static GpuBuffer getQuadVertexBuffer()
    • setModelOffset

      public static void setModelOffset(float pX, float pY, float pZ)
    • resetModelOffset

      public static void resetModelOffset()
    • getModelOffset

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

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