pioneerspacesim/pioneer — pull request #960 by Luomu (2012-02-11 19:16:04+00:00)
Title: Renderer (work in progress)

Read previous issue if you need background: #913, then the commits for current status.

Couple of extra things:

**Things left to do before merge (IMO)**
- If you see something really horrible, point it out and maybe we can find a better way
- Namespaces! I don't know if everything should go under Render::.
- Shouldn't produce warnings
- I don't think anything's broken in the current state, but could use more testing, there are a lot of changes

**Things left to do, the big picture**:
Simply: keep porting game code until no direct gl* calls remain, Keep implementing missing features as needed
Instead of just replacing each glBegin/glDraw* with renderer->Draw*, it would be good to wrap recurring cases in DrawQuad or Quad::Draw() style helper methods/classes.

**Performance**
...is not really one of the design concerns here. I have not noticed a difference, but there are a lot of redundant state changes because I want to ensure correct states before and after drawing. This can be optimized when everything is converted.