Klasse OffscreenRenderer
java.lang.Object
de.luckymcdev.foundryengine.client.imgui.OffscreenRenderer
Owns a reusable offscreen framebuffer and provides a general API for rendering
arbitrary content into a
NativeImage that can then be turned into a texture.
GPU readbacks are async; results are queued and must be drained on the render thread
by calling
at the start of each frame.Ungültige Referenz
#drainPendingResults()
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifikator und TypKlasseBeschreibungstatic final recordstatic interface -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungvoidclose()voidDrains all GPU readback results that have arrived since the last call.voidrenderAsync(int size, String key, OffscreenRenderer.RenderJob job) Renders content into the offscreen framebuffer and schedules a GPU readback.
-
Konstruktordetails
-
OffscreenRenderer
public OffscreenRenderer()
-
-
Methodendetails
-
renderAsync
Renders content into the offscreen framebuffer and schedules a GPU readback. The resultingNativeImagewill appear inon the next frame where the GPU has finished.Ungültige Referenz
#drainPendingResults()- Parameter:
size- the pixel dimensions of the render target (square)key- an opaque key forwarded to the pending result for identificationjob- the render job; receives the active color/depth views and proj buffer
-
drainPendingResults
Drains all GPU readback results that have arrived since the last call. Must be called on the render thread at the start of each frame, before any texture uploads or ImGui rendering.- Parameter:
consumer- receives each completedOffscreenRenderer.PendingResult
-
close
public void close()
-