diff --git a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.Designer.cs b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.Designer.cs deleted file mode 100644 index caf8f12b..00000000 --- a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.Designer.cs +++ /dev/null @@ -1,183 +0,0 @@ -namespace Examples.Windowing -{ - partial class W02_Multiple_GLControls - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.panel1 = new System.Windows.Forms.Panel(); - this.timer1 = new System.Windows.Forms.Timer(this.components); - this.panel2 = new System.Windows.Forms.Panel(); - this.create1 = new System.Windows.Forms.Button(); - this.dispose1 = new System.Windows.Forms.Button(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.create2 = new System.Windows.Forms.Button(); - this.dispose2 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel1.Location = new System.Drawing.Point(12, 12); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(283, 131); - this.panel1.TabIndex = 0; - // - // timer1 - // - this.timer1.Interval = 40; - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); - // - // panel2 - // - this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel2.Location = new System.Drawing.Point(12, 149); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(283, 130); - this.panel2.TabIndex = 0; - // - // create1 - // - this.create1.Location = new System.Drawing.Point(6, 19); - this.create1.Name = "create1"; - this.create1.Size = new System.Drawing.Size(63, 23); - this.create1.TabIndex = 0; - this.create1.Text = "Create"; - this.create1.UseVisualStyleBackColor = true; - this.create1.Click += new System.EventHandler(this.create1_Click); - // - // dispose1 - // - this.dispose1.Enabled = false; - this.dispose1.Location = new System.Drawing.Point(6, 48); - this.dispose1.Name = "dispose1"; - this.dispose1.Size = new System.Drawing.Size(63, 23); - this.dispose1.TabIndex = 0; - this.dispose1.Text = "Dispose"; - this.dispose1.UseVisualStyleBackColor = true; - this.dispose1.Click += new System.EventHandler(this.dispose1_Click); - // - // groupBox1 - // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox1.Controls.Add(this.create1); - this.groupBox1.Controls.Add(this.dispose1); - this.groupBox1.Location = new System.Drawing.Point(301, 12); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(75, 77); - this.groupBox1.TabIndex = 1; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Context"; - // - // groupBox2 - // - this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.groupBox2.Controls.Add(this.create2); - this.groupBox2.Controls.Add(this.dispose2); - this.groupBox2.Location = new System.Drawing.Point(301, 149); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(75, 77); - this.groupBox2.TabIndex = 2; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Context"; - // - // create2 - // - this.create2.Location = new System.Drawing.Point(6, 19); - this.create2.Name = "create2"; - this.create2.Size = new System.Drawing.Size(63, 23); - this.create2.TabIndex = 0; - this.create2.Text = "Create"; - this.create2.UseVisualStyleBackColor = true; - this.create2.Click += new System.EventHandler(this.create2_Click); - // - // dispose2 - // - this.dispose2.Enabled = false; - this.dispose2.Location = new System.Drawing.Point(6, 48); - this.dispose2.Name = "dispose2"; - this.dispose2.Size = new System.Drawing.Size(63, 23); - this.dispose2.TabIndex = 0; - this.dispose2.Text = "Dispose"; - this.dispose2.UseVisualStyleBackColor = true; - this.dispose2.Click += new System.EventHandler(this.dispose2_Click); - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(9, 287); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(210, 13); - this.label1.TabIndex = 3; - this.label1.Text = "Press F1 to toggle FullScreen / Windowed."; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(388, 310); - this.Controls.Add(this.label1); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.panel2); - this.Controls.Add(this.panel1); - this.KeyPreview = true; - this.Name = "Form1"; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; - this.Text = "Form1"; - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); - this.Load += new System.EventHandler(this.Form1_Load); - this.groupBox1.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Timer timer1; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Button create1; - private System.Windows.Forms.Button dispose1; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Button create2; - private System.Windows.Forms.Button dispose2; - private System.Windows.Forms.Label label1; - } -} - diff --git a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs deleted file mode 100644 index daebde58..00000000 --- a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs +++ /dev/null @@ -1,270 +0,0 @@ -#region --- License --- -/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos - * See license.txt for license info - */ -#endregion - -#region --- Using Directives --- - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using OpenTK.OpenGL; -using Enums = OpenTK.OpenGL.GL.Enums; -using OpenTK; -using OpenTK.Platform; - -#endregion - -namespace Examples.Windowing -{ - public partial class W02_Multiple_GLControls : Form - { - OpenTK.GLControl glWindow1, glWindow2; - - public W02_Multiple_GLControls() - { - InitializeComponent(); - - timer1.Enabled = true; - - throw new NotImplementedException(); - } - - protected override void OnClosed(EventArgs e) - { - base.OnClosed(e); - - if (glWindow1 != null) - glWindow1.Dispose(); - - if (glWindow2 != null) - glWindow2.Dispose(); - } - static float angle; - - #region Load event handler - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - OnResize(e); - } - - #endregion - - int count; - - private void timer1_Tick(object sender, EventArgs e) - { - PaintGLScene(); - - count++; - - if (count == 20) - create1_Click(null, EventArgs.Empty); - - if (glWindow1 == null) - return; - - //if (count == 60) - // ToggleFullScreen(); - - if (glWindow1.Fullscreen) - { - this.Location = new Point(this.Location.X + (int)(Math.Sin(count / (5 * Math.PI)) * 3), - this.Location.Y); - } - } - - protected override void OnPaint(PaintEventArgs e) - { - base.OnPaint(e); - PaintGLScene(); - } - - private void PaintGLScene() - { - RenderToContext(glWindow1, 0); - RenderToContext(glWindow2, 45); - - } - - private void RenderToContext(OpenTK.GLControl glWindow, float angle_add) - { - glWindow.Context.MakeCurrent(); - - GL.ClearColor(0.1f, 0.1f, 0.5f, 0.0f); - GL.Enable(Enums.EnableCap.DEPTH_TEST); - - GL.Viewport(0, 0, glWindow.Width, glWindow.Height); - - double ratio = 0.0; - ratio = glWindow.Width / (double)glWindow.Height; - - GL.MatrixMode(Enums.MatrixMode.PROJECTION); - GL.LoadIdentity(); - Glu.Perspective(45.0, ratio, 1.0, 64.0); - - - GL.MatrixMode(Enums.MatrixMode.MODELVIEW); - GL.LoadIdentity(); - Glu.LookAt( - 0.0, 5.0, 5.0, - 0.0, 0.0, 0.0, - 0.0, 1.0, 0.0 - ); - GL.Rotate(angle + angle_add, 0.0f, 1.0f, 0.0f); - angle += 0.5f; - - GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT | Enums.ClearBufferMask.DEPTH_BUFFER_BIT); - - DrawCube(); - - glWindow.Context.SwapBuffers(); - } - - #region KeyDown event handler - - protected override void OnKeyDown(KeyEventArgs e) - { - base.OnKeyDown(e); - - switch (e.KeyData) - { - case Keys.Escape: - Application.Exit(); - break; - - case Keys.F1: - //this.SetResolution(this.Width, this.Height, this.ColorDepth, !this.Fullscreen); - break; - } - } - - #endregion - - #region DrawCube - public void DrawCube() - { - GL.Begin(Enums.BeginMode.QUADS); - - GL.Color3(1, 0, 0); - GL.Vertex3(-1.0f, -1.0f, -1.0f); - GL.Vertex3(-1.0f, 1.0f, -1.0f); - GL.Vertex3(1.0f, 1.0f, -1.0f); - GL.Vertex3(1.0f, -1.0f, -1.0f); - - GL.Color3(1, 1, 0); - GL.Vertex3(-1.0f, -1.0f, -1.0f); - GL.Vertex3(1.0f, -1.0f, -1.0f); - GL.Vertex3(1.0f, -1.0f, 1.0f); - GL.Vertex3(-1.0f, -1.0f, 1.0f); - - GL.Color3(1, 0, 1); - GL.Vertex3(-1.0f, -1.0f, -1.0f); - GL.Vertex3(-1.0f, -1.0f, 1.0f); - GL.Vertex3(-1.0f, 1.0f, 1.0f); - GL.Vertex3(-1.0f, 1.0f, -1.0f); - - GL.Color3(0, 1, 0); - GL.Vertex3(-1.0f, -1.0f, 1.0f); - GL.Vertex3(1.0f, -1.0f, 1.0f); - GL.Vertex3(1.0f, 1.0f, 1.0f); - GL.Vertex3(-1.0f, 1.0f, 1.0f); - - GL.Color3(0, 0, 1); - GL.Vertex3(-1.0f, 1.0f, -1.0f); - GL.Vertex3(-1.0f, 1.0f, 1.0f); - GL.Vertex3(1.0f, 1.0f, 1.0f); - GL.Vertex3(1.0f, 1.0f, -1.0f); - - GL.Color3(0, 1, 1); - GL.Vertex3(1.0f, -1.0f, -1.0f); - GL.Vertex3(1.0f, 1.0f, -1.0f); - GL.Vertex3(1.0f, 1.0f, 1.0f); - GL.Vertex3(1.0f, -1.0f, 1.0f); - - GL.End(); - } - #endregion - - private void create1_Click(object sender, EventArgs e) - { - glWindow1 = new OpenTK.GLControl(); - - create1.Enabled = false; - dispose1.Enabled = true; - - - Text = - GL.GetString(Enums.StringName.VENDOR) + " " + - GL.GetString(Enums.StringName.RENDERER) + " " + - GL.GetString(Enums.StringName.VERSION); - - } - - private void create2_Click(object sender, EventArgs e) - { - //glWindow2 = GLContext.Create(panel2, new OpenTK.OpenGL.ColorDepth(8, 8, 8, 8), 8, 0); - glWindow2 = new GLControl( - new DisplayMode(0, 0, new ColorMode(32), 16, 0, 0, 2, false, false, false, 0.0f)); - - create2.Enabled = false; - dispose2.Enabled = true; - } - - private void dispose1_Click(object sender, EventArgs e) - { - glWindow1.Dispose(); - glWindow1 = null; - panel1.Invalidate(); - - create1.Enabled = true; - dispose1.Enabled = false; - } - - private void dispose2_Click(object sender, EventArgs e) - { - glWindow2.Dispose(); - glWindow2 = null; - panel2.Invalidate(); - - create2.Enabled = true; - dispose2.Enabled = false; - } - - private void Form1_Load(object sender, EventArgs e) - { - this.BringToFront(); - } - private void Form1_KeyDown(object sender, KeyEventArgs e) - { - if (glWindow1 == null) - return; - - if (e.KeyCode == Keys.F1) - { - ToggleFullScreen(); - } - } - - private void ToggleFullScreen() - { - glWindow1.Fullscreen = !glWindow1.Fullscreen; - /* - if (glWindow1.Fullscreen) - glWindow1.SetWindowed(); - else - { - glWindow1.SetFullScreen(640, 480, new OpenTK.OpenGL.ColorDepth(8, 8, 8, 8)); - } - */ - } - } -} diff --git a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.resx b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.resx deleted file mode 100644 index 93f75a97..00000000 --- a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.Designer.cs b/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.Designer.cs deleted file mode 100644 index 7aaa261c..00000000 --- a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace Examples.Windowing -{ - partial class W01_DisplayModesForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.listBox1 = new System.Windows.Forms.ListBox(); - this.SuspendLayout(); - // - // listBox1 - // - this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.listBox1.FormattingEnabled = true; - this.listBox1.Location = new System.Drawing.Point(0, 0); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(292, 264); - this.listBox1.TabIndex = 0; - // - // DisplayModes - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(292, 266); - this.Controls.Add(this.listBox1); - this.Name = "DisplayModes"; - this.Text = "Query Display Modes"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.ListBox listBox1; - } -} - diff --git a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs b/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs deleted file mode 100644 index 97767198..00000000 --- a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs +++ /dev/null @@ -1,38 +0,0 @@ -#region --- License --- -/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos - * See license.txt for license info - */ -#endregion - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using OpenTK; -using OpenTK.Platform; - -namespace Examples.Windowing -{ - public partial class W01_DisplayModesForm : Form - { - OpenTK.Platform.IGLControl glWindow; - - public W01_DisplayModesForm() - { - InitializeComponent(); - - glWindow = new GLControl(); - - IEnumerable modes = glWindow.Context.GetDisplayModes(); - - foreach (DisplayMode m in modes) - { - listBox1.Items.Add(m); - } - - } - } -} diff --git a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.resx b/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.resx deleted file mode 100644 index ff31a6db..00000000 --- a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs b/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs deleted file mode 100644 index c1d8efb1..00000000 --- a/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region --- License --- -/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos - * See license.txt for license info - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace QueryDisplayModes -{ - static class Program - { - - } -}