Sign in to follow this  
ReadingSteiner

how to go about implementing sub-region rendering?

Recommended Posts

ReadingSteiner    103

I'm finishing the renderer for my engine and I'm not quite sure what the most efficient method for implementing redraw regions would be. Does anyone have any advice for efficient detection of changes in the framebuffer and if any/how much wiggle room should be allowed in those changes?

Edited by ReadingSteiner

Share this post


Link to post
Share on other sites
ReadingSteiner    103

Sorry, let me clarify. I'm referring to regions of the screen that would need to be redrawn each frame.

 

Edit: I shouldn't be posting after crunch sessions, I meant to say redraw regions.

Edited by ReadingSteiner

Share this post


Link to post
Share on other sites
LorenzoGatti    4442

If we are talking about a game, the whole screen is redrawn every frame.

Otherwise you need to be more specific as to your goals.

What remains provably constant between frames is usually a bezel or a background image, and rendering this kind of thing is a large but dirt cheap blitting operation.

Everything else has a chance to remain constant (e.g. entering a pause mode, perfect immobility) but ordinarily there is no reason for optimizations:

  • Your performance target is being able to draw all objects to the whole screen every frame: making a "lucky" case.cheaper is pointless.
    Instead, drawing performance is improved by reducing the worst case number and cost of draw calls regardless of what changes from frame to frame (for instance, limiting the number of game entities in the game rules to limit drawn objects).
  • Tracking regions where you aren't going to draw anything does little good: you are drawing objects, not screen regions, and a small dirty region means that the objects are concentrating the same amount of drawing effort into a smaller part of the frame buffer, which might or might not be good for performance.
    Instead, you should cull objects to do less work, but culling criteria include importance, visibility and the like, not screen-space location.
Edited by LorenzoGatti

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this