Class RenderTargetManager
java.lang.Object
dev.engine.graphics.common.RenderTargetManager
Manages render target lifecycle: creation, resize, and pooling.
Supports color-only, color+depth, and multiple render target (MRT) configurations. Named render targets can be resized as a group (e.g., on window resize). Transient render targets are pooled for reuse by the render graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquireTransient(RenderTargetDescriptor descriptor) Acquires a transient render target from the pool, or creates one.voidclose()voidDestroys a named render target.getColorTexture(String name) Gets the color texture attachment (index 0) of a named render target.getColorTexture(String name, int index) Gets the color texture attachment of a named render target.getOrCreate(String name, int width, int height, TextureFormat colorFormat) Creates or retrieves a named render target with a single color attachment.getOrCreate(String name, int width, int height, TextureFormat colorFormat, TextureFormat depthFormat) Creates or retrieves a named render target with color + depth.getOrCreate(String name, RenderTargetDescriptor descriptor) Creates or retrieves a named render target with a full descriptor (MRT, custom formats).voidReleases all transient render targets (call at frame end).voidreleaseTransient(Handle<RenderTargetResource> handle) Releases a transient render target back to the pool.voidResizes all named render targets that match the old size to the new size.
-
Constructor Details
-
RenderTargetManager
-
-
Method Details
-
getOrCreate
public Handle<RenderTargetResource> getOrCreate(String name, int width, int height, TextureFormat colorFormat) Creates or retrieves a named render target with a single color attachment. -
getOrCreate
public Handle<RenderTargetResource> getOrCreate(String name, int width, int height, TextureFormat colorFormat, TextureFormat depthFormat) Creates or retrieves a named render target with color + depth. -
getOrCreate
Creates or retrieves a named render target with a full descriptor (MRT, custom formats). -
getColorTexture
Gets the color texture attachment of a named render target. -
getColorTexture
Gets the color texture attachment (index 0) of a named render target. -
resize
Resizes all named render targets that match the old size to the new size. -
destroy
Destroys a named render target. -
acquireTransient
Acquires a transient render target from the pool, or creates one. -
releaseTransient
Releases a transient render target back to the pool. -
releaseAllTransient
public void releaseAllTransient()Releases all transient render targets (call at frame end). -
close
public void close()
-