Add separate methods for beginning and ending drawing for Scene.

This commit is contained in:
2024-01-21 00:58:21 +01:00
parent 0f829c5d08
commit 85834170ab
3 changed files with 11 additions and 17 deletions

View File

@@ -76,6 +76,8 @@ public class TestGame : Game
while (_scene.ShouldRun)
{
_scene.Update();
_scene.BeginDraw();
_scene.EndDraw();
double frameTimeMs = _renderer.FrameTime * 1000f;

View File

@@ -81,19 +81,6 @@ public class UiLayer : Layer
contentPanel.AddChild(verticalPanel);
verticalPanel.AddChild(exampleText);
// var verticalPanel = new VerticalPanel(new PanelStyle()
// {
// BackgroundColor = Color.White,
// });
// verticalPanel.ExpandRatio = new Vector2(1f, 0.5f);
// _panel.AddChild(verticalPanel);
// verticalPanel.AddChild(new Panel(new PanelStyle() { BackgroundColor = Color.Red }));
// verticalPanel.AddChild(new Panel(new PanelStyle() { BackgroundColor = Color.Green }));
// verticalPanel.AddChild(new Panel(new PanelStyle() { BackgroundColor = Color.Blue }));
}
private void GetResources()