pioneerspacesim/pioneer — pull request #1986 by robn (2013-01-22 08:45:30+00:00)
Title: SGModel: Use the same renderer everywhere

There's a few different calls in the SGModel classes that take a renderer as an argument. In reality though the different classes create all sorts of bits and pieces that are tied to a single renderer. There's no way that multiple different renderers (if we had them) are going to be able to work, so lets not try. This PR passes the renderer down from the loader to each node as its created, and they all use their "internal" renderer pointer to do stuff. So it should all run off the same renderer.

Having this will make my Lua stuff easier, as I won't need to keep passing `Pi::renderer` down to eg `Model::SetColors`, and I won't need. It helps me make `Model::ClearDecal` work by giving me a renderer through which I can access the cache to get the transparent texture that I know is there. I'm sure it'll help in other places as time goes on.