From 7cb47c721b1aa474763fcb2a953a63f9d9fd4678 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sun, 5 May 2024 16:45:43 +0300 Subject: [PATCH] Fix 90 degree rotation error in Image2D --- Quik/VertexGenerator/VertexCommandEngine.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Quik/VertexGenerator/VertexCommandEngine.cs b/Quik/VertexGenerator/VertexCommandEngine.cs index 59a5bc6..9b9333c 100644 --- a/Quik/VertexGenerator/VertexCommandEngine.cs +++ b/Quik/VertexGenerator/VertexCommandEngine.cs @@ -1050,20 +1050,20 @@ namespace Quik.VertexGenerator DrawQueue.RestoreOffset(); QuikVertex vertex = ImageVertex; - vertex.Position = new QVec2(rect.Top, rect.Left); - vertex.TextureCoordinates = new QVec2(uvs.Top, uvs.Left); + vertex.Position = new QVec2(rect.Left, rect.Top); + vertex.TextureCoordinates = new QVec2(uvs.Left, uvs.Top); DrawQueue.AddVertex(vertex); - vertex.Position = new QVec2(rect.Bottom, rect.Left); - vertex.TextureCoordinates = new QVec2(uvs.Bottom, uvs.Left); + vertex.Position = new QVec2(rect.Left, rect.Bottom); + vertex.TextureCoordinates = new QVec2(uvs.Left, uvs.Bottom); DrawQueue.AddVertex(vertex); - vertex.Position = new QVec2(rect.Bottom, rect.Right); - vertex.TextureCoordinates = new QVec2(uvs.Bottom, uvs.Right); + vertex.Position = new QVec2(rect.Right, rect.Bottom); + vertex.TextureCoordinates = new QVec2(uvs.Right, uvs.Bottom); DrawQueue.AddVertex(vertex); - vertex.Position = new QVec2(rect.Top, rect.Right); - vertex.TextureCoordinates = new QVec2(uvs.Top, uvs.Right); + vertex.Position = new QVec2(rect.Right, rect.Top); + vertex.TextureCoordinates = new QVec2(uvs.Right, uvs.Right); DrawQueue.AddVertex(vertex); DrawQueue.AddElement(0); DrawQueue.AddElement(2); DrawQueue.AddElement(3);