Updating only part of the screen

Started by
5 comments, last by Dwiel 21 years, 5 months ago
I was wondering how to update only a part of the screen. Do I have to use to d3d_device''s? I hope not... cause that would blow. so is it possible to draw half of the screen say when ''drawmap'' is true and the other half when ''drawtoolbar'' is true. Or both if both are true... with only one d3d_device... tazzel3d ~ dwiel
Advertisement
Hello,

I was just wondering how to only update part of the screen at a time. Is this only possible with ultipule d3d devices?

thanx for the help ahead of time!

tazzel3d ~ dwiel
You don''t update part of the screen. You update the whole screen. It''s the objects that you update either all or some. Let''s say, you have a toolbar, and a map. User click on one of the buttons on the toolbar, and the map shows something. You are not updating part of the screen where the map is, but you are updating only the map object (not the toolbar, thus the toolbar remains the same). And then update the whole screen. Since toolbar remains the same, it will appear to be "not updated."

My compiler generates one error message: "does not compile."
You can render on a part of the screen by using SetViewport function.
programmer
What I wanted to do was not render everything every pass. Lets say the toolbar hasn't changed. I don't want to have to re-render those sprites. Right now, If I don't re-render them, they disappear, Either with the color cleared to or the flashing red and green sequence i'm sure you all know about

maybe this makes more sence with this example:
Let's say you have 4 'area's acting as security cameras, but only want to rerender the cameras that have changed.

Is this possible?

does changing the viewport twice a frame solve this proble efficiently?

thanx a lot!

tazzel3d ~ dwiel

[edited by - tazzel3d on November 12, 2002 8:22:00 PM]
If I''m not wrong you can specify a RECT when flipping the backbuffer. Not sure if the clear function allows you to specify a RECT, but I''m quite certain it does.
I think changing the viewport can be a good solution here!!
programmer

This topic is closed to new replies.

Advertisement