Record Class ShaderUniformCache.Uniform
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.program.ShaderUniformCache.Uniform
- Record Components:
name
- The name of the uniformlocation
- The uniform locationoffset
- The offset of this uniform relative to a containing blocktype
- The GL variable typearrayLength
- The number of elements in the array if an array type
- Enclosing class:
ShaderUniformCache
public static record ShaderUniformCache.Uniform(String name, int location, int offset, int type, int arrayLength)
extends Record
A single uniform in a shader program.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thearrayLength
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
location()
Returns the value of thelocation
record component.name()
Returns the value of thename
record component.int
offset()
Returns the value of theoffset
record component.final String
toString()
Returns a string representation of this record class.int
type()
Returns the value of thetype
record component.
-
Constructor Details
-
Uniform
Creates an instance of aUniform
record class.- Parameters:
name
- the value for thename
record componentlocation
- the value for thelocation
record componentoffset
- the value for theoffset
record componenttype
- the value for thetype
record componentarrayLength
- the value for thearrayLength
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
location
public int location()Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
offset
public int offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-
type
public int type()Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
arrayLength
public int arrayLength()Returns the value of thearrayLength
record component.- Returns:
- the value of the
arrayLength
record component
-