Neverball/neverball — pull request #52 by rlk (2014-03-19 19:27:34+00:00)
Title: 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.