Class RenderSystem

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

public class RenderSystem extends Object
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
    • MINIMUM_ATLAS_TEXTURE_SIZE

      public static final int MINIMUM_ATLAS_TEXTURE_SIZE
      See Also:
    • PROJECTION_MATRIX_UBO_SIZE

      public static final int PROJECTION_MATRIX_UBO_SIZE
    • 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
    • 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 GpuTextureView[] shaderTextures
    • shaderFog

      @Nullable private static GpuBufferSlice shaderFog
    • shaderLightDirections

      @Nullable private static GpuBufferSlice shaderLightDirections
    • projectionMatrixBuffer

      @Nullable private static GpuBufferSlice projectionMatrixBuffer
    • savedProjectionMatrixBuffer

      @Nullable private static GpuBufferSlice savedProjectionMatrixBuffer
    • 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
    • outputColorTextureOverride

      @Nullable public static GpuTextureView outputColorTextureOverride
    • outputDepthTextureOverride

      @Nullable public static GpuTextureView outputDepthTextureOverride
    • globalSettingsUniform

      @Nullable private static GpuBuffer globalSettingsUniform
    • dynamicUniforms

      @Nullable private static DynamicUniforms dynamicUniforms
    • scissorStateForRenderTypeDraws

      private static ScissorState scissorStateForRenderTypeDraws
    • STENCIL_TEST

      @Nullable public static StencilTest STENCIL_TEST
    • 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)
    • setShaderFog

      public static void setShaderFog(GpuBufferSlice pShaderFog)
    • getShaderFog

      @Nullable public static GpuBufferSlice getShaderFog()
    • setShaderLights

      public static void setShaderLights(GpuBufferSlice pShaderLights)
    • getShaderLights

      @Nullable public static GpuBufferSlice getShaderLights()
    • lineWidth

      public static void lineWidth(float pShaderLineWidth)
    • getShaderLineWidth

      public static float getShaderLineWidth()
    • enableScissorForRenderTypeDraws

      public static void enableScissorForRenderTypeDraws(int pX, int pY, int pWidth, int pHeight)
    • disableScissorForRenderTypeDraws

      public static void disableScissorForRenderTypeDraws()
    • getScissorStateForRenderTypeDraws

      public static ScissorState getScissorStateForRenderTypeDraws()
    • enableStencil

      public static void enableStencil(StencilTest stencilTest)
    • disableStencil

      public static void disableStencil()
    • 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 p_69901_)
    • setupDefaultState

      public static void setupDefaultState()
    • setupOverlayColor

      public static void setupOverlayColor(@Nullable GpuTextureView pTexture)
    • teardownOverlayColor

      public static void teardownOverlayColor()
    • setShaderTexture

      public static void setShaderTexture(int pTextureId, @Nullable GpuTextureView pTexture)
    • getShaderTexture

      @Nullable public static GpuTextureView getShaderTexture(int pId)
    • setProjectionMatrix

      public static void setProjectionMatrix(GpuBufferSlice pProjectionMatrixBuffer, ProjectionType pProjectionType)
    • 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()
    • getProjectionMatrixBuffer

      @Nullable public static GpuBufferSlice getProjectionMatrixBuffer()
    • 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)
    • setGlobalSettingsUniform

      public static void setGlobalSettingsUniform(GpuBuffer pGlobalSettingsUniform)
    • getGlobalSettingsUniform

      @Nullable public static GpuBuffer getGlobalSettingsUniform()
    • 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()
    • getDynamicUniforms

      public static DynamicUniforms getDynamicUniforms()
    • bindDefaultUniforms

      public static void bindDefaultUniforms(RenderPass pRenderPass)
    • 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()