Class SamplerObject
java.lang.Object
foundry.veil.api.client.render.texture.SamplerObject
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
Sampler objects allow shaders to sample from the same texture storage in
different ways depending on what samplers are bound.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bind
(int unit) Binds this sampler to the specified texture unit.static SamplerObject
create()
Creates a single new sampler object.static SamplerObject[]
create
(int count) Creates an array of sampler objects.static void
create
(SamplerObject[] fill) Replaces each element of the specified array with a new sampler object.void
free()
int
getId()
void
setAnisotropy
(float value) void
setBorderColor
(float red, float green, float blue, float alpha) void
setBorderColor
(int color) void
setBorderColor
(int red, int green, int blue, int alpha) void
setBorderColorI
(int color) void
setBorderColorI
(int red, int green, int blue, int alpha) void
setBorderColorUI
(int color) void
setBorderColorUI
(int red, int green, int blue, int alpha) void
setCompareFunc
(TextureFilter.CompareFunction compareFunction) void
setCubeMapSeamless
(boolean seamless) Allows filtering to work across faces of cubemaps.void
setFilter
(boolean blur, boolean mipmap) void
setFilter
(TextureFilter filter) void
setWrap
(TextureFilter.Wrap wrapX, TextureFilter.Wrap wrapY, TextureFilter.Wrap wrapZ) void
setWrapX
(TextureFilter.Wrap wrap) void
setWrapY
(TextureFilter.Wrap wrap) void
setWrapZ
(TextureFilter.Wrap wrap) static void
unbind
(int unit) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
Method Details
-
create
Creates a single new sampler object.- Returns:
- A new sampler
-
create
Creates an array of sampler objects.- Parameters:
count
- The number of samplers to create- Returns:
- An array of new sampler objects
-
create
Replaces each element of the specified array with a new sampler object.- Parameters:
fill
- The array to fill
-
bind
public void bind(int unit) Binds this sampler to the specified texture unit.- Parameters:
unit
- The unit to bind to
-
unbind
public static void unbind(int unit) -
getId
public int getId() -
setFilter
-
setFilter
public void setFilter(boolean blur, boolean mipmap) -
setAnisotropy
public void setAnisotropy(float value) -
setCompareFunc
-
setWrapX
-
setWrapY
-
setWrapZ
-
setWrap
-
setBorderColor
public void setBorderColor(float red, float green, float blue, float alpha) -
setBorderColor
public void setBorderColor(int red, int green, int blue, int alpha) -
setBorderColor
public void setBorderColor(int color) -
setBorderColorI
public void setBorderColorI(int red, int green, int blue, int alpha) -
setBorderColorI
public void setBorderColorI(int color) -
setBorderColorUI
public void setBorderColorUI(int red, int green, int blue, int alpha) -
setBorderColorUI
public void setBorderColorUI(int color) -
setCubeMapSeamless
public void setCubeMapSeamless(boolean seamless) Allows filtering to work across faces of cubemaps.- Parameters:
seamless
- Whether to enable seamless cube maps
-
free
public void free()- Specified by:
free
in interfaceorg.lwjgl.system.NativeResource
-