Class LegacyVertexArray
java.lang.Object
foundry.veil.api.client.render.vertex.VertexArray
foundry.veil.impl.client.render.vertex.LegacyVertexArray
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
-
Nested Class Summary
Nested classes/interfaces inherited from class foundry.veil.api.client.render.vertex.VertexArray
VertexArray.DrawUsage, VertexArray.IndexType
-
Field Summary
Fields inherited from class foundry.veil.api.client.render.vertex.VertexArray
buffers, ELEMENT_ARRAY_BUFFER, id, indexCount, indexType, VERTEX_BUFFER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
void
upload
(int attributeStart, com.mojang.blaze3d.vertex.MeshData meshData, VertexArray.DrawUsage usage) Uploads vanilla mc mesh data into this vertex array.protected void
uploadVertexBuffer
(int buffer, ByteBuffer data, int usage) Uploads vertex data to the specified buffer.Methods inherited from class foundry.veil.api.client.render.vertex.VertexArray
bind, create, create, create, draw, drawIndirect, drawInstanced, free, getId, getIndexCount, getIndexType, getOrCreateBuffer, setIndexCount, unbind, upload, upload, uploadIndexBuffer, uploadIndexBuffer
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
-
Constructor Details
-
LegacyVertexArray
public LegacyVertexArray(int id)
-
-
Method Details
-
upload
public void upload(int attributeStart, com.mojang.blaze3d.vertex.MeshData meshData, VertexArray.DrawUsage usage) Description copied from class:VertexArray
Uploads vanilla mc mesh data into this vertex array. Only a single mesh can be uploaded this way.- Overrides:
upload
in classVertexArray
- Parameters:
attributeStart
- The attribute to start uploading vertex data tomeshData
- The data to uploadusage
- The draw usage
-
createBuffer
protected int createBuffer()- Specified by:
createBuffer
in classVertexArray
- Returns:
- Creates a new vertex buffer
-
uploadVertexBuffer
Description copied from class:VertexArray
Uploads vertex data to the specified buffer.- Specified by:
uploadVertexBuffer
in classVertexArray
- Parameters:
buffer
- The buffer to upload intodata
- The data to uploadusage
- The data usage
-
editFormat
- Specified by:
editFormat
in classVertexArray
- Returns:
- A builder for applying changes to this array
-