Texture.Sampler.Builder

  • Texture.Sampler.Builder is used to construct Sampler objects, which control how textures are rendered.

  • It allows developers to define magnification and minification filters, influencing how the texture appears when zoomed in or out.

  • It provides methods to set the wrap mode for texture coordinates (S, T, R), controlling how the texture behaves outside the 0-1 UV range.

  • The build() method is used to finalize the configuration and create a Texture.Sampler instance.

public static class Texture.Sampler.Builder

Builder for constructing Sampler objects.

Public Constructors

Public Methods

Texture.Sampler
build()
Construct a Sampler from the properties of the Builder.
Texture.Sampler.Builder
setMagFilter(Texture.Sampler.MagFilter magFilter)
Set the magnification function used whenever the level-of-detail function determines that the texture should be magnified.
Texture.Sampler.Builder
setMinFilter(Texture.Sampler.MinFilter minFilter)
Set the minifying function used whenever the level-of-detail function determines that the texture should be minified.
Texture.Sampler.Builder
setWrapMode(Texture.Sampler.WrapMode wrapMode)
Set the wrap mode for all texture coordinates.
Texture.Sampler.Builder
setWrapModeR(Texture.Sampler.WrapMode wrapMode)
Set the wrap mode for texture coordinate R.
Texture.Sampler.Builder
setWrapModeS(Texture.Sampler.WrapMode wrapMode)
Set the wrap mode for texture coordinate S.
Texture.Sampler.Builder
setWrapModeT(Texture.Sampler.WrapMode wrapMode)
Set the wrap mode for texture coordinate T.

Inherited Methods

Public Constructors

public Texture.Sampler.Builder ()

Public Methods

public Texture.Sampler build ()

Construct a Sampler from the properties of the Builder.

public Texture.Sampler.Builder setMagFilter (Texture.Sampler.MagFilter magFilter)

Set the magnification function used whenever the level-of-detail function determines that the texture should be magnified.

Parameters
magFilter

public Texture.Sampler.Builder setMinFilter (Texture.Sampler.MinFilter minFilter)

Set the minifying function used whenever the level-of-detail function determines that the texture should be minified.

Parameters
minFilter

public Texture.Sampler.Builder setWrapMode (Texture.Sampler.WrapMode wrapMode)

Set the wrap mode for all texture coordinates. The wrap mode determines how a texture is rendered for uv coordinates outside the range of [0, 1].

Parameters
wrapMode

public Texture.Sampler.Builder setWrapModeR (Texture.Sampler.WrapMode wrapMode)

Set the wrap mode for texture coordinate R. The wrap mode determines how a texture is rendered for uv coordinates outside the range of [0, 1].

Parameters
wrapMode

public Texture.Sampler.Builder setWrapModeS (Texture.Sampler.WrapMode wrapMode)

Set the wrap mode for texture coordinate S. The wrap mode determines how a texture is rendered for uv coordinates outside the range of [0, 1].

Parameters
wrapMode

public Texture.Sampler.Builder setWrapModeT (Texture.Sampler.WrapMode wrapMode)

Set the wrap mode for texture coordinate T. The wrap mode determines how a texture is rendered for uv coordinates outside the range of [0, 1].

Parameters
wrapMode