Added invert option and minor cleanup

Image can now be drawn inverted.
init now returns false to inform client code of failure.
setWindow now checks for a valid gl context.
Tweaked some variable names.
Reworked demo code a bit.