Merge pull request #48 from rlk/master

Convert OVR SensorFusion to dynamic allocation

Closes #21
Add a "particle" material type

This has the effect of enabling point sprite mode and rendering mesh
geometry with DrawArrays(POINTS) instead of DrawElements(TRIANGLES).
This facility will enable the efficient reimplementation of the goal
and jump visuals.

Enabling this flag on basic-ball is a real surprise!
Tweaks to material effects

Fix additive material to support texture alpha.
Fix particle material to attenuate with distance according to perspective.
Add third light source to be used for sparkle effects
Replace goal and jump

The new goal and jump effects combine the new particle material effect with
the new sparkle light source to produce sparkly particles. This reduces
overdraw dramatically and improves performance significantly under fill
limited circumstances. The jump is now rendered in a single batch and the
goal is rendered in two.
Add a logging facility
Restructure entity drawing

This change was initially intended to resolve part of Issue #51, specifically
the desktop-isms that had crept into the ES code, glPushAttrib, etc.

On examination, it was recognized that entity rendering was structured
inefficiently. Each goal and jump entity consists of both a light beam
effect and a particle effect. The renderer looped over these entities and
drew the beam and particles of each in turn. With many such entities in the
scene, the light beam rendering state was set up and torn down many times
per frame.

This new implementation sets up the beam state only once and renders all
goal, jump, and switch beams togather. It then tears down the beam state and
renders the goal and jump particles, which are (as of recently) handled by the
main material handler (and are thus self-optimizing).

The resulting code is cleaner and better organized.
Work around SDL+WGL returning GL contexts below minimum specifications
Add glPointParameterf to glext

We need this function to take control of point sprite minimum and
maximum sizes.
Add point min and max size specification

Point sprite scaling is somewhat unpredictable, and varies from one
driver to the next. The most significant differences are the default
values giving the range of sizes at which a sprite can appear. So
we need to specify limits explicitly if we want consistency across all
platforms. Unfortunately, the order and time at which these values are
set appears to determine whether they take hold or not. This too varies
from one platform to the next.

This change takes control of the situation on Linux NVIDIA. Hopefully
it'll port. The maximum sprite size is set to one quarter of the height
of the screen (this is a value in pixels) and the default sizes of the
entity particles are given at around a tenth the height of the screen
(this is a value in pixels as viewed from a distance of 1 unit).

The distance attenuation factors give the change in the AREA of a point,
not the diameter (as do ALL the other values), so perspective-correct
point attenuation must use the quadratic coefficient, not the linear
one. This corrected interpretation is put to use for both coin particles
and material particles.
Merge pull request #54 from parasti/wgl-minimum-spec

Work around SDL+WGL returning GL contexts below minimum specifications
Tune particles sizes

Coin burst particle size had gotten out of sync with goal particles size.
Also, particle size now takes into account HMD mode.

As point sprites, particle sizes are specified in real on-screen pixels
instead of in world units (meters). Size is determined as a fraction of
screen height so that they remain consistent through resolution changes.
However, HMD mode uses a high-resolution off-screen buffer, and that
buffer has an 8:9 ratio instead of 16:9, so the particle size calculation
has to be special-cased.
Merge pull request #53 from rlk/newgoal

New goal and jump effects

Close #30
Close #31
Merge pull request #55 from rlk/master

OpenGL ES compliance

Close #23
Close #51
Merge pull request #57 from rlk/master

Fix dark ring around green coin pad
Restrict tilt speed modifier to values equal to/above DT

Close #42
Straighten out GL extension error handling

I got my message box mixed up with @parasti's logger. We should stick with
the logger.