Revision 0b6f5ec2
Added by danij about 13 years ago
Files
- added
- modified
- copied
- renamed
- deleted
- doomsday
- engine
- portable
- include
- src
- gl_main.c (diff)
- material.c (diff)
- materialvariant.c (diff)
- p_materialmanager.c (diff)
- pathdirectory.c (diff)
- r_draw.c (diff)
- r_lumobjs.c (diff)
- r_model.c (diff)
- r_sky.c (diff)
- r_things.c (diff)
- r_world.c (diff)
- rend_console.c (diff)
- rend_fakeradio.c (diff)
- rend_main.c (diff)
- rend_model.c (diff)
- rend_sky.c (diff)
- rend_sprite.c (diff)
- ui2_main.c (diff)
- portable
- engine
Refactor: Cache MaterialSnapshots produced by MaterialsPrepare
Now that we have render context variants of Material (i.e., MaterialVariant)
it is no longer necessary to allocate MaterialSnapshots on the stack
each time they are needed. Instead, store a copy of the snapshot in the
variant instance.
Todo: Presently the cached MaterialSnapshot owned by MaterialVariant is
updated on each call to Materials::Prepare (when snapshot updating is
enabled). It should now be possible to update only once per render frame.
Todo: Cleanup the object API for material preparation.