Boron-GL Function Reference

Version: 0.1.11
Date: Jan 31 2011

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

Arguments

sizecoord!
/fullscreen

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!

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_UNITS int!

Handle-events

handle-events widget /wait

Arguments

widgetnone!/widget!
/wait

Return

unset!

Hide

hide widget

Arguments

widgetwidget!

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!
value2decimal!/coord!/vec3!
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-widget

make-widget parent block

Arguments

parentwidget!/none!
blockblock!

Return

none

none

Move-glyphs

move-glyphs font offset

Arguments

fontfont!
offsetcoord!

Return

Modified font.

Normalize

normalize vec

Arguments

veccoord!/vec3!

Return

Normalized vector.

Play

play sound

Arguments

soundint!/string!/file!

Return

unset!

Point-in

point-in rect point

Arguments

rectcoord!
pointcoord!

Return

logic!

Project-point

project-point a b pnt

Arguments

avec3!
bvec3!
pntvec3!

Return

Point projected onto line a-b.

Save-png

save-png file raster

Arguments

filestring!/file!
rasterraster!

Return

unset!

Shadowmap

shadowmap size

Arguments

sizecoord!

Return

framebuffer

Show

show widget

Arguments

widgetwidget!

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

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.