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 DynamicUniformsprivate static GpuBufferprivate static double(package private) static final org.slf4j.Loggerstatic final intprivate static final Vector3fprivate static final Matrix4fStackstatic GpuTextureViewstatic GpuTextureViewprivate static final ArrayListDeque<RenderSystem.GpuAsyncTask> private static final PipelineModifierStackprivate static final AtomicLongprivate static final AtomicBooleanstatic final intprivate static GpuBufferSliceprivate static ProjectionTypeprivate static GpuBufferprivate static Threadprivate static GpuBufferSliceprivate static ProjectionTypeprivate static ScissorStateprivate static GpuBufferSliceprivate static GpuBufferSliceprivate static floatprivate static final GpuTextureView[]private static final RenderSystem.AutoStorageIndexBufferprivate static final RenderSystem.AutoStorageIndexBufferprivate static final RenderSystem.AutoStorageIndexBufferstatic final intprivate static Matrix4f -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RenderPipelineapplyPipelineModifiers(RenderPipeline pipeline) static voidstatic voidstatic voidbindDefaultUniforms(RenderPass renderPass) private static IllegalStateExceptionstatic voidstatic voidenableScissorForRenderTypeDraws(int x, int y, int width, int height) static voidstatic voidstatic voidflipFrame(long window, TracyFrameCapture tracyFrameCapture) static Stringstatic Stringstatic GpuDevicestatic DynamicUniformsstatic GpuBufferstatic Vector3fstatic Matrix4fstatic Matrix4fStackstatic GpuBufferSlicestatic ProjectionTypestatic GpuBufferstatic ScissorStategetSequentialBuffer(VertexFormat.Mode formatMode) static GpuBufferSlicestatic GpuBufferSlicestatic floatstatic GpuTextureViewgetShaderTexture(int id) static 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 voidsetGlobalSettingsUniform(GpuBuffer globalSettingsUniform) static voidsetModelOffset(float x, float y, float z) static voidsetProjectionMatrix(GpuBufferSlice projectionMatrixBuffer, ProjectionType projectionType) static voidsetShaderFog(GpuBufferSlice shaderFog) static voidsetShaderLights(GpuBufferSlice shaderLights) static voidsetShaderTexture(int textureId, GpuTextureView texture) static voidsetTextureMatrix(Matrix4f textureMatrix) static voidstatic voidsetupOverlayColor(GpuTextureView texture) static voidstatic GpuDevice
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
MINIMUM_ATLAS_TEXTURE_SIZE
public static final int MINIMUM_ATLAS_TEXTURE_SIZE- See Also:
-
PROJECTION_MATRIX_UBO_SIZE
public static final int PROJECTION_MATRIX_UBO_SIZE -
renderThread
-
DEVICE
-
lastDrawTime
private static double lastDrawTime -
projectionType
-
savedProjectionType
-
modelViewStack
-
textureMatrix
-
TEXTURE_COUNT
public static final int TEXTURE_COUNT- See Also:
-
shaderTextures
-
shaderFog
-
shaderLightDirections
-
projectionMatrixBuffer
-
savedProjectionMatrixBuffer
-
modelOffset
-
shaderLineWidth
private static float shaderLineWidth -
apiDescription
-
pollEventsWaitStart
-
pollingEvents
-
QUAD_VERTEX_BUFFER
-
PENDING_FENCES
-
outputColorTextureOverride
-
outputDepthTextureOverride
-
globalSettingsUniform
-
dynamicUniforms
-
scissorStateForRenderTypeDraws
-
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) -
setShaderFog
-
getShaderFog
-
setShaderLights
-
getShaderLights
-
lineWidth
public static void lineWidth(float shaderLineWidth) -
getShaderLineWidth
public static float getShaderLineWidth() -
enableScissorForRenderTypeDraws
public static void enableScissorForRenderTypeDraws(int x, int y, int width, int height) -
disableScissorForRenderTypeDraws
public static void disableScissorForRenderTypeDraws() -
getScissorStateForRenderTypeDraws
-
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() -
setShaderTexture
-
getShaderTexture
-
setProjectionMatrix
public static void setProjectionMatrix(GpuBufferSlice projectionMatrixBuffer, ProjectionType projectionType) -
setTextureMatrix
-
resetTextureMatrix
public static void resetTextureMatrix() -
backupProjectionMatrix
public static void backupProjectionMatrix() -
restoreProjectionMatrix
public static void restoreProjectionMatrix() -
getProjectionMatrixBuffer
-
getModelViewMatrix
-
getModelViewStack
-
getTextureMatrix
-
getSequentialBuffer
-
setGlobalSettingsUniform
-
getGlobalSettingsUniform
-
getProjectionType
-
getQuadVertexBuffer
-
setModelOffset
public static void setModelOffset(float x, float y, float z) -
resetModelOffset
public static void resetModelOffset() -
getModelOffset
-
queueFencedTask
-
executePendingTasks
public static void executePendingTasks() -
getDevice
-
tryGetDevice
-
getDynamicUniforms
-
bindDefaultUniforms
-
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()
-