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 renderCall)
    • pollEvents

      private static void pollEvents()
    • isFrozenAtPollEvents

      public static boolean isFrozenAtPollEvents()
    • flipFrame

      public static void flipFrame(long windowId)
    • replayQueue

      public static void replayQueue()
    • limitDisplayFPS

      public static void limitDisplayFPS(int frameRateLimit)
    • disableDepthTest

      public static void disableDepthTest()
    • enableDepthTest

      public static void enableDepthTest()
    • enableScissor

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

      public static void disableScissor()
    • depthFunc

      public static void depthFunc(int depthFunc)
    • depthMask

      public static void depthMask(boolean flag)
    • enableBlend

      public static void enableBlend()
    • disableBlend

      public static void disableBlend()
    • blendFunc

      public static void blendFunc(GlStateManager.SourceFactor sourceFactor, GlStateManager.DestFactor destFactor)
    • blendFunc

      public static void blendFunc(int sourceFactor, int destFactor)
    • blendFuncSeparate

      public static void blendFuncSeparate(GlStateManager.SourceFactor sourceFactor, GlStateManager.DestFactor destFactor, GlStateManager.SourceFactor sourceFactorAlpha, GlStateManager.DestFactor destFactorAlpha)
    • blendFuncSeparate

      public static void blendFuncSeparate(int sourceFactor, int destFactor, int sourceFactorAlpha, int destFactorAlpha)
    • blendEquation

      public static void blendEquation(int mode)
    • enableCull

      public static void enableCull()
    • disableCull

      public static void disableCull()
    • polygonMode

      public static void polygonMode(int face, int mode)
    • enablePolygonOffset

      public static void enablePolygonOffset()
    • disablePolygonOffset

      public static void disablePolygonOffset()
    • polygonOffset

      public static void polygonOffset(float factor, float units)
    • enableColorLogicOp

      public static void enableColorLogicOp()
    • disableColorLogicOp

      public static void disableColorLogicOp()
    • logicOp

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

      public static void activeTexture(int texture)
    • texParameter

      public static void texParameter(int target, int parameterName, int parameter)
    • deleteTexture

      public static void deleteTexture(int texture)
    • bindTextureForSetup

      public static void bindTextureForSetup(int texture)
    • bindTexture

      public static void bindTexture(int texture)
    • viewport

      public static void viewport(int x, int y, int width, int height)
    • colorMask

      public static void colorMask(boolean red, boolean green, boolean blue, boolean alpha)
    • stencilFunc

      public static void stencilFunc(int func, int ref, int mask)
    • stencilMask

      public static void stencilMask(int mask)
    • stencilOp

      public static void stencilOp(int sFail, int dpFail, int dpPass)
    • clearDepth

      public static void clearDepth(double depth)
    • clearColor

      public static void clearColor(float red, float green, float blue, float alpha)
    • clearStencil

      public static void clearStencil(int index)
    • clear

      public static void clear(int mask, boolean checkError)
    • setShaderFogStart

      public static void setShaderFogStart(float p_shaderFogStart)
    • getShaderFogStart

      public static float getShaderFogStart()
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(double shaderGlintAlpha)
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(float p_shaderGlintAlpha)
    • getShaderGlintAlpha

      public static float getShaderGlintAlpha()
    • setShaderFogEnd

      public static void setShaderFogEnd(float p_shaderFogEnd)
    • getShaderFogEnd

      public static float getShaderFogEnd()
    • setShaderFogColor

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

      public static void setShaderFogColor(float red, float green, float blue)
    • getShaderFogColor

      public static float[] getShaderFogColor()
    • setShaderFogShape

      public static void setShaderFogShape(FogShape p_shaderFogShape)
    • getShaderFogShape

      public static FogShape getShaderFogShape()
    • setShaderLights

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

      public static void setupShaderLights(ShaderInstance instance)
    • setShaderColor

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

      private static void _setShaderColor(float red, float green, float blue, float alpha)
    • getShaderColor

      public static float[] getShaderColor()
    • drawElements

      public static void drawElements(int mode, int count, int type)
    • lineWidth

      public static void lineWidth(float p_shaderLineWidth)
    • getShaderLineWidth

      public static float getShaderLineWidth()
    • pixelStore

      public static void pixelStore(int parameterName, int parameter)
    • readPixels

      public static void readPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels)
    • getString

      public static void getString(int name, Consumer<String> consumer)
    • getBackendDescription

      public static String getBackendDescription()
    • getApiDescription

      public static String getApiDescription()
    • initBackendSystem

      public static TimeSource.NanoTimeSource initBackendSystem()
    • initRenderer

      public static void initRenderer(int debugVerbosity, boolean synchronous)
    • setErrorCallback

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

      public static void renderCrosshair(int lineLength)
    • getCapsString

      public static String getCapsString()
    • setupDefaultState

      public static void setupDefaultState(int x, int y, int width, int height)
    • maxSupportedTextureSize

      public static int maxSupportedTextureSize()
    • glBindBuffer

      public static void glBindBuffer(int target, int buffer)
    • glBindVertexArray

      public static void glBindVertexArray(int array)
    • glBufferData

      public static void glBufferData(int target, ByteBuffer data, int usage)
    • glDeleteBuffers

      public static void glDeleteBuffers(int buffer)
    • glDeleteVertexArrays

      public static void glDeleteVertexArrays(int array)
    • glUniform1i

      public static void glUniform1i(int location, int value)
    • glUniform1

      public static void glUniform1(int location, IntBuffer value)
    • glUniform2

      public static void glUniform2(int location, IntBuffer value)
    • glUniform3

      public static void glUniform3(int location, IntBuffer value)
    • glUniform4

      public static void glUniform4(int location, IntBuffer value)
    • glUniform1

      public static void glUniform1(int location, FloatBuffer value)
    • glUniform2

      public static void glUniform2(int location, FloatBuffer value)
    • glUniform3

      public static void glUniform3(int location, FloatBuffer value)
    • glUniform4

      public static void glUniform4(int location, FloatBuffer value)
    • glUniformMatrix2

      public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer value)
    • glUniformMatrix3

      public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer value)
    • glUniformMatrix4

      public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer value)
    • setupOverlayColor

      public static void setupOverlayColor(int textureId, int color)
    • 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)
    • beginInitialization

      public static void beginInitialization()
    • finishInitialization

      public static void finishInitialization()
    • glGenBuffers

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

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

      public static Tesselator renderThreadTesselator()
    • defaultBlendFunc

      public static void defaultBlendFunc()
    • runAsFancy

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

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

      @Nullable public static ShaderInstance getShader()
    • setShaderTexture

      public static void setShaderTexture(int shaderTexture, ResourceLocation textureId)
    • _setShaderTexture

      public static void _setShaderTexture(int shaderTexture, ResourceLocation textureId)
    • setShaderTexture

      public static void setShaderTexture(int shaderTexture, int textureId)
    • _setShaderTexture

      public static void _setShaderTexture(int shaderTexture, int textureId)
    • getShaderTexture

      public static int getShaderTexture(int shaderTexture)
    • setProjectionMatrix

      public static void setProjectionMatrix(org.joml.Matrix4f p_projectionMatrix, VertexSorting p_vertexSorting)
    • setTextureMatrix

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

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

      public static float getShaderGameTime()
    • getVertexSorting

      public static VertexSorting getVertexSorting()
    • backupGlState

      public static void backupGlState(GlStateBackup state)
    • restoreGlState

      public static void restoreGlState(GlStateBackup state)