Record Class ARBVertexAttribBindingBuilder
java.lang.Object
java.lang.Record
foundry.veil.impl.client.render.vertex.ARBVertexAttribBindingBuilder
- All Implemented Interfaces:
VertexArrayBuilder
@Internal
public record ARBVertexAttribBindingBuilder(VertexArray vertexArray)
extends Record
implements VertexArrayBuilder
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.vertex.VertexArrayBuilder
VertexArrayBuilder.DataType -
Constructor Summary
ConstructorsConstructorDescriptionARBVertexAttribBindingBuilder(VertexArray vertexArray) Creates an instance of aARBVertexAttribBindingBuilderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionClears all defined vertex attributes.Clears all mapped buffer regions.defineVertexBuffer(int index, int buffer, int offset, int stride, int divisor) Maps a buffer region to the specified index.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.removeAttribute(int index) Removes the attribute with the specified index.removeVertexBuffer(int index) Removes the buffer mapping with the specified index.setVertexAttribute(int index, int bufferIndex, int size, VertexArrayBuilder.DataType type, boolean normalized, int relativeOffset) Defines a floating-point vertex attribute.setVertexIAttribute(int index, int bufferIndex, int size, VertexArrayBuilder.DataType type, int relativeOffset) Defines an integer vertex attribute.setVertexLAttribute(int index, int bufferIndex, int size, VertexArrayBuilder.DataType type, int relativeOffset) Defines a long vertex attribute.final StringtoString()Returns a string representation of this record class.Returns the value of thevertexArrayrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface foundry.veil.api.client.render.vertex.VertexArrayBuilder
applyFrom
-
Constructor Details
-
ARBVertexAttribBindingBuilder
Creates an instance of aARBVertexAttribBindingBuilderrecord class.- Parameters:
vertexArray- the value for thevertexArrayrecord component
-
-
Method Details
-
defineVertexBuffer
public VertexArrayBuilder defineVertexBuffer(int index, int buffer, int offset, int stride, int divisor) Description copied from interface:VertexArrayBuilderMaps a buffer region to the specified index. Allows swapping out vertex data with a single GL call.- Specified by:
defineVertexBufferin interfaceVertexArrayBuilder- Parameters:
index- The index to assign to. It must be between 0 andVeilRenderSystem.maxVertexAttributes()buffer- The buffer to assignoffset- The offset into the buffer to bind tostride- The size of the region to mapdivisor- The number of instances that have to pass to increment this data or0to increment per vertex
-
setVertexAttribute
public VertexArrayBuilder setVertexAttribute(int index, int bufferIndex, int size, VertexArrayBuilder.DataType type, boolean normalized, int relativeOffset) Description copied from interface:VertexArrayBuilderDefines a floating-point vertex attribute.- Specified by:
setVertexAttributein interfaceVertexArrayBuilder- Parameters:
index- The index of the attribute to assignbufferIndex- The defined buffer index to use. Defined withVertexArrayBuilder.defineVertexBuffer(int, int, int, int, int)size- The size of the attribute. Can be 1, 2, 3, or 4type- The type of data the shader will usenormalized- Whether to normalize the data from-1to1automaticallyrelativeOffset- The offset in the buffer region the vertex data is defined at. It must be between 0 andVeilRenderSystem.maxVertexAttributeRelativeOffset()
-
setVertexIAttribute
public VertexArrayBuilder setVertexIAttribute(int index, int bufferIndex, int size, VertexArrayBuilder.DataType type, int relativeOffset) Description copied from interface:VertexArrayBuilderDefines an integer vertex attribute.- Specified by:
setVertexIAttributein interfaceVertexArrayBuilder- Parameters:
index- The index of the attribute to assignbufferIndex- The defined buffer index to use. Defined withVertexArrayBuilder.defineVertexBuffer(int, int, int, int, int)size- The size of the attribute. Can be 1, 2, 3, or 4type- The type of data the shader will userelativeOffset- The offset in the buffer region the vertex data is defined at. It must be between 0 andVeilRenderSystem.maxVertexAttributeRelativeOffset()
-
setVertexLAttribute
public VertexArrayBuilder setVertexLAttribute(int index, int bufferIndex, int size, VertexArrayBuilder.DataType type, int relativeOffset) Description copied from interface:VertexArrayBuilderDefines a long vertex attribute. Only supported ifVeilRenderSystem.vertexAttribute64BitSupported()orVeilRenderSystem.bindlessTextureSupported()aretrue.- Specified by:
setVertexLAttributein interfaceVertexArrayBuilder- Parameters:
index- The index of the attribute to assignbufferIndex- The defined buffer index to use. Defined withVertexArrayBuilder.defineVertexBuffer(int, int, int, int, int)size- The size of the attribute. Can be 1, 2, 3, or 4type- The type of data the shader will userelativeOffset- The offset in the buffer region the vertex data is defined at. It must be between 0 andVeilRenderSystem.maxVertexAttributeRelativeOffset()
-
removeVertexBuffer
Description copied from interface:VertexArrayBuilderRemoves the buffer mapping with the specified index.- Specified by:
removeVertexBufferin interfaceVertexArrayBuilder- Parameters:
index- The index of the buffer to remove
-
removeAttribute
Description copied from interface:VertexArrayBuilderRemoves the attribute with the specified index.- Specified by:
removeAttributein interfaceVertexArrayBuilder- Parameters:
index- The index of the attribute to remove
-
clearVertexBuffers
Description copied from interface:VertexArrayBuilderClears all mapped buffer regions.- Specified by:
clearVertexBuffersin interfaceVertexArrayBuilder
-
clearVertexAttributes
Description copied from interface:VertexArrayBuilderClears all defined vertex attributes.- Specified by:
clearVertexAttributesin interfaceVertexArrayBuilder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
vertexArray
Returns the value of thevertexArrayrecord component.- Specified by:
vertexArrayin interfaceVertexArrayBuilder- Returns:
- the value of the
vertexArrayrecord component
-