Project

General

Profile

« Previous | Next » 

Revision 0b6f5ec2

Added by danij about 13 years ago

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.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences