8.10
5 RRLL: Rendering Canvas
Racket Rogue-Like Library: Rendering Canvas
Extension for rrll/canvas that uses unused bits for storing the depth and id buffers in the canvas data.
5.1 Rendering Canvas Procedures
(require rrll/canvas/render) | package: rrll-canvas-render |
Converts floating point representation of w-value to fixed-point
representation for storing in canvas data.
Merges 24-bit RGB color with fixed-point representation of w-value.
Extracts the w-buffer fixnum? value from given combined data.
Tests whether given wfx value is greater than the extracted
value from given wrgb.
Tests whether given wfx value is greater than or equal to the
extracted value from given wrgb.
Merges the color value with fixed-point w-buffer value and numerical
surface identifier to one value.
Extracts id value from given combined color, w-buffer and id composite
value.
Merges id value into color (possibly with wfx information).
Extracts id value from composite pixel data at given location of the
provided canvas?.
Converts the fixed-point wfx value into a single color of
given color scale from black over blue to white. Used by
wbuffer-w->canvas.
Creates a canvas? with color representation of the
fixed-point w-buffer values from given canvas?.
Creates a canvas? with color representation of the
fixed-point w-buffer values from given canvas?.
Makes sure the id is not bigger than the internal maximum value.