Mercurial > fife-parpg
changeset 572:da381ecca97d
* This is a better solution as in commit 3374. Now only visible instances be added to the RenderList. fixes[ticket:471]
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 30 Jun 2010 04:57:35 +0000 |
parents | edc9efe969c2 |
children | 716fbe02140a |
files | engine/core/view/layercache.cpp engine/core/view/renderers/instancerenderer.cpp |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/engine/core/view/layercache.cpp Tue Jun 29 02:26:28 2010 +0000 +++ b/engine/core/view/layercache.cpp Wed Jun 30 04:57:35 2010 +0000 @@ -311,7 +311,9 @@ updateEntry(entry); RenderItem& item = m_instances[entry.instance_index]; - if(!item.image) + InstanceVisual* visual = item.instance->getVisual<InstanceVisual>(); + bool visible = visual->isVisible(); + if(!item.image || !visible) continue; Point3D screen_point = m_camera->virtualScreenToScreen(item.screenpoint);
--- a/engine/core/view/renderers/instancerenderer.cpp Tue Jun 29 02:26:28 2010 +0000 +++ b/engine/core/view/renderers/instancerenderer.cpp Wed Jun 30 04:57:35 2010 +0000 @@ -128,10 +128,6 @@ InstanceVisual* visual = instance->getVisual<InstanceVisual>(); RenderItem& vc = **instance_it; unsigned char trans = visual->getTransparency(); - bool visible = visual->isVisible(); - - if(!visible) - continue; /** * the instance transparency value take precedence. If it's 0 use the layer trans