   ([ures vres] (.sphereDetail *applet* (int ures) (int vres))))
 
 (defn spotlight
+  "Adds a spot light. Lights need to be included in the draw to
+  remain persistent in a looping program. Placing them in the setup
+  of a looping program will cause them to only have an effect the
+  first time through the loop. The affect of the r, g, and b
+  parameters is determined by the current color mode. The x, y, and z
+  parameters specify the position of the light and nx, ny, nz specify
+  the direction or light. The angle parameter affects angle of the
+  spotlight cone."
   ([r g b x y z nx ny nz angle concentration]
      (.spotLight *applet* r g b x y z nx ny nz angle concentration))
   ([[r g b] [x y z] [nx ny nz] angle concentration]

     (.createFont *applet* (str name) (float size) smooth charset)))

(defn create-graphics
  ([w h renderer]
     (.createGraphics *applet* (int w) (int h) renderer))
  ([w h renderer path]
     (.createGraphics *applet* (int w) (int h) renderer path)))

(defn create-image [w h format]
  (.createImage *applet* (int w) (int h) (int format)))

(defn create-input [filename]
  (PApplet/createInput (java.io.File. filename)))

(defn create-input-raw
  "Call openStream() without automatic gzip decompression."
  [filename]
  (.createInputRaw *applet* filename))

(defn create-output [filename]
  (PApplet/createOutput (java.io.File. filename)))

(defn create-path [filename] (PApplet/createPath filename))

(defn create-reader [filename] (.createReader *applet* filename))

(defn create-writer [filename] (.createWriter *applet* filename))

(def ^{:private true}
  cursor-modes {:arrow PConstants/ARROW

  [filename]
  (.loadFont *applet*  (str filename)))

(defn load-image
  "Loads an image into a variable of type PImage. Four types of
  images ( .gif, .jpg, .tga, .png) images may be loaded. To load
  correctly, images must be located in the data directory of the
  current sketch. In most cases, load all images in setup to preload
  them at the start of the program. Loading images inside draw will
  reduce the speed of a program.

  The filename parameter can also be a URL to a file found online.

  The extension parameter is used to determine the image type in cases
  where the image filename does not end with a proper
  extension. Specify the extension as the second parameter to
  load-image, as shown in the third example on this page.

  If an image is not loaded successfully, the null value is returned
  and an error message will be printed to the console. The error
  message does not halt the program, however the null value may cause
  a NullPointerException if your code does not check whether the value
  returned from load-image is nil.

  Depending on the type of error, a PImage object may still be
  returned, but the width and height of the image will be set to
  -1. This happens if bad image data is returned or cannot be decoded
  properly. Sometimes this happens with image URLs that produce a 403
  error or that redirect to a password prompt, because load-image
  will attempt to interpret the HTML as image data."
  [filename]
  (.loadImage *applet* (str filename)))

(defn load-pixels
  "Loads the pixel data for the display window into the pixels[]
