diff --git a/ComputerGraphicsLab2/ComputerGraphicsLab2.csproj b/ComputerGraphicsLab2/ComputerGraphicsLab2.csproj
index 9f75a9f..aaadea9 100644
--- a/ComputerGraphicsLab2/ComputerGraphicsLab2.csproj
+++ b/ComputerGraphicsLab2/ComputerGraphicsLab2.csproj
@@ -33,15 +33,6 @@
4
-
- Lib\OpenTK.dll
-
-
- Lib\OpenTK.Compatibility.dll
-
-
- Lib\OpenTK.GLControl.dll
-
@@ -63,9 +54,6 @@
-
- Form1.cs
-
ResXFileCodeGenerator
Resources.Designer.cs
@@ -88,8 +76,5 @@
-
-
-
\ No newline at end of file
diff --git a/ComputerGraphicsLab2/Form1.Designer.cs b/ComputerGraphicsLab2/Form1.Designer.cs
index db1fb3d..32c849c 100644
--- a/ComputerGraphicsLab2/Form1.Designer.cs
+++ b/ComputerGraphicsLab2/Form1.Designer.cs
@@ -17,6 +17,7 @@ namespace ComputerGraphicsLab2
{
components.Dispose();
}
+
base.Dispose(disposing);
}
@@ -28,34 +29,12 @@ namespace ComputerGraphicsLab2
///
private void InitializeComponent()
{
- this.glControl1 = new OpenTK.GLControl();
- this.SuspendLayout();
- //
- // glControl1
- //
- this.glControl1.BackColor = System.Drawing.Color.Black;
- this.glControl1.Location = new System.Drawing.Point(12, 12);
- this.glControl1.Name = "glControl1";
- this.glControl1.Size = new System.Drawing.Size(776, 426);
- this.glControl1.TabIndex = 0;
- this.glControl1.VSync = false;
- this.glControl1.Load += new System.EventHandler(this.glControl1_Load);
- this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint);
- //
- // Form1
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
- this.Controls.Add(this.glControl1);
- this.Name = "Form1";
- this.Text = "OpenGL Triangle";
- this.Load += new System.EventHandler(this.Form1_Load);
- this.ResumeLayout(false);
+ this.Text = "Form1";
}
#endregion
-
- private OpenTK.GLControl glControl1;
}
}
\ No newline at end of file
diff --git a/ComputerGraphicsLab2/Form1.cs b/ComputerGraphicsLab2/Form1.cs
index 1649aca..d7952eb 100644
--- a/ComputerGraphicsLab2/Form1.cs
+++ b/ComputerGraphicsLab2/Form1.cs
@@ -1,71 +1,20 @@
using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
using System.Windows.Forms;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
namespace ComputerGraphicsLab2
{
public partial class Form1 : Form
{
- private bool glLoaded = false;
-
public Form1()
{
InitializeComponent();
}
-
- private void Form1_Load(object sender, EventArgs e)
- {
- // Форма загружена
- }
-
- private void glControl1_Load(object sender, EventArgs e)
- {
- glLoaded = true;
-
- // Настройка OpenGL
- GL.ClearColor(Color.White);
- GL.Enable(EnableCap.DepthTest);
-
- // Настройка viewport
- GL.Viewport(0, 0, glControl1.Width, glControl1.Height);
-
- // Настройка проекции
- GL.MatrixMode(MatrixMode.Projection);
- GL.LoadIdentity();
- GL.Ortho(-2.0, 2.0, -2.0, 2.0, -1.0, 1.0);
-
- GL.MatrixMode(MatrixMode.Modelview);
- GL.LoadIdentity();
-
- // Принудительная перерисовка
- glControl1.Invalidate();
- }
-
- private void glControl1_Paint(object sender, PaintEventArgs e)
- {
- if (!glLoaded) return;
-
- // Очистка экрана
- GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
-
- // Рисование треугольника
- GL.Begin(PrimitiveType.Triangles);
-
- GL.Color3(1.0f, 0.0f, 0.0f); // красная вершина
- GL.Vertex2(-1.0f, -1.0f);
-
- GL.Color3(0.0f, 1.0f, 0.0f); // зеленая вершина
- GL.Vertex2(1.0f, -1.0f);
-
- GL.Color3(0.0f, 0.0f, 1.0f); // синяя вершина
- GL.Vertex2(0.0f, 1.0f);
-
- GL.End();
-
- // Отображение результата
- glControl1.SwapBuffers();
- }
}
}
\ No newline at end of file
diff --git a/ComputerGraphicsLab2/Lib/OpenTK.Compatibility.dll b/ComputerGraphicsLab2/Lib/OpenTK.Compatibility.dll
deleted file mode 100644
index 46bbbf7..0000000
Binary files a/ComputerGraphicsLab2/Lib/OpenTK.Compatibility.dll and /dev/null differ
diff --git a/ComputerGraphicsLab2/Lib/OpenTK.GLControl.dll b/ComputerGraphicsLab2/Lib/OpenTK.GLControl.dll
deleted file mode 100644
index 8fad65c..0000000
Binary files a/ComputerGraphicsLab2/Lib/OpenTK.GLControl.dll and /dev/null differ
diff --git a/ComputerGraphicsLab2/Lib/OpenTK.dll b/ComputerGraphicsLab2/Lib/OpenTK.dll
deleted file mode 100644
index e792eef..0000000
Binary files a/ComputerGraphicsLab2/Lib/OpenTK.dll and /dev/null differ