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 Matrix4f projectionMatrix
    • savedProjectionMatrix

      private static Matrix4f savedProjectionMatrix
    • projectionType

      private static ProjectionType projectionType
    • savedProjectionType

      private static ProjectionType savedProjectionType
    • modelViewStack

      private static final Matrix4fStack modelViewStack
    • textureMatrix

      private static Matrix4f textureMatrix
    • shaderTextures

      private static final int[] shaderTextures
    • shaderColor

      private static final float[] shaderColor
    • shaderGlintAlpha

      private static float shaderGlintAlpha
    • shaderFog

      private static FogParameters shaderFog
    • shaderLightDirections

      private static final Vector3f[] shaderLightDirections
    • shaderGameTime

      private static float shaderGameTime
    • shaderLineWidth

      private static float shaderLineWidth
    • apiDescription

      private static String apiDescription
    • shader

      @Nullable private static CompiledShaderProgram 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 window, @Nullable TracyFrameCapture tracyFrameCapture)
    • 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)
    • setShaderFog

      public static void setShaderFog(FogParameters shaderFog)
    • getShaderFog

      public static FogParameters getShaderFog()
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(double shaderGlintAlpha)
    • setShaderGlintAlpha

      public static void setShaderGlintAlpha(float shaderGlintAlpha)
    • getShaderGlintAlpha

      public static float getShaderGlintAlpha()
    • setShaderLights

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

      public static void setupShaderLights(CompiledShaderProgram shader)
    • setShaderColor

      public 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 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(Vector3f lightingVector0, Vector3f lightingVector1)
    • setupGuiFlatDiffuseLighting

      public static void setupGuiFlatDiffuseLighting(Vector3f lightingVector1, Vector3f lightingVector2)
    • setupGui3DDiffuseLighting

      public static void setupGui3DDiffuseLighting(Vector3f lightingVector1, Vector3f lightingVector2)
    • beginInitialization

      public static void beginInitialization()
    • finishInitialization

      public static void finishInitialization()
    • renderThreadTesselator

      public static Tesselator renderThreadTesselator()
    • defaultBlendFunc

      public static void defaultBlendFunc()
    • setShader

      @Nullable public static CompiledShaderProgram setShader(ShaderProgram shader)
    • setShader

      public static void setShader(CompiledShaderProgram shader)
    • clearShader

      public static void clearShader()
    • getShader

      @Nullable public static CompiledShaderProgram getShader()
    • setShaderTexture

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

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

      public static int getShaderTexture(int shaderTexture)
    • setProjectionMatrix

      public static void setProjectionMatrix(Matrix4f projectionMatrix, ProjectionType projectionType)
    • setTextureMatrix

      public static void setTextureMatrix(Matrix4f textureMatrix)
    • resetTextureMatrix

      public static void resetTextureMatrix()
    • backupProjectionMatrix

      public static void backupProjectionMatrix()
    • restoreProjectionMatrix

      public static void restoreProjectionMatrix()
    • getProjectionMatrix

      public static Matrix4f getProjectionMatrix()
    • getModelViewMatrix

      public static Matrix4f getModelViewMatrix()
    • getModelViewStack

      public static Matrix4fStack getModelViewStack()
    • getTextureMatrix

      public static 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()
    • getProjectionType

      public static ProjectionType getProjectionType()
    • backupGlState

      public static void backupGlState(GlStateBackup state)
    • restoreGlState

      public static void restoreGlState(GlStateBackup state)