framebuffer, screenshots, gl info (#2402)

Signed-off-by: liach <liach@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2021-05-19 19:45:15 +07:00 committed by GitHub
parent 9d4a721df1
commit 9d99817d84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 152 additions and 11 deletions

View File

@ -5,5 +5,7 @@ CLASS net/minecraft/class_4494 com/mojang/blaze3d/platform/GlDebugInfo
METHOD method_22091 getVersion ()Ljava/lang/String;
METHOD method_35611 allocateMemory (I)Ljava/nio/ByteBuffer;
ARG 0 size
METHOD method_35612 feedTo (Lnet/minecraft/class_6184;)V
ARG 0 consumer
METHOD method_35613 freeMemory (Ljava/nio/Buffer;)V
ARG 0 buffer

View File

@ -1,2 +1,27 @@
CLASS net/minecraft/class_4491 com/mojang/blaze3d/systems/RenderCallStorage
COMMENT A storage of render calls with recording and processing states. It exposes
COMMENT three queues: a recording queue, a processing queue, and a last processed
COMMENT queue. The recording queue is equal to the processing queue during processing
COMMENT and different during recording.
COMMENT
COMMENT <p>This storage appears to be a work in progress, as its processing currently
COMMENT performs no operation.
FIELD field_20453 recordingQueues Ljava/util/List;
FIELD field_20454 recordingIndex I
FIELD field_20455 processingIndex I
FIELD field_20456 lastProcessedIndex I
FIELD field_31899 recording Z
FIELD field_31900 processing Z
METHOD method_35599 canRecord ()Z
METHOD method_35600 record (Lnet/minecraft/class_4573;)V
ARG 1 call
METHOD method_35601 startRecording ()Z
METHOD method_35602 stopRecording ()V
METHOD method_35603 canProcess ()Z
METHOD method_35604 startProcessing ()Z
METHOD method_35605 process ()V
COMMENT No-op, but it seems like processing by method order and the check in method body.
METHOD method_35606 stopProcessing ()V
METHOD method_35607 getLastProcessedQueue ()Ljava/util/concurrent/ConcurrentLinkedQueue;
METHOD method_35608 getRecordingQueue ()Ljava/util/concurrent/ConcurrentLinkedQueue;
METHOD method_35609 getProcessingQueue ()Ljava/util/concurrent/ConcurrentLinkedQueue;

View File

@ -163,6 +163,10 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
FIELD field_27388 blockEntityRenderDispatcher Lnet/minecraft/class_824;
FIELD field_29569 debugRecorder Lnet/minecraft/class_5962;
FIELD field_33697 resourceReloadLogger Lnet/minecraft/class_6360;
FIELD field_33735 GL_ERROR_DIALOGUE Ljava/lang/String;
COMMENT A message, in English, displayed in a dialog when a GLFW error is encountered.
COMMENT
COMMENT @see net.minecraft.client.util.Window#throwGlError(int, long)
METHOD <init> (Lnet/minecraft/class_542;)V
ARG 1 args
METHOD method_1476 checkIs64Bit ()Z
@ -303,6 +307,7 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
ARG 0 name
ARG 1 displayName
ARG 2 alwaysEnabled
ARG 3 packFactory
ARG 4 metadata
ARG 5 insertionPosition
ARG 6 source
@ -414,8 +419,31 @@ CLASS net/minecraft/class_310 net/minecraft/client/MinecraftClient
METHOD method_34745 toggleDebugProfiler (Ljava/lang/Runnable;Ljava/util/function/Consumer;)V
ARG 1 startAction
ARG 2 completeAction
METHOD method_35698 takePanorama (Ljava/io/File;II)Lnet/minecraft/class_2561;
COMMENT Takes a panorama. The panorama is stored in the given {@code directory}, in
COMMENT where 6 screenshots of size {@code width} and {@code height} will be taken.
COMMENT
COMMENT @return a user-oriented piece of text for screenshot result
ARG 1 directory
ARG 2 width
ARG 3 height
METHOD method_35699 takeHugeScreenshot (Ljava/io/File;IIII)Lnet/minecraft/class_2561;
COMMENT Takes a huge screenshot in the tga file format.
COMMENT
COMMENT <p>The {@code unitWidth} and {@code unitHeight} controls the size of the
COMMENT partial image rendered; it does not affect the screenshot outcome, but may
COMMENT affect the screenshot performance.
COMMENT
COMMENT @return a user-oriented piece of text for screenshot result
ARG 1 gameDirectory
ARG 2 unitWidth
ARG 3 unitHeight
ARG 4 width
ARG 5 height
METHOD method_35702 getCurrentFps ()I
METHOD method_35703 getWorldGenerationProgressTracker ()Lnet/minecraft/class_3953;
METHOD method_35705 addGlInfo (Lnet/minecraft/class_1276;)V
ARG 0 snooper
METHOD method_35706 isRealmsEnabled ()Z
METHOD method_36561 reloadResources (Z)Ljava/util/concurrent/CompletableFuture;
ARG 1 force

View File

@ -10,10 +10,14 @@ CLASS net/minecraft/class_279 net/minecraft/client/gl/ShaderEffect
FIELD field_1500 lastTickDelta F
FIELD field_1501 time F
FIELD field_1502 resourceManager Lnet/minecraft/class_3300;
FIELD field_32770 MAIN_TARGET_NAME Ljava/lang/String;
METHOD <init> (Lnet/minecraft/class_1060;Lnet/minecraft/class_3300;Lnet/minecraft/class_276;Lnet/minecraft/class_2960;)V
ARG 1 textureManager
ARG 2 resourceManager
ARG 3 framebuffer
ARG 4 location
METHOD method_1256 parseEffect (Lnet/minecraft/class_1060;Lnet/minecraft/class_2960;)V
ARG 1 textureManager
ARG 2 location
METHOD method_1257 parsePass (Lnet/minecraft/class_1060;Lcom/google/gson/JsonElement;)V
ARG 2 jsonPass

View File

@ -0,0 +1,6 @@
CLASS net/minecraft/class_6367 net/minecraft/client/gl/SimpleFramebuffer
METHOD <init> (IIZZ)V
ARG 1 width
ARG 2 height
ARG 3 useDepth
ARG 4 getError

View File

@ -0,0 +1,30 @@
CLASS net/minecraft/class_6364 net/minecraft/client/gl/WindowFramebuffer
FIELD field_33724 DEFAULT_WIDTH I
FIELD field_33725 DEFAULT_HEIGHT I
FIELD field_33726 DEFAULT Lnet/minecraft/class_6364$class_6366;
METHOD <init> (II)V
ARG 1 width
ARG 2 height
METHOD method_36801 supportColor (Lnet/minecraft/class_6364$class_6366;)Z
ARG 1 size
METHOD method_36802 initSize (II)V
ARG 1 width
ARG 2 height
METHOD method_36803 supportsDepth (Lnet/minecraft/class_6364$class_6366;)Z
ARG 1 size
METHOD method_36804 findSuitableSize (II)Lnet/minecraft/class_6364$class_6366;
ARG 1 width
ARG 2 height
CLASS class_6365 Attachment
FIELD field_33731 VALUES [Lnet/minecraft/class_6364$class_6365;
METHOD method_36807 with (Lnet/minecraft/class_6364$class_6365;)Lnet/minecraft/class_6364$class_6365;
ARG 1 other
CLASS class_6366 Size
FIELD field_33733 width I
FIELD field_33734 height I
METHOD <init> (II)V
ARG 1 width
ARG 2 height
METHOD method_36808 findCompatible (II)Ljava/util/List;
ARG 0 width
ARG 1 height

View File

@ -209,6 +209,10 @@ CLASS net/minecraft/class_757 net/minecraft/client/render/GameRenderer
METHOD method_34549 getPositionTexColorNormalShader ()Lnet/minecraft/class_5944;
METHOD method_35764 getPositionTexLightmapColorShader ()Lnet/minecraft/class_5944;
METHOD method_35765 isRenderingPanorama ()Z
METHOD method_35766 renderWithZoom (FFF)V
ARG 1 zoom
ARG 2 zoomX
ARG 3 zoomY
METHOD method_35768 setRenderHand (Z)V
ARG 1 renderHand
METHOD method_35769 setBlockOutlineEnabled (Z)V

View File

@ -291,6 +291,7 @@ CLASS net/minecraft/class_761 net/minecraft/client/render/WorldRenderer
METHOD method_34810 getChunkBuilder ()Lnet/minecraft/class_846;
METHOD method_34811 getChunkCount ()D
METHOD method_34812 getViewDistance ()D
METHOD method_35774 reloadTransparencyShader ()V
METHOD method_8562 playSong (Lnet/minecraft/class_3414;Lnet/minecraft/class_2338;)V
ARG 1 song
ARG 2 songPosition

View File

@ -0,0 +1,11 @@
CLASS net/minecraft/class_6184 net/minecraft/client/util/GlInfoConsumer
COMMENT A functional interface with a method to set a key-value pair of information.
COMMENT
COMMENT @see net.minecraft.util.snooper.Snooper#addInitialInfo
METHOD setFixedData (Ljava/lang/String;Ljava/lang/Object;)V
COMMENT Sets a value associated to a key.
COMMENT
COMMENT <p>"Fixed" means immutable or static information; it is not related in any way
COMMENT to data fixers.
ARG 1 key
ARG 2 value

View File

@ -1,3 +1,7 @@
CLASS net/minecraft/class_3673 net/minecraft/client/util/GlfwUtil
METHOD method_15973 makeJvmCrash ()V
METHOD method_15974 getTime ()D
METHOD method_35596 accessRecordingQueue (Lnet/minecraft/class_4491;F)V
ARG 0 storage
METHOD method_35597 accessProcessingQueue (Lnet/minecraft/class_4491;F)V
ARG 0 storage

View File

@ -1,6 +1,22 @@
CLASS net/minecraft/class_318 net/minecraft/client/util/ScreenshotUtils
CLASS net/minecraft/class_318 net/minecraft/client/util/Screenshooter
COMMENT A screenshooter takes screenshots and saves them into tga file format. It also
COMMENT holds a few utility methods for other types of screenshots.
FIELD field_1973 DATE_FORMAT Ljava/text/DateFormat;
FIELD field_1974 LOGGER Lorg/apache/logging/log4j/Logger;
FIELD field_32157 unitHeight I
FIELD field_32158 stream Ljava/io/DataOutputStream;
FIELD field_32159 buffer [B
FIELD field_32160 width I
FIELD field_32161 height I
FIELD field_32162 file Ljava/io/File;
METHOD <init> (Ljava/io/File;III)V
COMMENT Creates a screenshooter for huge screenshots.
COMMENT
COMMENT @see net.minecraft.client.MinecraftClient#takeHugeScreenshot
ARG 1 gameDirectory
ARG 2 width
ARG 3 height
ARG 4 unitHeight
METHOD method_1659 saveScreenshot (Ljava/io/File;IILnet/minecraft/class_276;Ljava/util/function/Consumer;)V
ARG 0 gameDirectory
ARG 1 framebufferWidth
@ -27,3 +43,16 @@ CLASS net/minecraft/class_318 net/minecraft/client/util/ScreenshotUtils
ARG 3 framebufferHeight
ARG 4 framebuffer
ARG 5 messageReceiver
METHOD method_35710 writeToStream ()V
COMMENT Writes the contents in the {@link #buffer} into the {@link #stream}.
METHOD method_35711 getIntoBuffer (Ljava/nio/ByteBuffer;IIII)V
COMMENT Transports image data from {@code data} into {@link #buffer}.
ARG 1 data
ARG 2 startWidth
ARG 3 startHeight
ARG 4 unitWidth
ARG 5 unitHeight
METHOD method_35712 finish ()Ljava/io/File;
COMMENT Finish taking the screenshot and return the complete tga file.
COMMENT
COMMENT @return the tga file

View File

@ -1,10 +0,0 @@
CLASS net/minecraft/class_6184 net/minecraft/unused/FixedDataSetter
COMMENT A functional (single-abstract-method) interface with a method to set fixed
COMMENT data.
COMMENT
COMMENT @apiNote Since the {@link #setFixedData} is not obfuscated, it might have been
COMMENT used by some other (removed) code in a bootstrap method as a lambda. This class
COMMENT is not used anywhere otherwise.
METHOD setFixedData (Ljava/lang/String;Ljava/lang/Object;)V
ARG 1 key
ARG 2 value

View File

@ -54,6 +54,13 @@ CLASS net/minecraft/class_1159 net/minecraft/util/math/Matrix4f
ARG 1 x
ARG 2 y
ARG 3 z
METHOD method_34239 projectionMatrix (FFFFFF)Lnet/minecraft/class_1159;
ARG 0 left
ARG 1 right
ARG 2 bottom
ARG 3 top
ARG 4 nearPlane
ARG 5 farPlane
METHOD method_35434 load (Lnet/minecraft/class_1159;)V
ARG 1 source
METHOD method_35435 readRowFirst (Ljava/nio/FloatBuffer;)V