How to prevent drawing XNA component when it is off-screen?
问题 I'm making a 2d game in XNA. When using drawable game components which one is better for performance? 1.When a component is not onscreen remove it from the components list and when its onscreen add it. 2.When its offscreen dont run its draw function (by using an "awake" bool field and an if statement around everything in the draw function) I'm using method 2 at the moment and it works fine. Its handy cus the draworder of components wont change (if I remove and re-add them it will, and I'll