Class GuiRenderer
java.lang.Object
net.minecraft.client.gui.render.GuiRenderer
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intstatic final Vector4fcprivate final CubeMapstatic final intprivate final List<GuiRenderer.Draw> private static final Comparator<GuiElementRenderState> private final FeatureRenderDispatcherprivate intstatic final intstatic final intprivate static final floatprivate final Projectionprivate final ProjectionMatrixBufferprivate @Nullable GuiItemAtlasprivate static final org.slf4j.Loggerprivate static final floatstatic final floatprivate final Map<Object, OversizedItemRenderer> private final Map<Class<? extends PictureInPictureRenderState>, PictureInPictureRendererPool<?>> private final Set<PictureInPictureRenderState> private @Nullable StagedVertexBuffer.Drawprivate @Nullable RenderPipelineprivate @Nullable ScreenRectangleprivate @Nullable TextureSetupprivate final GuiRenderStateprivate static final Comparator<ScreenRectangle> private static final Comparator<TextureSetup> private final StagedVertexBuffer -
Constructor Summary
ConstructorsConstructorDescriptionGuiRenderer(GuiRenderState renderState, FeatureRenderDispatcher featureRenderDispatcher, List<PictureInPictureRendererRegistration<?>> pipRendererFactories) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate voidaddElementToMesh(GuiElementRenderState elementState) private voidvoidclose()private voiddraw()private voidenableScissor(ScreenRectangle rectangle, RenderPass renderPass) voidendFrame()private voidexecuteDraw(GuiRenderer.Draw draw, RenderPass renderPass) private voidexecuteDrawRange(Supplier<String> label, RenderTarget mainRenderTarget, GpuBufferSlice dynamicTransforms, int startIndex, int endIndex) private intprivate voidprivate voidprepare()private GuiItemAtlasprepareItemAtlas(Set<Object> itemsInFrame, int slotTextureSize) private voidprivate voidprivate <T extends PictureInPictureRenderState>
booleanpreparePictureInPictureState(T picturesInPictureState, int guiScale, boolean firstPass) private voidvoidregisterPanoramaTextures(TextureManager textureManager) voidrender()private booleanscissorChanged(@Nullable ScreenRectangle newScissor, @Nullable ScreenRectangle oldScissor) private voidsubmitBlitFromItemAtlas(GuiItemRenderState itemState, GuiItemAtlas.SlotView slotView)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAX_GUI_Z
private static final float MAX_GUI_Z- See Also:
-
MIN_GUI_Z
public static final float MIN_GUI_Z- See Also:
-
GUI_Z_NEAR
private static final float GUI_Z_NEAR- See Also:
-
GUI_3D_Z_FAR
public static final int GUI_3D_Z_FAR- See Also:
-
GUI_3D_Z_NEAR
public static final int GUI_3D_Z_NEAR- See Also:
-
DEFAULT_ITEM_SIZE
public static final int DEFAULT_ITEM_SIZE- See Also:
-
CLEAR_COLOR
-
SCISSOR_COMPARATOR
-
TEXTURE_COMPARATOR
-
ELEMENT_SORT_COMPARATOR
-
oversizedItemRenderers
-
renderState
-
draws
-
vertexBuffer
-
firstDrawIndexAfterBlur
private int firstDrawIndexAfterBlur -
guiProjection
-
guiProjectionMatrixBuffer
-
featureRenderDispatcher
-
pictureInPictureRendererPools
private final Map<Class<? extends PictureInPictureRenderState>, PictureInPictureRendererPool<?>> pictureInPictureRendererPools -
pictureInPictureRenderStatesScratch
-
itemAtlas
-
cachedGuiScale
private int cachedGuiScale -
cubeMap
-
previousScissorArea
-
previousPipeline
-
previousTextureSetup
-
previousDraw
-
-
Constructor Details
-
GuiRenderer
public GuiRenderer(GuiRenderState renderState, FeatureRenderDispatcher featureRenderDispatcher, List<PictureInPictureRendererRegistration<?>> pipRendererFactories)
-
-
Method Details
-
endFrame
public void endFrame() -
render
public void render() -
clearUnusedOversizedItemRenderers
private void clearUnusedOversizedItemRenderers() -
prepare
private void prepare() -
addElementsToMeshes
-
draw
private void draw() -
executeDrawRange
private void executeDrawRange(Supplier<String> label, RenderTarget mainRenderTarget, GpuBufferSlice dynamicTransforms, int startIndex, int endIndex) -
addElementToMesh
-
prepareText
private void prepareText() -
prepareItemElements
private void prepareItemElements() -
preparePictureInPicture
private void preparePictureInPicture() -
preparePictureInPictureState
private <T extends PictureInPictureRenderState> boolean preparePictureInPictureState(T picturesInPictureState, int guiScale, boolean firstPass) -
submitBlitFromItemAtlas
-
prepareItemAtlas
-
getGuiScaleInvalidatingItemAtlasIfChanged
private int getGuiScaleInvalidatingItemAtlasIfChanged() -
invalidateItemAtlas
private void invalidateItemAtlas() -
executeDraw
-
registerPanoramaTextures
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-