mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-06-19 12:57:58 +00:00
Deleted obsolete examples.
This commit is contained in:
parent
96b6ccebd8
commit
0ea1aaf6cf
|
@ -1,183 +0,0 @@
|
||||||
namespace Examples.Windowing
|
|
||||||
{
|
|
||||||
partial class W02_Multiple_GLControls
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,123 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
|
|
@ -1,60 +0,0 @@
|
||||||
namespace Examples.Windowing
|
|
||||||
{
|
|
||||||
partial class W01_DisplayModesForm
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -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<DisplayMode> modes = glWindow.Context.GetDisplayModes();
|
|
||||||
|
|
||||||
foreach (DisplayMode m in modes)
|
|
||||||
{
|
|
||||||
listBox1.Items.Add(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,120 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
|
@ -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
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue