From d582bfe473505829b440a17f86f1688b08cd5e09 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 5 Jun 2024 22:56:09 -0700 Subject: [PATCH] fix up some window behavior --- Examples/BasicComputeExample.cs | 2 ++ Examples/ClearScreen_MultiWindowExample.cs | 4 ++++ Examples/CompressedTexturesExample.cs | 10 ++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Examples/BasicComputeExample.cs b/Examples/BasicComputeExample.cs index 8c7b6cf..fcc181f 100644 --- a/Examples/BasicComputeExample.cs +++ b/Examples/BasicComputeExample.cs @@ -17,6 +17,8 @@ class BasicComputeExample : Example Window = window; GraphicsDevice = graphicsDevice; + Window.SetTitle("BasicCompute"); + // Create the compute pipeline that writes texture data Shader fillTextureComputeShader = new Shader( GraphicsDevice, diff --git a/Examples/ClearScreen_MultiWindowExample.cs b/Examples/ClearScreen_MultiWindowExample.cs index df9d4d8..6aec771 100644 --- a/Examples/ClearScreen_MultiWindowExample.cs +++ b/Examples/ClearScreen_MultiWindowExample.cs @@ -13,6 +13,8 @@ namespace MoonWorksGraphicsTests Window = window; GraphicsDevice = graphicsDevice; + Window.SetTitle("ClearScreen"); + Window.SetPosition(SDL2.SDL.SDL_WINDOWPOS_CENTERED, SDL2.SDL.SDL_WINDOWPOS_CENTERED); var (windowX, windowY) = Window.Position; Window.SetPosition(windowX - 360, windowY); @@ -66,6 +68,8 @@ namespace MoonWorksGraphicsTests { GraphicsDevice.UnclaimWindow(SecondaryWindow); SecondaryWindow.Dispose(); + + Window.SetPosition(SDL2.SDL.SDL_WINDOWPOS_CENTERED, SDL2.SDL.SDL_WINDOWPOS_CENTERED); } } } diff --git a/Examples/CompressedTexturesExample.cs b/Examples/CompressedTexturesExample.cs index e2b9aee..8d4891e 100644 --- a/Examples/CompressedTexturesExample.cs +++ b/Examples/CompressedTexturesExample.cs @@ -28,6 +28,8 @@ class CompressedTexturesExample : Example GraphicsDevice = graphicsDevice; Inputs = inputs; + Window.SetTitle("CompressedTextures"); + Logger.LogInfo("Press Left and Right to cycle between textures"); Logger.LogInfo("Setting texture to: " + TextureNames[0]); @@ -72,10 +74,10 @@ class CompressedTexturesExample : Example VertexBuffer = resourceUploader.CreateBuffer( [ - new PositionTextureVertex(new Vector3(-1, -1, 0), new Vector2(0, 0)), - new PositionTextureVertex(new Vector3(1, -1, 0), new Vector2(1, 0)), - new PositionTextureVertex(new Vector3(1, 1, 0), new Vector2(1, 1)), - new PositionTextureVertex(new Vector3(-1, 1, 0), new Vector2(0, 1)) + new PositionTextureVertex(new Vector3(-1, 1, 0), new Vector2(0, 0)), + new PositionTextureVertex(new Vector3( 1, 1, 0), new Vector2(1, 0)), + new PositionTextureVertex(new Vector3( 1, -1, 0), new Vector2(1, 1)), + new PositionTextureVertex(new Vector3(-1, -1, 0), new Vector2(0, 1)) ], BufferUsageFlags.Vertex );