diff --git a/GSS2.UI.Core/Views/CameraView.axaml.cs b/GSS2.UI.Core/Views/CameraView.axaml.cs index 2bec892..606e423 100644 --- a/GSS2.UI.Core/Views/CameraView.axaml.cs +++ b/GSS2.UI.Core/Views/CameraView.axaml.cs @@ -51,7 +51,7 @@ public partial class CameraView : OpenGlControlBase uniform mat4 uMvp; uniform mat3 uUv; - + out vec2 vUv; void main() @@ -59,7 +59,7 @@ public partial class CameraView : OpenGlControlBase vec3 uv = uUv * vec3(aUv, 1.0); vUv = uv.xy; gl_Position = uMvp * vec4(aPos, 0.0, 1.0); - } + } "; private const string FRAGMENT_SHADER = @" #version 300 es @@ -73,7 +73,7 @@ public partial class CameraView : OpenGlControlBase void main() { fragColor = texture(uTex, vUv); - } + } "; private readonly float[] Vertices = [ @@ -164,7 +164,7 @@ public partial class CameraView : OpenGlControlBase gl.BindVertexArray(VAO); ThrowIfOpenGLError(gl); - gl.BindBuffer(GlConsts.GL_ARRAY_BUFFER, VAO); ThrowIfOpenGLError(gl); + gl.BindBuffer(GlConsts.GL_ARRAY_BUFFER, VBO); ThrowIfOpenGLError(gl); unsafe { fixed (float* pVertices = Vertices) @@ -515,6 +515,7 @@ public partial class CameraView : OpenGlControlBase var tileMode = TileMode; // 1. Очищаем экран + gl.Disable(GlConsts.GL_SCISSOR_TEST); gl.Viewport(0, 0, (int)Bounds.Width, (int)Bounds.Height); gl.ClearColor(0f, 0f, 0f, 0f); gl.Clear(GlConsts.GL_COLOR_BUFFER_BIT); @@ -697,4 +698,4 @@ public partial class CameraView : OpenGlControlBase return (1f, 1f); } } -} \ No newline at end of file +}