Skip to content

VertexFill

final class VertexFill
Package: dev.joid.lib.bridge.render.vertex · Module: core · Source: VertexFill.java

Copies a vertex buffer into memory of the backend and writes neutral values where the draw left optional attributes out.

An API with a fixed vertex input, such as Vulkan, reads every attribute of every vertex. VertexFill makes the bytes that a draw did not write safe to read: the texture coordinate (0, 0) and the normal (0, 0, 1). It leaves the color as it is: the translated shader takes the current color of the render state when the buffer has no colors.

ReturnsSignatureSummary
ByteBuffercomplete(VertexBuffer buffer, ByteBuffer target) staticCopies the vertices to target from its position, then writes the missing texture coordinates and normals there.

ByteBuffer complete(VertexBuffer buffer, ByteBuffer target) static

Copies the vertices to target from its position, then writes the missing texture coordinates and normals there. Returns target, whose position stays unchanged.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page