Package com.mojang.blaze3d.systems
Class RenderSystem
java.lang.Object
com.mojang.blaze3d.systems.RenderSystem
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Stringprivate static booleanprivate static double(package private) static final org.slf4j.Loggerprivate static intprivate static final intprivate static org.joml.Matrix4fprivate static final org.joml.Matrix4fStackprivate static final AtomicLongprivate static final AtomicBooleanprivate static org.joml.Matrix4fprivate static final ConcurrentLinkedQueue<RenderCall> private static final Tesselatorprivate static Threadprivate static org.joml.Matrix4fprivate static VertexSortingprivate static ShaderInstanceprivate static final float[]private static final float[]private static floatprivate static FogShapeprivate static floatprivate static floatprivate static floatprivate static final org.joml.Vector3f[]private static floatprivate static final int[]private static final RenderSystem.AutoStorageIndexBufferprivate static final RenderSystem.AutoStorageIndexBufferprivate static final RenderSystem.AutoStorageIndexBufferprivate static org.joml.Matrix4fprivate static VertexSorting -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprivate static voidprivate static void_setShaderColor(float pRed, float pGreen, float pBlue, float pAlpha) static void_setShaderTexture(int pShaderTexture, int pTextureId) static void_setShaderTexture(int pShaderTexture, ResourceLocation pTextureId) static voidactiveTexture(int pTexture) static voidstatic voidstatic voidstatic voidbackupGlState(GlStateBackup state) static voidstatic voidstatic voidbindTexture(int pTexture) static voidbindTextureForSetup(int pTexture) static voidblendEquation(int pMode) static voidblendFunc(int pSourceFactor, int pDestFactor) static voidblendFunc(GlStateManager.SourceFactor pSourceFactor, GlStateManager.DestFactor pDestFactor) static voidblendFuncSeparate(int pSourceFactor, int pDestFactor, int pSourceFactorAlpha, int pDestFactorAlpha) static voidblendFuncSeparate(GlStateManager.SourceFactor pSourceFactor, GlStateManager.DestFactor pDestFactor, GlStateManager.SourceFactor pSourceFactorAlpha, GlStateManager.DestFactor pDestFactorAlpha) static voidclear(int pMask, boolean pCheckError) static voidclearColor(float pRed, float pGreen, float pBlue, float pAlpha) static voidclearDepth(double pDepth) static voidclearStencil(int pIndex) static voidcolorMask(boolean pRed, boolean pGreen, boolean pBlue, boolean pAlpha) private static IllegalStateExceptionstatic voidstatic voiddeleteTexture(int pTexture) static voiddepthFunc(int pDepthFunc) static voiddepthMask(boolean pFlag) static voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voiddrawElements(int pMode, int pCount, int pType) static voidstatic voidstatic voidstatic voidstatic voidstatic voidenableScissor(int pX, int pY, int pWidth, int pHeight) static voidstatic voidflipFrame(long pWindowId) static Stringstatic Stringstatic Stringstatic org.joml.Matrix4fstatic org.joml.Matrix4fStackstatic org.joml.Matrix4fgetSequentialBuffer(VertexFormat.Mode pFormatMode) static ShaderInstancestatic float[]static float[]static floatstatic FogShapestatic floatstatic floatstatic floatstatic floatstatic intgetShaderTexture(int pShaderTexture) static voidstatic org.joml.Matrix4fstatic VertexSortingstatic voidglBindBuffer(int pTarget, int pBuffer) static voidglBindVertexArray(int pArray) static voidglBufferData(int pTarget, ByteBuffer pData, int pUsage) static voidglDeleteBuffers(int pBuffer) static voidglDeleteVertexArrays(int pArray) static voidglGenBuffers(Consumer<Integer> pBufferIdConsumer) static voidglGenVertexArrays(Consumer<Integer> pArrayObjectIdConsumer) static voidglUniform1(int pLocation, FloatBuffer pValue) static voidglUniform1(int pLocation, IntBuffer pValue) static voidglUniform1i(int pLocation, int pValue) static voidglUniform2(int pLocation, FloatBuffer pValue) static voidglUniform2(int pLocation, IntBuffer pValue) static voidglUniform3(int pLocation, FloatBuffer pValue) static voidglUniform3(int pLocation, IntBuffer pValue) static voidglUniform4(int pLocation, FloatBuffer pValue) static voidglUniform4(int pLocation, IntBuffer pValue) static voidglUniformMatrix2(int pLocation, boolean pTranspose, FloatBuffer pValue) static voidglUniformMatrix3(int pLocation, boolean pTranspose, FloatBuffer pValue) static voidglUniformMatrix4(int pLocation, boolean pTranspose, FloatBuffer pValue) static TimeSource.NanoTimeSourcestatic voidinitRenderer(int pDebugVerbosity, boolean pSynchronous) static voidstatic booleanstatic booleanstatic booleanstatic voidlimitDisplayFPS(int pFrameRateLimit) static voidlineWidth(float pShaderLineWidth) static voidstatic intstatic voidpixelStore(int pParameterName, int pParameter) private static voidstatic voidpolygonMode(int pFace, int pMode) static voidpolygonOffset(float pFactor, float pUnits) static voidreadPixels(int pX, int pY, int pWidth, int pHeight, int pFormat, int pType, ByteBuffer pPixels) static voidrecordRenderCall(RenderCall pRenderCall) static voidrenderCrosshair(int pLineLength) static Tesselatorstatic voidstatic voidstatic voidrestoreGlState(GlStateBackup state) static voidstatic voidrunAsFancy(Runnable pFancyRunnable) Deprecated.static voidsetErrorCallback(org.lwjgl.glfw.GLFWErrorCallbackI pCallback) static voidsetProjectionMatrix(org.joml.Matrix4f pProjectionMatrix, VertexSorting pVertexSorting) static voidsetShader(Supplier<ShaderInstance> pShaderSupplier) static voidsetShaderColor(float pRed, float pGreen, float pBlue, float pAlpha) static voidsetShaderFogColor(float pRed, float pGreen, float pBlue) static voidsetShaderFogColor(float pRed, float pGreen, float pBlue, float pAlpha) static voidsetShaderFogEnd(float pShaderFogEnd) static voidsetShaderFogShape(FogShape pShaderFogShape) static voidsetShaderFogStart(float pShaderFogStart) static voidsetShaderGameTime(long pTickTime, float pPartialTicks) static voidsetShaderGlintAlpha(double pShaderGlintAlpha) static voidsetShaderGlintAlpha(float pShaderGlintAlpha) static voidsetShaderLights(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) static voidsetShaderTexture(int pShaderTexture, int pTextureId) static voidsetShaderTexture(int pShaderTexture, ResourceLocation pTextureId) static voidsetTextureMatrix(org.joml.Matrix4f pTextureMatrix) static voidsetupDefaultState(int pX, int pY, int pWidth, int pHeight) static voidsetupGui3DDiffuseLighting(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2) static voidsetupGuiFlatDiffuseLighting(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2) static voidsetupLevelDiffuseLighting(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) static voidsetupOverlayColor(int pTextureId, int pColor) static voidsetupShaderLights(ShaderInstance pInstance) static voidstencilFunc(int pFunc, int pRef, int pMask) static voidstencilMask(int pMask) static voidstencilOp(int pSFail, int pDpFail, int pDpPass) static voidstatic voidtexParameter(int pTarget, int pParameterName, int pParameter) static voidviewport(int pX, int pY, int pWidth, int pHeight)
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
recordingQueue
-
RENDER_THREAD_TESSELATOR
-
MINIMUM_ATLAS_TEXTURE_SIZE
private static final int MINIMUM_ATLAS_TEXTURE_SIZE- See Also:
-
renderThread
-
MAX_SUPPORTED_TEXTURE_SIZE
private static int MAX_SUPPORTED_TEXTURE_SIZE -
isInInit
private static boolean isInInit -
lastDrawTime
private static double lastDrawTime -
projectionMatrix
private static org.joml.Matrix4f projectionMatrix -
savedProjectionMatrix
private static org.joml.Matrix4f savedProjectionMatrix -
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
-
shaderLightDirections
private static final org.joml.Vector3f[] shaderLightDirections -
shaderGameTime
private static float shaderGameTime -
shaderLineWidth
private static float shaderLineWidth -
apiDescription
-
shader
-
pollEventsWaitStart
-
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
-
recordRenderCall
-
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
-
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
-
getShaderFogShape
-
setShaderLights
public static void setShaderLights(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) -
setupShaderLights
-
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
-
getBackendDescription
-
getApiDescription
-
initBackendSystem
-
initRenderer
public static void initRenderer(int pDebugVerbosity, boolean pSynchronous) -
setErrorCallback
public static void setErrorCallback(org.lwjgl.glfw.GLFWErrorCallbackI pCallback) -
renderCrosshair
public static void renderCrosshair(int pLineLength) -
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
-
glDeleteBuffers
public static void glDeleteBuffers(int pBuffer) -
glDeleteVertexArrays
public static void glDeleteVertexArrays(int pArray) -
glUniform1i
public static void glUniform1i(int pLocation, int pValue) -
glUniform1
-
glUniform2
-
glUniform3
-
glUniform4
-
glUniform1
-
glUniform2
-
glUniform3
-
glUniform4
-
glUniformMatrix2
-
glUniformMatrix3
-
glUniformMatrix4
-
setupOverlayColor
public static void setupOverlayColor(int pTextureId, int pColor) -
teardownOverlayColor
public static void teardownOverlayColor() -
setupLevelDiffuseLighting
public static void setupLevelDiffuseLighting(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) -
setupGuiFlatDiffuseLighting
public static void setupGuiFlatDiffuseLighting(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2) -
setupGui3DDiffuseLighting
public static void setupGui3DDiffuseLighting(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2) -
beginInitialization
public static void beginInitialization() -
finishInitialization
public static void finishInitialization() -
glGenBuffers
-
glGenVertexArrays
-
renderThreadTesselator
-
defaultBlendFunc
public static void defaultBlendFunc() -
runAsFancy
Deprecated. -
setShader
-
getShader
-
setShaderTexture
-
_setShaderTexture
-
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 pProjectionMatrix, VertexSorting pVertexSorting) -
setTextureMatrix
public static void setTextureMatrix(org.joml.Matrix4f pTextureMatrix) -
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
-
backupGlState
-
restoreGlState
-