Renderer: Separate drawable map geometry generation from drawing
Geometry Shards are now constructed from/for all map constructs and projections (dynamic lights/shadows) independently of RenderSystem's DrawLists. Each Shard records all the information necessary to write the geometry to the relevant DrawList(s) later, at render time.
When drawing the map one traverses the BSP, preparing the Shards for a given subspace before drawing them all in a single DrawList write loop in drawCurrentSubspace(). Writing to the DrawLists is now works without any knowledge of the map geometry from which the Shards were produced.
At present this is a pretty ugly hack. Shards are fully rebuilt every frame and its all rather messy. However, now that geometry generation and drawing has been fully separated we can now begin remodeling the code into a form which allows for Shards to be "frozen" for use over multiple render frames.
Renderer: Separate drawable map geometry generation from drawing
Geometry Shards are now constructed from/for all map constructs and
projections (dynamic lights/shadows) independently of RenderSystem's
DrawLists. Each Shard records all the information necessary to write
the geometry to the relevant DrawList(s) later, at render time.
When drawing the map one traverses the BSP, preparing the Shards for
a given subspace before drawing them all in a single DrawList write
loop in drawCurrentSubspace(). Writing to the DrawLists is now works
without any knowledge of the map geometry from which the Shards were
produced.
At present this is a pretty ugly hack. Shards are fully rebuilt every
frame and its all rather messy. However, now that geometry generation
and drawing has been fully separated we can now begin remodeling the
code into a form which allows for Shards to be "frozen" for use over
multiple render frames.
Todo: A lot of cleanup.