Hello Guest

Author Topic: Set a clip region to clip out screen tilemap  (Read 4194 times)

stevexu

  • Newbie
  • *
  • Posts: 29
    • View Profile
Set a clip region to clip out screen tilemap
« on: December 06, 2013, 02:48:57 am »
I have a long long tilemap,  the character walk along with it . The camera bind to the character so we can fellow the character. But i found the fps is low on some device. So I want to set a clip region to disable drawing things which out of screen.  So Is it possible? I found tk2dcamera have a "viewport clipping", but I don't known how to use it!
« Last Edit: December 06, 2013, 02:52:11 am by stevexu »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Set a clip region to clip out screen tilemap
« Reply #1 on: December 06, 2013, 10:23:38 am »
The tile map is partitioned and culled outside the viewport. You should try to work out what the bottleneck is before optimising - Its far more likely that you are overdrawing too much or script bound than limited by culled triangles.