Package com.mojang.blaze3d.systems
Class RenderSystem
java.lang.Object
com.mojang.blaze3d.systems.RenderSystem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
(package private) static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static String
private static GpuDevice
private static double
(package private) static final org.slf4j.Logger
static final int
private static final org.joml.Vector3f
private static final org.joml.Matrix4fStack
private static final ArrayListDeque
<RenderSystem.GpuAsyncTask> private static final PipelineModifierStack
private static final AtomicLong
private static final AtomicBoolean
private static org.joml.Matrix4f
private static ProjectionType
private static GpuBuffer
private static Thread
private static org.joml.Matrix4f
private static ProjectionType
static final ScissorState
private static final float[]
private static FogParameters
private static float
private static float
private static final org.joml.Vector3f[]
private static float
private static final GpuTexture[]
private static final RenderSystem.AutoStorageIndexBuffer
private static final RenderSystem.AutoStorageIndexBuffer
private static final RenderSystem.AutoStorageIndexBuffer
static StencilTest
static final int
private static org.joml.Matrix4f
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderPipeline
applyPipelineModifiers
(RenderPipeline pipeline) static void
static void
private static IllegalStateException
static void
static void
static void
enableScissor
(int pX, int pY, int pWidth, int pHeight) static void
enableStencil
(StencilTest stencilTest) static void
static void
static void
flipFrame
(long pWindow, TracyFrameCapture pTracyFrameCapture) static String
static String
static GpuDevice
static org.joml.Vector3f
static org.joml.Matrix4f
static org.joml.Matrix4fStack
static org.joml.Matrix4f
static ProjectionType
static GpuBuffer
getSequentialBuffer
(VertexFormat.Mode pFormatMode) static float[]
static FogParameters
static float
static float
static org.joml.Vector3f[]
static float
static GpuTexture
getShaderTexture
(int pIndex) static org.joml.Matrix4f
static TimeSource.NanoTimeSource
static void
initRenderer
(long pWindow, int pGlDebugVerbosity, boolean pSynchronous, BiFunction<ResourceLocation, ShaderType, String> pDefaultShaderSource, boolean pRenderDebugLabels) static void
static boolean
static boolean
static void
limitDisplayFPS
(int pFrameRateLimit) static void
lineWidth
(float pShaderLineWidth) private static void
static void
Neo: Pop the lastPipelineModifier
off the modifier stackstatic void
pushPipelineModifier
(ResourceKey<PipelineModifier> modifier) Neo: Push the providedPipelineModifier
to be applied to subsequent rendering.static void
queueFencedTask
(Runnable pTask) static void
renderWithPipelineModifier
(ResourceKey<PipelineModifier> modifier, Runnable renderTask) Neo: Run the providedRunnable
with the providedPipelineModifier
applied to the pipelines used by the rendering done in theRunnable
static void
static void
static void
static void
setErrorCallback
(org.lwjgl.glfw.GLFWErrorCallbackI pCallback) static void
setModelOffset
(float pX, float pY, float pZ) static void
setProjectionMatrix
(org.joml.Matrix4f pProjectionMatrix, ProjectionType pProjectionType) static void
setShaderColor
(float pRed, float pGreen, float pBlue, float pAlpha) static void
setShaderFog
(FogParameters pShaderFog) static void
setShaderGameTime
(long pTickTime, float pPartialTicks) static void
setShaderGlintAlpha
(double pShaderGlintAlpha) static void
setShaderGlintAlpha
(float pShaderGlintAlpha) static void
setShaderLights
(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) static void
setShaderTexture
(int pIndex, GpuTexture pTexture) static void
setTextureMatrix
(org.joml.Matrix4f pTextureMatrix) static void
static void
setupGui3DDiffuseLighting
(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2) static void
setupGuiFlatDiffuseLighting
(org.joml.Vector3f pLightingVector1, org.joml.Vector3f pLightingVector2) static void
setupLevelDiffuseLighting
(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) static void
setupOverlayColor
(GpuTexture pOverlayColor) static void
static GpuDevice
-
Field Details
-
SCISSOR_STATE
-
STENCIL_TEST
-
LOGGER
static final org.slf4j.Logger LOGGER -
MINIMUM_ATLAS_TEXTURE_SIZE
public static final int MINIMUM_ATLAS_TEXTURE_SIZE- See Also:
-
renderThread
-
DEVICE
-
lastDrawTime
private static double lastDrawTime -
projectionMatrix
private static org.joml.Matrix4f projectionMatrix -
savedProjectionMatrix
private static org.joml.Matrix4f savedProjectionMatrix -
projectionType
-
savedProjectionType
-
modelViewStack
private static final org.joml.Matrix4fStack modelViewStack -
textureMatrix
private static org.joml.Matrix4f textureMatrix -
TEXTURE_COUNT
public static final int TEXTURE_COUNT- See Also:
-
shaderTextures
-
shaderColor
private static final float[] shaderColor -
shaderGlintAlpha
private static float shaderGlintAlpha -
shaderFog
-
shaderLightDirections
private static final org.joml.Vector3f[] shaderLightDirections -
shaderGameTime
private static float shaderGameTime -
modelOffset
private static final org.joml.Vector3f modelOffset -
shaderLineWidth
private static float shaderLineWidth -
apiDescription
-
pollEventsWaitStart
-
pollingEvents
-
QUAD_VERTEX_BUFFER
-
PENDING_FENCES
-
PIPELINE_MODIFIERS
-
-
Constructor Details
-
RenderSystem
public RenderSystem()
-
-
Method Details
-
initRenderThread
public static void initRenderThread() -
isOnRenderThread
public static boolean isOnRenderThread() -
assertOnRenderThread
public static void assertOnRenderThread() -
constructThreadException
-
pollEvents
private static void pollEvents() -
isFrozenAtPollEvents
public static boolean isFrozenAtPollEvents() -
flipFrame
-
limitDisplayFPS
public static void limitDisplayFPS(int pFrameRateLimit) -
enableScissor
public static void enableScissor(int pX, int pY, int pWidth, int pHeight) -
disableScissor
public static void disableScissor() -
enableStencil
-
disableStencil
public static void disableStencil() -
setShaderFog
-
getShaderFog
-
setShaderGlintAlpha
public static void setShaderGlintAlpha(double pShaderGlintAlpha) -
setShaderGlintAlpha
public static void setShaderGlintAlpha(float pShaderGlintAlpha) -
getShaderGlintAlpha
public static float getShaderGlintAlpha() -
setShaderLights
public static void setShaderLights(org.joml.Vector3f pLightingVector0, org.joml.Vector3f pLightingVector1) -
getShaderLights
public static org.joml.Vector3f[] getShaderLights() -
setShaderColor
public static void setShaderColor(float pRed, float pGreen, float pBlue, float pAlpha) -
getShaderColor
public static float[] getShaderColor() -
lineWidth
public static void lineWidth(float pShaderLineWidth) -
getShaderLineWidth
public static float getShaderLineWidth() -
getBackendDescription
-
getApiDescription
-
initBackendSystem
-
initRenderer
public static void initRenderer(long pWindow, int pGlDebugVerbosity, boolean pSynchronous, BiFunction<ResourceLocation, ShaderType, String> pDefaultShaderSource, boolean pRenderDebugLabels) -
setErrorCallback
public static void setErrorCallback(org.lwjgl.glfw.GLFWErrorCallbackI pCallback) -
setupDefaultState
public static void setupDefaultState() -
setupOverlayColor
-
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) -
setShaderTexture
-
getShaderTexture
-
setProjectionMatrix
public static void setProjectionMatrix(org.joml.Matrix4f pProjectionMatrix, ProjectionType pProjectionType) -
setTextureMatrix
public static void setTextureMatrix(org.joml.Matrix4f pTextureMatrix) -
resetTextureMatrix
public static void resetTextureMatrix() -
backupProjectionMatrix
public static void backupProjectionMatrix() -
restoreProjectionMatrix
public 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() -
getProjectionType
-
getQuadVertexBuffer
-
setModelOffset
public static void setModelOffset(float pX, float pY, float pZ) -
resetModelOffset
public static void resetModelOffset() -
getModelOffset
public static org.joml.Vector3f getModelOffset() -
queueFencedTask
-
executePendingTasks
public static void executePendingTasks() -
getDevice
-
tryGetDevice
-
pushPipelineModifier
Neo: Push the providedPipelineModifier
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 lastPipelineModifier
off the modifier stack -
renderWithPipelineModifier
public static void renderWithPipelineModifier(ResourceKey<PipelineModifier> modifier, Runnable renderTask) Neo: Run the providedRunnable
with the providedPipelineModifier
applied to the pipelines used by the rendering done in theRunnable
-
applyPipelineModifiers
-
ensurePipelineModifiersEmpty
@Internal public static void ensurePipelineModifiersEmpty()
-