The documentation of PlanarReflections::setMaxActiveActors
says "You may have many actors (i.e. 1000 actors), but for performance and memory reasons you may only want 1-5 actors at the same time." However, the maxActiveActors
parameter has type uint8
, giving an upper limit of 255. The member variable mMaxActiveActors
also has type uint8
. Is this a bug, or is the documentation wrong that you could have 1000 actors?
Maximum number of mirrors
-
- Goblin
- Posts: 285
- Joined: Thu Aug 12, 2021 10:06 pm
- Location: San Diego, CA, USA
- x 21
Maximum number of mirrors
-
- OGRE Team Member
- Posts: 5502
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1370
Re: Maximum number of mirrors
IIRC you can call addActor() as many times as your RAM allows; but setMaxActiveActors( maxActiveActors, ... ) controls how many actors can be concurrently showing reflections.
e.g. you can have 1000 actors but up to 255 will show up at the same time. The other 745 actors will not show reflections until the camera gets closer to them and a slot from the actors further away is given up for ones that need higher priority.
The general idea is that if you place a couple mirrors in many rooms, maxActiveActors = 2 means only 2 mirrors will be active (to avoid destroying performance), while you could visit each room (which could have a dozen or more) and everything would still work; as long as you don't have more than 2 mirrors close around.