Avoid redundantly setting viewport parameters in BeginFrame.
- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change. - Pass around scroll as an int2 to reduce the number of back-and-forth casts.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA
|
||||
return;
|
||||
|
||||
// Draw a black screen
|
||||
Game.Renderer.BeginFrame(float2.Zero, 1f);
|
||||
Game.Renderer.BeginFrame(int2.Zero, 1f);
|
||||
Game.Renderer.EndFrame( new NullInputHandler() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user