GeometryBuffer class final
A range of device memory holding vertices or indices.
The engine only ever does two things with one: bind the whole of a mesh's buffer, or bind a prefix of a buffer that only grows — the identity index sequence the debug overlay draws through. So this is a range rather than a buffer, and slice is the only arithmetic on it.
Transient geometry — a batch of particle quads built this frame — does not
come through here at all. It goes to CommandEncoder.bindVertexData, which
takes bytes: where a frame's scratch vertices live until the GPU has read
them is a backend question, and answering it in the engine is what a
HostBuffer in an engine signature was.
Ended with dispose, since 1.0, the verb every GPU resource answers
to — TextureHandle.dispose is its twin. GraphicsDevice.releaseGeometry
stays as the device's half, for backends and the engine's own owners.
Properties
- backend → Object
-
The backend's own buffer object. See
TextureHandle.backend.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether dispose has run.
no setter
- lengthInBytes → int
-
final
- offsetInBytes → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Gives this buffer back to the device that made it, once; a second call
is a mistake, an assertion in a debug build. A slice is a view and
its
disposedoes nothing: dispose the buffer it was cut from. A buffer a backend made without naming its device (a storage buffer's view, a test's fake) has nothing to give back, and is not checked. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
slice(
{int offset = 0, required int length}) → GeometryBuffer -
A shorter range starting
offsetbytes into this one. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited