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 TypeMethodDescriptionintReturns the value of thearrayLengthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intlocation()Returns the value of thelocationrecord component.name()Returns the value of thenamerecord component.intoffset()Returns the value of theoffsetrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Constructor Details
-
Uniform
Creates an instance of aUniformrecord class.- Parameters:
name- the value for thenamerecord componentlocation- the value for thelocationrecord componentoffset- the value for theoffsetrecord componenttype- the value for thetyperecord componentarrayLength- the value for thearrayLengthrecord 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 thenamerecord component.- Returns:
- the value of the
namerecord component
-
location
public int location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
arrayLength
public int arrayLength()Returns the value of thearrayLengthrecord component.- Returns:
- the value of the
arrayLengthrecord component
-