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

      private static @Nullable Thread renderThread
    • DEVICE

      private static @Nullable 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 Matrix4fStack modelViewStack
    • shaderFog

      private static @Nullable GpuBufferSlice shaderFog
    • shaderLightDirections

      private static @Nullable GpuBufferSlice shaderLightDirections
    • projectionMatrixBuffer

      private static @Nullable GpuBufferSlice projectionMatrixBuffer
    • savedProjectionMatrixBuffer

      private static @Nullable GpuBufferSlice savedProjectionMatrixBuffer
    • apiDescription

      private static String apiDescription
    • pollEventsWaitStart

      private static final AtomicLong pollEventsWaitStart
    • pollingEvents

      private static final AtomicBoolean pollingEvents
    • PENDING_FENCES

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

      public static @Nullable GpuTextureView outputColorTextureOverride
    • outputDepthTextureOverride

      public static @Nullable GpuTextureView outputDepthTextureOverride
    • globalSettingsUniform

      private static @Nullable GpuBuffer globalSettingsUniform
    • dynamicUniforms

      private static @Nullable DynamicUniforms dynamicUniforms
    • scissorStateForRenderTypeDraws

      private static final ScissorState scissorStateForRenderTypeDraws
    • samplerCache

      private static SamplerCache samplerCache
    • PIPELINE_MODIFIERS

      private static final PipelineModifierStack PIPELINE_MODIFIERS
  • Constructor Details

    • RenderSystem

      public RenderSystem()
  • Method Details

    • getSamplerCache

      public static SamplerCache getSamplerCache()
    • 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(Window pWindow, @Nullable TracyFrameCapture pFrameCapture)
    • limitDisplayFPS

      public static void limitDisplayFPS(int pFrameRateLimit)
    • setShaderFog

      public static void setShaderFog(GpuBufferSlice pShaderFog)
    • getShaderFog

      public static @Nullable GpuBufferSlice getShaderFog()
    • setShaderLights

      public static void setShaderLights(GpuBufferSlice pShaderLights)
    • getShaderLights

      public static @Nullable GpuBufferSlice getShaderLights()
    • enableScissorForRenderTypeDraws

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

      public static void disableScissorForRenderTypeDraws()
    • getScissorStateForRenderTypeDraws

      public static ScissorState getScissorStateForRenderTypeDraws()
    • getBackendDescription

      public static String getBackendDescription()
    • getApiDescription

      public static String getApiDescription()
    • initBackendSystem

      public static TimeSource.NanoTimeSource initBackendSystem()
    • initRenderer

      public static void initRenderer(long pWindow, int pDebugVerbosity, boolean pSynchronous, ShaderSource pDefaultShaderSource, boolean pRenderDebugLabels)
    • setErrorCallback

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

      public static void setupDefaultState()
    • setProjectionMatrix

      public static void setProjectionMatrix(GpuBufferSlice pProjectionMatrixBuffer, ProjectionType pProjectionType)
    • backupProjectionMatrix

      public static void backupProjectionMatrix()
    • restoreProjectionMatrix

      public static void restoreProjectionMatrix()
    • getProjectionMatrixBuffer

      public static @Nullable GpuBufferSlice getProjectionMatrixBuffer()
    • getModelViewMatrix

      public static Matrix4f getModelViewMatrix()
    • getModelViewStack

      public static Matrix4fStack getModelViewStack()
    • getSequentialBuffer

      public static RenderSystem.AutoStorageIndexBuffer getSequentialBuffer(VertexFormat.Mode pFormatMode)
    • setGlobalSettingsUniform

      public static void setGlobalSettingsUniform(GpuBuffer pGlobalSettingsUniform)
    • getGlobalSettingsUniform

      public static @Nullable GpuBuffer getGlobalSettingsUniform()
    • getProjectionType

      public static ProjectionType getProjectionType()
    • queueFencedTask

      public static void queueFencedTask(Runnable pTask)
    • executePendingTasks

      public static void executePendingTasks()
    • getDevice

      public static GpuDevice getDevice()
    • tryGetDevice

      public static @Nullable 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()