9.3
126 3D: Software rendering and statistics
procedure
Creates a stateless deterministic
reference backend.
procedure
(retained-software-renderer3d [#:capacity capacity])
→ renderer3d? capacity : exact-positive-integer? = 32
Creates a bounded, thread-safe backend that retains
prepared camera-space triangles, while allocating a new colour/depth target for
every render.
The bounded retained backend
used by view3d’s opaque Pict adapter.
parameter
(current-view3d-renderer3d renderer) → void? renderer : renderer3d?
Dynamically selects
the backend used by opaque view3d rendering. The parameter affects the
effectful rendering boundary only; it is not captured in semantic scene values.
When a section-output cache is enabled, its declared backend identity is part of
the mandatory render envelope.
procedure
(retained-software-renderer3d-cache-hits renderer)
→ exact-nonnegative-integer? renderer : renderer3d?
Reports retained preparation hits.
procedure
(retained-software-renderer3d-cache-misses renderer)
→ exact-nonnegative-integer? renderer : renderer3d?
Reports retained preparation misses.
procedure
(retained-software-renderer3d-cache-size renderer)
→ exact-nonnegative-integer? renderer : renderer3d?
Reports the current bounded cache size.
struct
(struct renderer3d-statistics ( spatial-compilations geometry-fingerprints geometry-cache-hits geometry-cache-misses geometry-cache-bytes instance-count source-triangle-count clipped-triangle-count raster-triangle-count pixel-count bitmap-conversion-count preparation-milliseconds raster-milliseconds readback-milliseconds) #:transparent) spatial-compilations : exact-nonnegative-integer? geometry-fingerprints : exact-nonnegative-integer? geometry-cache-hits : exact-nonnegative-integer? geometry-cache-misses : exact-nonnegative-integer? geometry-cache-bytes : integer? instance-count : exact-nonnegative-integer? source-triangle-count : exact-nonnegative-integer? clipped-triangle-count : exact-nonnegative-integer? raster-triangle-count : exact-nonnegative-integer? pixel-count : exact-nonnegative-integer? bitmap-conversion-count : exact-nonnegative-integer? preparation-milliseconds : real? raster-milliseconds : real? readback-milliseconds : real?
An immutable
snapshot of renderer-owned counters and elapsed-time observations. They are
benchmark evidence, not timing assertions for CI.
procedure
(renderer3d-statistics-reset! renderer) → void?
renderer : renderer3d?
Resets
the built-in software renderer’s counters without changing semantic values.
procedure
(renderer3d-statistics-snapshot renderer)
→ renderer3d-statistics? renderer : renderer3d?
Returns a coherent immutable metric snapshot.