comparison engine/core/view/camera.cpp @ 240:09f40db3f10c

Removed unused TimerListener. Fix: We really don't need to copy the instance list each frame! Fix: Don't swallow mouse focus events (i.o.w mouse entered/exited APP window events. These are now propagated as Command events (for now) and can be used to stop scrolling when the mouse leaves the app window).
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 24 Mar 2009 16:50:37 +0000
parents 56ac89189bc4
children ed1565a5a2a0
comparison
equal deleted inserted replaced
239:3804348fe3fb 240:09f40db3f10c
495 495
496 // sort instances on layer based on stack position + camera distance. done only once 496 // sort instances on layer based on stack position + camera distance. done only once
497 // here instead passing it to each renderer. 497 // here instead passing it to each renderer.
498 // instances are checked first if their image intersects with the viewport. 498 // instances are checked first if their image intersects with the viewport.
499 // this reduces processing load during sorting later 499 // this reduces processing load during sorting later
500 std::vector<Instance*> allinstances((*layer_it)->getInstances()); 500 const std::vector<Instance*>& allinstances = (*layer_it)->getInstances();
501 std::vector<Instance*>::const_iterator instance_it = allinstances.begin(); 501 std::vector<Instance*>::const_iterator instance_it = allinstances.begin();
502 std::vector<Instance*>& instances_to_render = m_layer_to_instances[*layer_it]; 502 std::vector<Instance*>& instances_to_render = m_layer_to_instances[*layer_it];
503 for (;instance_it != allinstances.end(); ++instance_it) { 503 for (;instance_it != allinstances.end(); ++instance_it) {
504 Instance* instance = *instance_it; 504 Instance* instance = *instance_it;
505 InstanceVisual* visual = instance->getVisual<InstanceVisual>(); 505 InstanceVisual* visual = instance->getVisual<InstanceVisual>();