Class RenderSystem

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

public class RenderSystem extends Object
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
    • recordingQueue

      private static final ConcurrentLinkedQueue<RenderCall> recordingQueue
    • RENDER_THREAD_TESSELATOR

      private static final Tesselator RENDER_THREAD_TESSELATOR
    • MINIMUM_ATLAS_TEXTURE_SIZE

      private static final int MINIMUM_ATLAS_TEXTURE_SIZE
      See Also:
    • renderThread

      @Nullable private static Thread renderThread
    • MAX_SUPPORTED_TEXTURE_SIZE

      private static int MAX_SUPPORTED_TEXTURE_SIZE
    • isInInit

      private static boolean isInInit
    • 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
    • vertexSorting

      private static VertexSorting vertexSorting
    • savedVertexSorting

      private static VertexSorting savedVertexSorting
    • modelViewStack

      private static final org.joml.Matrix4fStack modelViewStack
    • modelViewMatrix

      private static org.joml.Matrix4f modelViewMatrix
    • textureMatrix

      private static org.joml.Matrix4f textureMatrix
    • shaderTextures

      private static final int[] shaderTextures
    • shaderColor

      private static final float[] shaderColor
    • shaderGlintAlpha

      private static float shaderGlintAlpha
    • shaderFogStart

      private static float shaderFogStart
    • shaderFogEnd

      private static float shaderFogEnd
    • shaderFogColor

      private static final float[] shaderFogColor
    • shaderFogShape

      private static FogShape shaderFogShape
    • shaderLightDirections

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

      private static float shaderGameTime
    • shaderLineWidth

      private static float shaderLineWidth
    • apiDescription

      private static String apiDescription
    • shader

      @Nullable private static ShaderInstance shader
    • pollEventsWaitStart

      private static final AtomicLong pollEventsWaitStart
    • pollingEvents

      private static final AtomicBoolean pollingEvents
  • Constructor Details

    • RenderSystem

      public RenderSystem()
  • Method Details

    • initRenderThread

      public static void initRenderThread()
    • isOnRenderThread

      public static boolean isOnRenderThread()
    • isOnRenderThreadOrInit

      public static boolean isOnRenderThreadOrInit()
    • assertOnRenderThreadOrInit

      public static void assertOnRenderThreadOrInit()
    • assertOnRenderThread

      public static void assertOnRenderThread()
    • constructThreadException

      private static IllegalStateException constructThreadException()
    • recordRenderCall

      public static void recordRenderCall(RenderCall pRenderCall)
    • pollEvents

      private static void pollEvents()
    • isFrozenAtPollEvents

      public static boolean isFrozenAtPollEvents()
    • flipFrame

      public static void flipFrame(long pWindowId)
    • replayQueue

      public static void replayQueue()
    • limitDisplayFPS

      public static void limitDisplayFPS(int pFrameRateLimit)
    • disableDepthTest

      public static void disableDepthTest()
    • enableDepthTest

      public static void enableDepthTest()
    • enableScissor

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

      public static void disableScissor()
    • depthFunc

      public static void depthFunc(int pDepthFunc)
    • depthMask

      public static void depthMask(boolean pFlag)
    • enableBlend

      public static void enableBlend()
    • disableBlend

      public static void disableBlend()
    • blendFunc

      public static void blendFunc(GlStateManager.SourceFactor pSourceFactor, GlStateManager.DestFactor pDestFactor)
    • blendFunc

      public static void blendFunc(int pSourceFactor, int pDestFactor)
    • blendFuncSeparate

      public static void blendFuncSeparate(GlStateManager.SourceFactor pSourceFactor, GlStateManager.DestFactor pDestFactor, GlStateManager.SourceFactor pSourceFactorAlpha, GlStateManager.DestFactor pDestFactorAlpha)
    • blendFuncSeparate

      public static void blendFuncSeparate(int pSourceFactor, int pDestFactor, int pSourceFactorAlpha, int pDestFactorAlpha)
    • blendEquation

      public static void blendEquation(int pMode)
    • enableCull

      public static void enableCull()
    • disableCull

      public static void disableCull()
    • polygonMode

      public static void polygonMode(int pFace, int pMode)
    • enablePolygonOffset

      public static void enablePolygonOffset()
    • disablePolygonOffset

      public static void disablePolygonOffset()
    • polygonOffset

      public static void polygonOffset(float pFactor, float pUnits)
    • enableColorLogicOp

      public static void enableColorLogicOp()
    • disableColorLogicOp

      public static void disableColorLogicOp()
    • logicOp

      public static void logicOp(GlStateManager.LogicOp pOp)
    • activeTexture

      public static void activeTexture(int pTexture)
    • texParameter

      public static void texParameter(int pTarget, int pParameterName, int pParameter)
    • deleteTexture

      public static void deleteTexture(int pTexture)
    • bindTextureForSetup

      public static void bindTextureForSetup(int pTexture)
    • bindTexture

      public static void bindTexture(int pTexture)
    • viewport

      public static void viewport(int pX, int pY, int pWidth, int pHeight)
    • colorMask

      public static void colorMask(boolean pRed, boolean pGreen, boolean pBlue, boolean pAlpha)
    • stencilFunc

      public static void stencilFunc(int pFunc, int pRef, int pMask)
    • stencilMask

      public static void stencilMask(int pMask)
    • stencilOp

      public static void stencilOp(int pSFail, int pDpFail, int pDpPass)
    • clearDepth

      public static void clearDepth(double pDepth)
    • clearColor

      public static void clearColor(float pRed, float pGreen, float pBlue, float pAlpha)
    • clearStencil

      public static void clearStencil(int pIndex)
    • clear

      public static void clear(int pMask, boolean pCheckError)
    • setShaderFogStart

      public static void setShaderFogStart(float pShaderFogStart)
    • getShaderFogStart

      public static float getShaderFogStart()
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(double pShaderGlintAlpha)
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(float pShaderGlintAlpha)
    • getShaderGlintAlpha

      public static float getShaderGlintAlpha()
    • setShaderFogEnd

      public static void setShaderFogEnd(float pShaderFogEnd)
    • getShaderFogEnd

      public static float getShaderFogEnd()
    • setShaderFogColor

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

      public static void setShaderFogColor(float pRed, float pGreen, float pBlue)
    • getShaderFogColor

      public static float[] getShaderFogColor()
    • setShaderFogShape

      public static void setShaderFogShape(FogShape pShaderFogShape)
    • getShaderFogShape

      public static FogShape getShaderFogShape()
    • setShaderLights

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

      public static void setupShaderLights(ShaderInstance pInstance)
    • setShaderColor

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

      private static void _setShaderColor(float pRed, float pGreen, float pBlue, float pAlpha)
    • getShaderColor

      public static float[] getShaderColor()
    • drawElements

      public static void drawElements(int pMode, int pCount, int pType)
    • lineWidth

      public static void lineWidth(float pShaderLineWidth)
    • getShaderLineWidth

      public static float getShaderLineWidth()
    • pixelStore

      public static void pixelStore(int pParameterName, int pParameter)
    • readPixels

      public static void readPixels(int pX, int pY, int pWidth, int pHeight, int pFormat, int pType, ByteBuffer pPixels)
    • getString

      public static void getString(int pName, Consumer<String> pConsumer)
    • getBackendDescription

      public static String getBackendDescription()
    • getApiDescription

      public static String getApiDescription()
    • initBackendSystem

      public static TimeSource.NanoTimeSource initBackendSystem()
    • initRenderer

      public static void initRenderer(int pDebugVerbosity, boolean pSynchronous)
    • setErrorCallback

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

      public static void renderCrosshair(int pLineLength)
    • getCapsString

      public static String getCapsString()
    • setupDefaultState

      public static void setupDefaultState(int pX, int pY, int pWidth, int pHeight)
    • maxSupportedTextureSize

      public static int maxSupportedTextureSize()
    • glBindBuffer

      public static void glBindBuffer(int pTarget, int pBuffer)
    • glBindVertexArray

      public static void glBindVertexArray(int pArray)
    • glBufferData

      public static void glBufferData(int pTarget, ByteBuffer pData, int pUsage)
    • glDeleteBuffers

      public static void glDeleteBuffers(int pBuffer)
    • glDeleteVertexArrays

      public static void glDeleteVertexArrays(int pArray)
    • glUniform1i

      public static void glUniform1i(int pLocation, int pValue)
    • glUniform1

      public static void glUniform1(int pLocation, IntBuffer pValue)
    • glUniform2

      public static void glUniform2(int pLocation, IntBuffer pValue)
    • glUniform3

      public static void glUniform3(int pLocation, IntBuffer pValue)
    • glUniform4

      public static void glUniform4(int pLocation, IntBuffer pValue)
    • glUniform1

      public static void glUniform1(int pLocation, FloatBuffer pValue)
    • glUniform2

      public static void glUniform2(int pLocation, FloatBuffer pValue)
    • glUniform3

      public static void glUniform3(int pLocation, FloatBuffer pValue)
    • glUniform4

      public static void glUniform4(int pLocation, FloatBuffer pValue)
    • glUniformMatrix2

      public static void glUniformMatrix2(int pLocation, boolean pTranspose, FloatBuffer pValue)
    • glUniformMatrix3

      public static void glUniformMatrix3(int pLocation, boolean pTranspose, FloatBuffer pValue)
    • glUniformMatrix4

      public static void glUniformMatrix4(int pLocation, boolean pTranspose, FloatBuffer pValue)
    • setupOverlayColor

      public static void setupOverlayColor(int pTextureId, int pColor)
    • 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_)
    • beginInitialization

      public static void beginInitialization()
    • finishInitialization

      public static void finishInitialization()
    • glGenBuffers

      public static void glGenBuffers(Consumer<Integer> pBufferIdConsumer)
    • glGenVertexArrays

      public static void glGenVertexArrays(Consumer<Integer> pArrayObjectIdConsumer)
    • renderThreadTesselator

      public static Tesselator renderThreadTesselator()
    • defaultBlendFunc

      public static void defaultBlendFunc()
    • runAsFancy

      @Deprecated public static void runAsFancy(Runnable pFancyRunnable)
      Deprecated.
    • setShader

      public static void setShader(Supplier<ShaderInstance> pShaderSupplier)
    • getShader

      @Nullable public static ShaderInstance getShader()
    • setShaderTexture

      public static void setShaderTexture(int pShaderTexture, ResourceLocation pTextureId)
    • _setShaderTexture

      public static void _setShaderTexture(int pShaderTexture, ResourceLocation pTextureId)
    • setShaderTexture

      public static void setShaderTexture(int pShaderTexture, int pTextureId)
    • _setShaderTexture

      public static void _setShaderTexture(int pShaderTexture, int pTextureId)
    • getShaderTexture

      public static int getShaderTexture(int pShaderTexture)
    • setProjectionMatrix

      public static void setProjectionMatrix(org.joml.Matrix4f p_277884_, VertexSorting p_277702_)
    • setTextureMatrix

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

      public static void resetTextureMatrix()
    • applyModelViewMatrix

      public static void applyModelViewMatrix()
    • backupProjectionMatrix

      public static void backupProjectionMatrix()
    • _backupProjectionMatrix

      private static void _backupProjectionMatrix()
    • restoreProjectionMatrix

      public static void restoreProjectionMatrix()
    • _restoreProjectionMatrix

      private 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()
    • getVertexSorting

      public static VertexSorting getVertexSorting()
    • backupGlState

      public static void backupGlState(GlStateBackup state)
    • restoreGlState

      public static void restoreGlState(GlStateBackup state)