Package com.google.android.filament
Class RenderTarget.Builder
- java.lang.Object
-
- com.google.android.filament.RenderTarget.Builder
-
- Enclosing class:
- RenderTarget
public static class RenderTarget.Builder extends java.lang.ObjectConstructsRenderTargetobjects using a builder pattern.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RenderTargetbuild(Engine engine)Creates the RenderTarget object and returns a pointer to it.RenderTarget.Builderface(RenderTarget.AttachmentPoint attachment, Texture.CubemapFace face)Sets the cubemap face for a given attachment point.RenderTarget.Builderlayer(RenderTarget.AttachmentPoint attachment, int layer)Sets the layer for a given attachment point (for 3D textures).RenderTarget.BuildermipLevel(RenderTarget.AttachmentPoint attachment, int level)Sets the mipmap level for a given attachment point.RenderTarget.Buildertexture(RenderTarget.AttachmentPoint attachment, Texture texture)Sets a texture to a given attachment point.
-
-
-
Method Detail
-
texture
@NonNull public RenderTarget.Builder texture(@NonNull RenderTarget.AttachmentPoint attachment, @Nullable Texture texture)
Sets a texture to a given attachment point.All RenderTargets must have a non-null
COLORattachment.- Parameters:
attachment- The attachment point of the texture.texture- The associated texture object.- Returns:
- A reference to this Builder for chaining calls.
-
mipLevel
@NonNull public RenderTarget.Builder mipLevel(@NonNull RenderTarget.AttachmentPoint attachment, @IntRange(from=0L) int level)
Sets the mipmap level for a given attachment point.- Parameters:
attachment- The attachment point of the texture.level- The associated mipmap level, 0 by default.- Returns:
- A reference to this Builder for chaining calls.
-
face
@NonNull public RenderTarget.Builder face(@NonNull RenderTarget.AttachmentPoint attachment, Texture.CubemapFace face)
Sets the cubemap face for a given attachment point.- Parameters:
attachment- The attachment point.face- The associated cubemap face.- Returns:
- A reference to this Builder for chaining calls.
-
layer
@NonNull public RenderTarget.Builder layer(@NonNull RenderTarget.AttachmentPoint attachment, @IntRange(from=0L) int layer)
Sets the layer for a given attachment point (for 3D textures).- Parameters:
attachment- The attachment point.layer- The associated cubemap layer.- Returns:
- A reference to this Builder for chaining calls.
-
build
@NonNull public RenderTarget build(@NonNull Engine engine)
Creates the RenderTarget object and returns a pointer to it.- Returns:
- pointer to the newly created object or nullptr if exceptions are disabled and an error occurred.
-
-