Boron Function Reference

Version: 0.2.8
Date: Jan 05 2014

Contents

Function Groups

1   C Functions

These are the built-in functions implemented in C.

Animate

animate anims time

Arguments

animsblock!/context! Animation or block of animations
timedecimal! Delta time

Return

True if any animations are playing.

Blit

blit dest src pos

Arguments

destraster!
srcraster!
poscoord! Desitination position

Return

dest

Buffer-audio

buffer-audio audio-sample

Arguments

audio-samplecontext!

Return

al_buf_num int!.

Change-vbo

change-vbo buffer data length

Arguments

buffervbo!
datavector!
lengthint!/coord! (stride,offset,npv)

Return

unset!

Clear-color

clear-color color

Arguments

colordecimal!/coord!/vec3!

Return

unset!

Calls glClearColor().

Cross

cross a b

Arguments

acoord!/vec3!
bcoord!/vec3!

Return

Cross product of vectors.

Curve-at

curve-at curve time

Arguments

curveblock!
timeint!/decimal!

Return

Value on curve at time.

The curve block is a sequence of time and value pairs, ordered by time.

Display

display size /fullscreen /title text

Arguments

sizecoord!
/fullscreen
/title
   textstring!

Return

unset!

Display-area

display-area

Return

coord! or none

Get display rectangle (0, 0, width, height).

Display-cursor

display-cursor enable

Arguments

enablelogic!

Return

unset!

Display-snapshot

display-snapshot

Return

raster!

Create raster from current display pixels.

Display-swap

display-swap

Return

unset!

Distance

distance a b

Arguments

acoord!/vec3!
bcoord!/vec3!

Return

Distance between points.

Dot

dot a b

Arguments

acoord!/vec3!
bcoord!/vec3!

Return

Dot product of vectors.

Draw

draw dprog

Arguments

dprogdraw-prog!/widget!

Return

unset!

Gl-extensions

gl-extensions

Return

string!

Gl-max-textures

gl-max-textures

Return

GL_MAX_TEXTURE_IMAGE_UNITS int!

Gl-version

gl-version

Return

string!

Handle-events

handle-events widget /wait

Arguments

widgetnone!/widget!
/wait

Return

unset!

Hide

hide widget

Arguments

widgetdraw-prog!/widget!

Return

unset!

Key-code

key-code key

Arguments

keychar!/word!

Return

code int!

Maps key to window system key code.

Key-repeat

key-repeat enable

Arguments

enablelogic!

Return

unset!

Lerp

lerp value1 value2 fraction

Arguments

value1decimal!/coord!/vec3!/quat!
value2decimal!/coord!/vec3!/quat!
fractiondecimal!

Return

Interpolated value.

Limit

limit number min max

Arguments

numberint!/decimal!
minint!/decimal!
maxint!/decimal!

Return

Number clamped to min and max.

Load-png

load-png filename

Arguments

filenamestring!/file!

Return

raster!

Look-at

look-at matrix dir

Arguments

matrixvector!
dirvec3!

Return

Transformed matrix.

Make-sdf

make-sdf src mask scale

Arguments

srcraster!
maskint!
scaledecimal!

Return

New signed distance field raster.

Move

move widget position /center

Arguments

widgetwidget!
positioncoord!/widget!
/center

Return

unset!

Move-glyphs

move-glyphs font offset

Arguments

fontfont!
offsetcoord!

Return

Modified font.

Normalize

normalize vec

Arguments

veccoord!/vec3!

Return

Normalized vector.

Pick-point

pick-point screen-point camera points pos-offset

Arguments

screen-pointcoord! (x,y)
cameracontext!
pointsvector!
pos-offsetint!/coord! (stride,offset)

Return

int!/none!

Play

play sound

Arguments

soundint!/string!/file!

Return

unset!

Point-in

point-in rect point

Arguments

rectcoord!
pointcoord!

Return

logic!

Project-point

project-point pnt a b

Arguments

pntvec3!
avec3!/context!
bvec3!

Return

Point projected onto line or screen.

To project the point onto a line pass vec3! end points for a and b.

If 'a is a camera context! then the point will be projected onto the camera's viewport.

Resize

resize widget area

Arguments

widgetwidget!
areacoord!

Return

unset!

Save-png

save-png file raster

Arguments

filestring!/file!
rasterraster!

Return

unset!

Set-matrix

set-matrix matrix value

Arguments

matrixvector!
valuequat!

Return

Modified matrix

Set-volume

set-volume what vol

Arguments

whatint!/word!
voldecimal!

Return

unset!

Shadowmap

shadowmap size

Arguments

sizecoord!

Return

framebuffer

Show

show widget

Arguments

widgetdraw-prog!/widget!

Return

unset!

Stop

stop sound

Arguments

soundword!

Return

unset!

Text-size

text-size font text

Arguments

fontfont!
textstring!

Return

coord! width,height.

To-degrees

to-degrees rad

Arguments

radint!/decimal!

Return

degrees

To-radians

to-radians deg

Arguments

degint!/decimal!

Return

radians

Turntable

turntable camera delta

Arguments

cameracontext!
deltaazim,elev coord!/vec3!

Return

Transformed camera.

Visible?

visible? widget

Arguments

widgetdraw-prog!/widget!

Return

logic!

2   Helper Functions

These are the built-in func! functions and aliases.

Draw-list

draw-list blk

Arguments

blk

Return

draw-prog!

Same as make draw-prog! blk.

Load-shader

load-shader file

Arguments

file

Return

shader!

Load-texture

load-texture file /mipmap /clamp

Arguments

filePNG filename
/mipmap
/clamp

Return

texture!

Load-wav

load-wav file

Arguments

file

Return

Audio-sample context.

Make-matrix

make-matrix pos

Arguments

posvec3!

Return

vector!

Create matrix with position initialized.

Recal-curve

recal-curve curve a b

Arguments

curveblock!
adecimal!/coord!/vec3!
bdecimal!/coord!/vec3!

Return

Recalibrated copy of curve.

A and B must be of the same type.