diff options
| -rw-r--r-- | Unicity.Game/Unicity.Game.csproj | 2 | ||||
| -rw-r--r-- | Unicity.Renderer/RenderWindow.cs | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Unicity.Game/Unicity.Game.csproj b/Unicity.Game/Unicity.Game.csproj index 01f81ba..a396e52 100644 --- a/Unicity.Game/Unicity.Game.csproj +++ b/Unicity.Game/Unicity.Game.csproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> diff --git a/Unicity.Renderer/RenderWindow.cs b/Unicity.Renderer/RenderWindow.cs index 823d866..8307f47 100644 --- a/Unicity.Renderer/RenderWindow.cs +++ b/Unicity.Renderer/RenderWindow.cs @@ -17,6 +17,8 @@ namespace Unicity.Renderer public string Title { get => window.Title; set => window.Title = value; } + public bool UpdateOnResize = false; + bool disposed = false; public RenderWindow(int width, int height, string title) @@ -36,7 +38,10 @@ namespace Unicity.Renderer { GL.Viewport(0, 0, Width, Height); - Window_RenderFrame(this, new FrameEventArgs()); + if (UpdateOnResize) + { + Window_RenderFrame(this, new FrameEventArgs()); + } } private void Window_UpdateFrame(object sender, FrameEventArgs e) |
