Author Topic: Could i only draw the object3Ds which are modified per frame?  (Read 771 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Could i only draw the object3Ds which are modified per frame?
« on: January 21, 2013, 09:56:10 am »
In my game, some scene has a fixed camera, so there are some object3Ds which are staying the same per frame(background, trees and so on).

I want to just redraw the object3Ds which are modified per frame(for example: animated objs), don't redraw the others.

How to do this? And how much is the difference of the performance between the 2 methods(one is redrawing all the objects per frame, the other is just redrawing the modified ones.) Could i keep some pixes in the framebuffer instead of refilling it?


Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11963
    • View Profile
    • http://www.jpct.net
Re: Could i only draw the object3Ds which are modified per frame?
« Reply #1 on: January 21, 2013, 10:13:09 am »
For most scenes, you can't do this, because you'll run into a lot of depth buffer issues that way. If they are really separated, you can try to render your static scene into an npot-texture and blit that as a background image. By sure to use OpenGL ES 2.0 for this, because otherwise render-to-texture doesn't work on some devices due to driver problems.