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 Stringprivate static GpuDeviceprivate static double(package private) static final org.slf4j.Loggerstatic final intprivate static final org.joml.Vector3fprivate static final org.joml.Matrix4fStackprivate static final ArrayListDeque<RenderSystem.GpuAsyncTask> private static final PipelineModifierStackprivate static final AtomicLongprivate static final AtomicBooleanprivate static org.joml.Matrix4fprivate static ProjectionTypeprivate static GpuBufferprivate static Threadprivate static org.joml.Matrix4fprivate static ProjectionTypestatic final ScissorStateprivate static final float[]private static FogParametersprivate static floatprivate static floatprivate static final org.joml.Vector3f[]private static floatprivate static final GpuTexture[]private static final RenderSystem.AutoStorageIndexBufferprivate static final RenderSystem.AutoStorageIndexBufferprivate static final RenderSystem.AutoStorageIndexBufferstatic StencilTeststatic final intprivate static org.joml.Matrix4f -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderPipelineapplyPipelineModifiers(RenderPipeline pipeline) static voidstatic voidprivate static IllegalStateExceptionstatic voidstatic voidstatic voidenableScissor(int x, int y, int width, int height) static voidenableStencil(StencilTest stencilTest) static voidstatic voidstatic voidflipFrame(long window, TracyFrameCapture tracyFrameCapture) static Stringstatic Stringstatic GpuDevicestatic org.joml.Vector3fstatic org.joml.Matrix4fstatic org.joml.Matrix4fStackstatic org.joml.Matrix4fstatic ProjectionTypestatic GpuBuffergetSequentialBuffer(VertexFormat.Mode formatMode) static float[]static FogParametersstatic floatstatic floatstatic org.joml.Vector3f[]static floatstatic GpuTexturegetShaderTexture(int index) static org.joml.Matrix4fstatic TimeSource.NanoTimeSourcestatic voidinitRenderer(long window, int glDebugVerbosity, boolean synchronous, BiFunction<ResourceLocation, ShaderType, String> defaultShaderSource, boolean renderDebugLabels) static voidstatic booleanstatic booleanstatic voidlimitDisplayFPS(int frameRateLimit) static voidlineWidth(float shaderLineWidth) private static voidstatic voidNeo: Pop the lastPipelineModifieroff the modifier stackstatic voidpushPipelineModifier(ResourceKey<PipelineModifier> modifier) Neo: Push the providedPipelineModifierto be applied to subsequent rendering.static voidqueueFencedTask(Runnable task) static voidrenderWithPipelineModifier(ResourceKey<PipelineModifier> modifier, Runnable renderTask) Neo: Run the providedRunnablewith the providedPipelineModifierapplied to the pipelines used by the rendering done in theRunnablestatic voidstatic voidstatic voidstatic voidsetErrorCallback(org.lwjgl.glfw.GLFWErrorCallbackI callback) static voidsetModelOffset(float x, float y, float z) static voidsetProjectionMatrix(org.joml.Matrix4f projectionMatrix, ProjectionType projectionType) static voidsetShaderColor(float red, float green, float blue, float alpha) static voidsetShaderFog(FogParameters shaderFog) static voidsetShaderGameTime(long tickTime, float partialTicks) static voidsetShaderGlintAlpha(double shaderGlintAlpha) static voidsetShaderGlintAlpha(float shaderGlintAlpha) static voidsetShaderLights(org.joml.Vector3f lightingVector0, org.joml.Vector3f lightingVector1) static voidsetShaderTexture(int index, GpuTexture texture) static voidsetTextureMatrix(org.joml.Matrix4f textureMatrix) static voidstatic voidsetupGui3DDiffuseLighting(org.joml.Vector3f lightingVector1, org.joml.Vector3f lightingVector2) static voidsetupGuiFlatDiffuseLighting(org.joml.Vector3f lightingVector1, org.joml.Vector3f lightingVector2) static voidsetupLevelDiffuseLighting(org.joml.Vector3f lightingVector0, org.joml.Vector3f lightingVector1) static voidsetupOverlayColor(GpuTexture overlayColor) static voidstatic 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 frameRateLimit) -
enableScissor
public static void enableScissor(int x, int y, int width, int height) -
disableScissor
public static void disableScissor() -
enableStencil
-
disableStencil
public static void disableStencil() -
setShaderFog
-
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(org.joml.Vector3f lightingVector0, org.joml.Vector3f lightingVector1) -
getShaderLights
public static org.joml.Vector3f[] getShaderLights() -
setShaderColor
public static void setShaderColor(float red, float green, float blue, float alpha) -
getShaderColor
public static float[] getShaderColor() -
lineWidth
public static void lineWidth(float shaderLineWidth) -
getShaderLineWidth
public static float getShaderLineWidth() -
getBackendDescription
-
getApiDescription
-
initBackendSystem
-
initRenderer
public static void initRenderer(long window, int glDebugVerbosity, boolean synchronous, BiFunction<ResourceLocation, ShaderType, String> defaultShaderSource, boolean renderDebugLabels) -
setErrorCallback
public static void setErrorCallback(org.lwjgl.glfw.GLFWErrorCallbackI callback) -
setupDefaultState
public static void setupDefaultState() -
setupOverlayColor
-
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) -
setShaderTexture
-
getShaderTexture
-
setProjectionMatrix
public static void setProjectionMatrix(org.joml.Matrix4f projectionMatrix, ProjectionType projectionType) -
setTextureMatrix
public static void setTextureMatrix(org.joml.Matrix4f textureMatrix) -
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
-
setShaderGameTime
public static void setShaderGameTime(long tickTime, float partialTicks) -
getShaderGameTime
public static float getShaderGameTime() -
getProjectionType
-
getQuadVertexBuffer
-
setModelOffset
public static void setModelOffset(float x, float y, float z) -
resetModelOffset
public static void resetModelOffset() -
getModelOffset
public static org.joml.Vector3f getModelOffset() -
queueFencedTask
-
executePendingTasks
public static void executePendingTasks() -
getDevice
-
tryGetDevice
-
pushPipelineModifier
Neo: Push the providedPipelineModifierto 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 lastPipelineModifieroff the modifier stack -
renderWithPipelineModifier
public static void renderWithPipelineModifier(ResourceKey<PipelineModifier> modifier, Runnable renderTask) Neo: Run the providedRunnablewith the providedPipelineModifierapplied to the pipelines used by the rendering done in theRunnable -
applyPipelineModifiers
-
ensurePipelineModifiersEmpty
@Internal public static void ensurePipelineModifiersEmpty()
-