Primitives are objects that you can render. There isn’t really
much else in a fluxus scene, except lights, a camera and lots of
primitives. The normal way to create a primitive is to set up
some state which the primitive will use, then call it’s build
function and keep it’s returned ID (using with-primitive) to
modify it’s state later on. (define myobj (with-state (colour
(vector 0 1 0)) (build-cube))) ; makes a green cube (with-
primitive myobj (colour (vector 1 0 0))) ; changes its colour to
red So primitives contain a state which describes things like
colour, texture and transform information. This state operates
on the primitive as a whole – one colour for the whole thing,
one texture, shader pair and one transform. To get a little
deeper and do more we need to introduce primitive data.
Primitive Data Arrays [aka. Pdata] A pdata array is a fixed size
array of information contained within a primitive. Each pdata
array has a name, so you can refer to it, and a primitive may
contain lots of different pdata ar