Mercurial > hg > Game > Cerium
changeset 1056:4955cedb17e5 draft
endy overflow in common rendering
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Dec 2010 17:36:15 +0900 |
parents | 9ce0480cde63 |
children | 8cd123d2f3ca |
files | Renderer/Engine/viewer.cc |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Tue Dec 14 11:37:15 2010 +0900 +++ b/Renderer/Engine/viewer.cc Tue Dec 14 17:36:15 2010 +0900 @@ -635,6 +635,10 @@ int index_start = range*i; int index_end = (index_start + range >= r[spi].spackList_length) ? r[spi].spackList_length : index_start + range; + int starty = index_start*split_screen_h + 1; + int endy = index_end*split_screen_h; + if (starty<=0) starty = 1; + if (endy>height) endy = height; HTaskPtr task_create_sp = manager->create_task(CreateSpan); @@ -650,8 +654,8 @@ * [649..864] [865..1080] */ - task_create_sp->set_param(1,index_start*split_screen_h + 1); - task_create_sp->set_param(2,index_end*split_screen_h); + task_create_sp->set_param(1,starty); + task_create_sp->set_param(2,endy); task_create_sp->add_inData(r[ppi].ppack, sizeof(PolygonPack)); task_create_sp->add_inData(r[spi].spackList_ptr,