-
Notifications
You must be signed in to change notification settings - Fork 5
OpenGl Terminal Options
The terminal creation function create-terminal
takes three parameters: group-map
, opts
, and f
.
Layer group are specified as a map. Each key is a group-id
and each value is a map of options. Options must have these keys:
:layers
: a sequence of layer identifiers. Keywords are encouraged, but not enforced. Example [:map :entities :ui]
.
:columns
: the width of each layer.
:rows
: the height of each layer.
:pos
: the [x y]
position of the layer in pixels. [0 0]
is the default position.
:font
: the layers of a group all use the same font.
Terminal options are specified as a map. Opts must have these keys:
screen-width
: width of the screen in pixels.
screen-height
: height of the screen in pixels.
Opts may have these keys:
:title
: the text to use in the windows title bar. Default "Zaffre"
.
:default-fg-color
: an [r g b]
sequence in the range of 0-255. Default [255 255 255]
.
:default-bg-color
: an [r g b]
sequence in the range of 0-255. Default [0 0 0]
.
:fullscreen
: true
or false
. Default false
.
:fx-shader
: a map with these keys: :name
- a path to the shader, :uniforms
- a list of entries where each entry is a ["uniformName" value]
. Default {:name "passthrough.fs" :uniforms []}
.
A retro fx shader is included with Zaffre. See examples.shaderfx
for its use or ideas on how to create your own.
The final parameter is a callback fn - f
that takes a single parameter terminal
. f
is called in a separate thread.