mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 12:15:37 +00:00
Moved and renamed examples to match the new example structurs.
Made example source code visible for all examples in example browser. Updated Prebuild.exe to newest SVN version (resolves issues with resources). Added .rtf and .resx files to Examples project in Prebuild.xml.
This commit is contained in:
parent
202c8f13f0
commit
989be84c96
Binary file not shown.
|
@ -165,6 +165,8 @@
|
|||
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
<Match path="." pattern="*.rtf" recurse="true" buildAction="EmbeddedResource" />
|
||||
<Match path="." pattern="*.resx" recurse="true" buildAction="EmbeddedResource"/>
|
||||
<Match path="../Examples/Data" pattern="^.*\.(bmp|png|jpg|txt|glsl|wav|ogg)$" useRegex="true" recurse="true" buildAction="None" copyToOutput="Always"/>
|
||||
<Match path="./Data" pattern="*.txt" recurse="true" buildAction="None" copyToOutput="Always"/>
|
||||
<Match path="./Data" pattern="*.glsl" recurse="true" buildAction="None" copyToOutput="Always"/>
|
||||
|
|
|
@ -28,6 +28,9 @@ namespace Examples
|
|||
public ExampleAttribute(string title, ExampleCategory category, string subcategory, int difficulty)
|
||||
: this(title, category, subcategory, difficulty, true) { }
|
||||
|
||||
public ExampleAttribute(string title, ExampleCategory category, string subcategory, bool visible)
|
||||
: this(title, category, subcategory, 0, visible) { }
|
||||
|
||||
public ExampleAttribute(string title, ExampleCategory category, string subcategory, int difficulty, bool visible)
|
||||
{
|
||||
this.Title = title;
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using Examples.Properties;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using Examples.Properties;
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
|
@ -47,9 +43,11 @@ namespace Examples
|
|||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
LoadSamplesFromAssembly(Assembly.GetExecutingAssembly());
|
||||
|
||||
Debug.Listeners.Add(new TextBoxTraceListener(textBoxOutput));
|
||||
treeViewSamples.TreeViewNodeSorter = new SamplesTreeViewSorter();
|
||||
|
||||
LoadSamplesFromAssembly(Assembly.GetExecutingAssembly());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -70,6 +68,7 @@ namespace Examples
|
|||
else
|
||||
{
|
||||
richTextBoxDescription.Rtf = String.Empty;
|
||||
richTextBoxDescription.Text = "Documentation has not been entered.";
|
||||
richTextBoxSource.Rtf = String.Empty;
|
||||
}
|
||||
}
|
||||
|
|
109
Source/Examples/ExampleLauncher.Designer.cs
generated
109
Source/Examples/ExampleLauncher.Designer.cs
generated
|
@ -1,109 +0,0 @@
|
|||
namespace Examples
|
||||
{
|
||||
partial class ExampleLauncher
|
||||
{
|
||||
/// <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.runButton = new System.Windows.Forms.Button();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
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.Margin = new System.Windows.Forms.Padding(1);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(292, 212);
|
||||
this.listBox1.Sorted = true;
|
||||
this.listBox1.TabIndex = 0;
|
||||
this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
|
||||
this.listBox1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.listBox1_KeyUp);
|
||||
//
|
||||
// runButton
|
||||
//
|
||||
this.runButton.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.runButton.Location = new System.Drawing.Point(0, 0);
|
||||
this.runButton.Margin = new System.Windows.Forms.Padding(1);
|
||||
this.runButton.Name = "runButton";
|
||||
this.runButton.Size = new System.Drawing.Size(292, 52);
|
||||
this.runButton.TabIndex = 0;
|
||||
this.runButton.Text = "Run Example";
|
||||
this.runButton.UseVisualStyleBackColor = true;
|
||||
this.runButton.Click += new System.EventHandler(this.runButton_Click);
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.IsSplitterFixed = true;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.listBox1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.runButton);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(292, 266);
|
||||
this.splitContainer1.SplitterDistance = 213;
|
||||
this.splitContainer1.SplitterWidth = 1;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// ExampleLauncher
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(292, 366);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.MinimumSize = new System.Drawing.Size(300, 400);
|
||||
this.Name = "ExampleLauncher";
|
||||
this.Text = "OpenTK Example Launcher";
|
||||
this.Load += new System.EventHandler(this.ExampleLauncher_Load);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ExampleLauncher_FormClosing);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
private System.Windows.Forms.Button runButton;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
|
||||
}
|
||||
}
|
|
@ -1,203 +0,0 @@
|
|||
#region --- License ---
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||
* This notice may not be removed from any source distribution.
|
||||
* See license.txt for licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#region --- Using Directives ---
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
using System.Security.Policy;
|
||||
using System.IO;
|
||||
|
||||
using OpenTK;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Examples
|
||||
{
|
||||
[Obsolete]
|
||||
public partial class ExampleLauncher : Form
|
||||
{
|
||||
bool show_hidden;
|
||||
List<ExampleInfo> hidden_items = new List<ExampleInfo>();
|
||||
|
||||
#region --- Constructor ---
|
||||
|
||||
public ExampleLauncher()
|
||||
{
|
||||
this.Font = SystemFonts.MessageBoxFont;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public void ExampleLauncher_Load(object sender, EventArgs e)
|
||||
|
||||
public void ExampleLauncher_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Get all examples
|
||||
Type[] types = Assembly.GetExecutingAssembly().GetTypes();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (Type type in types)
|
||||
{
|
||||
object[] attributes = type.GetCustomAttributes(false);
|
||||
ExampleAttribute example = null;
|
||||
foreach (object attr in attributes)
|
||||
if (attr is ExampleAttribute)
|
||||
example = (ExampleAttribute)attr;
|
||||
|
||||
if (example != null)
|
||||
{
|
||||
//sb.Append(example.Category);
|
||||
//sb.Append(" ");
|
||||
//if (example.Difficulty < 10)
|
||||
// sb.Append("0"); // To keep items nicely sorted.
|
||||
//sb.Append(example.Difficulty);
|
||||
//sb.Append(": ");
|
||||
////sb.Append(type.Name);
|
||||
//sb.Append(example.Title);
|
||||
|
||||
if (example.Visible)
|
||||
{
|
||||
listBox1.Items.Add(new ExampleInfo(type, example));
|
||||
}
|
||||
else
|
||||
{
|
||||
#if DEBUG
|
||||
example.Title += " (hidden)";
|
||||
listBox1.Items.Add(new ExampleInfo(type, example));
|
||||
#else
|
||||
hidden_items.Add(new ExampleInfo(type, example));
|
||||
#endif
|
||||
}
|
||||
// Clean the StringBuilder for the next pass.
|
||||
sb.Remove(0, sb.Length);
|
||||
}
|
||||
}
|
||||
// Select first item
|
||||
if (listBox1.Items.Count > 0)
|
||||
this.listBox1.SelectedIndex = 0;
|
||||
|
||||
RaiseWindow();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
void RaiseWindow()
|
||||
{
|
||||
// Force the ExampleLauncher to appear.
|
||||
this.TopMost = false;
|
||||
this.TopMost = true;
|
||||
this.TopMost = false;
|
||||
}
|
||||
|
||||
#region private void RunExample()
|
||||
|
||||
private void RunExample()
|
||||
{
|
||||
if (listBox1.SelectedItem != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
ExampleInfo info = (ExampleInfo)listBox1.SelectedItem;
|
||||
Type example = info.Example;
|
||||
|
||||
Debug.Print("Launching example: {0}", example.ToString());
|
||||
this.Visible = false;
|
||||
Application.DoEvents();
|
||||
|
||||
example.GetMethod("Main").Invoke(null, null);
|
||||
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
GC.Collect();
|
||||
|
||||
}
|
||||
catch (TargetInvocationException expt)
|
||||
{
|
||||
string ex_info;
|
||||
if (expt.InnerException != null)
|
||||
ex_info = expt.InnerException.ToString();
|
||||
else
|
||||
ex_info = expt.ToString();
|
||||
MessageBox.Show(ex_info, "An OpenTK example encountered an error.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
|
||||
Debug.Print(expt.ToString());
|
||||
#if DEBUG
|
||||
//throw;
|
||||
#endif
|
||||
}
|
||||
catch (NullReferenceException expt)
|
||||
{
|
||||
MessageBox.Show(expt.ToString(), "The Example launcher failed to load the example.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.Visible = true;
|
||||
RaiseWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Launcher events
|
||||
|
||||
private void listBox1_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
RunExample();
|
||||
}
|
||||
|
||||
private void listBox1_KeyUp(object sender, KeyEventArgs e)
|
||||
{
|
||||
switch (e.KeyCode)
|
||||
{
|
||||
case Keys.Enter:
|
||||
RunExample();
|
||||
break;
|
||||
|
||||
// On Ctrl+F1 enable hidden items (for debugging/testing OpenTK)
|
||||
case Keys.F1:
|
||||
if (e.Control)
|
||||
show_hidden = !show_hidden;
|
||||
|
||||
if (show_hidden)
|
||||
listBox1.Items.AddRange(hidden_items.ToArray());
|
||||
else
|
||||
foreach (ExampleInfo item in hidden_items)
|
||||
listBox1.Items.Remove(item);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void runButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
RunExample();
|
||||
}
|
||||
|
||||
private void ExampleLauncher_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
Debug.Flush();
|
||||
Debug.Close();
|
||||
Trace.Flush();
|
||||
Trace.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ using OpenTK.Graphics;
|
|||
|
||||
namespace Examples.Tutorial
|
||||
{
|
||||
[Example("Display Lists", ExampleCategory.OpenGL, "1.1")]
|
||||
[Example("Display Lists", ExampleCategory.OpenGL, "1.1", Documentation="DisplayLists")]
|
||||
public class T07_Display_Lists_Flower : GameWindow
|
||||
{
|
||||
#region --- Fields ---
|
|
@ -25,7 +25,7 @@ namespace Examples.Tutorial
|
|||
/// <summary>
|
||||
/// Demonstrates immediate mode rendering.
|
||||
/// </summary>
|
||||
[Example("Immediate mode", ExampleCategory.OpenGL, "1.1")]
|
||||
[Example("Immediate mode", ExampleCategory.OpenGL, "1.1", Documentation="ImmediateMode")]
|
||||
public class T03_Immediate_Mode_Cube : GameWindow
|
||||
{
|
||||
#region --- Fields ---
|
|
@ -23,7 +23,7 @@ namespace Examples.Tutorial
|
|||
/// <summary>
|
||||
/// Demonstrates simple OpenGL Texturing.
|
||||
/// </summary>
|
||||
[Example("Texture mapping", ExampleCategory.OpenGL, "1.1")]
|
||||
[Example("Texture mapping", ExampleCategory.OpenGL, "1.1", Documentation="Textures")]
|
||||
public class Textures : GameWindow
|
||||
{
|
||||
Bitmap bitmap = new Bitmap("Data/logo.jpg");
|
|
@ -19,7 +19,7 @@ namespace Examples.Tutorial
|
|||
/// <summary>
|
||||
/// Demonstrates fixed-function OpenGL lighting. Example is incomplete (documentation).
|
||||
/// </summary>
|
||||
[Example("Vertex Lighting", ExampleCategory.OpenGL, "1.1")]
|
||||
[Example("Vertex Lighting", ExampleCategory.OpenGL, "1.1", false)]
|
||||
public class T04_Vertex_Lighting : GameWindow
|
||||
{
|
||||
float x_angle, zoom;
|
|
@ -21,7 +21,7 @@ using OpenTK.Math;
|
|||
|
||||
namespace Examples.Tutorial
|
||||
{
|
||||
[Example("Vertex Buffer Objects", ExampleCategory.OpenGL, "1.5")]
|
||||
[Example("Vertex Buffer Objects", ExampleCategory.OpenGL, "1.5", Documentation="VertexBufferObjects")]
|
||||
public class T08_VBO : GameWindow
|
||||
{
|
||||
#region --- Private Fields ---
|
|
@ -18,7 +18,7 @@ using OpenTK.Graphics.OpenGL;
|
|||
|
||||
namespace Examples.Tutorial
|
||||
{
|
||||
[Example("Framebuffer Objects", ExampleCategory.OpenGL, "FBO", Documentation = "FramebufferObject")]
|
||||
[Example("Framebuffer Objects", ExampleCategory.OpenGL, "FBO", Documentation="FramebufferObject")]
|
||||
public class SimpleFBO : GameWindow
|
||||
{
|
||||
public SimpleFBO()
|
|
@ -26,7 +26,7 @@ namespace Examples.Tutorial
|
|||
/// One more major optimization could be applied (exploit the symmetry of the image with RTT), but
|
||||
/// that would make the program alot more complicated to follow. You can do this as an exercise.
|
||||
/// </summary>
|
||||
[Example("GLSL Animated Julia Set", ExampleCategory.OpenGL, "GLSL")]
|
||||
[Example("GLSL Animated Julia Set", ExampleCategory.OpenGL, "GLSL", Documentation="JuliaSetFractal.cs")]
|
||||
public class JuliaSetFractal : GameWindow
|
||||
{
|
||||
public JuliaSetFractal()
|
|
@ -29,7 +29,7 @@ namespace Examples.Tutorial
|
|||
/// <summary>
|
||||
/// Demonstrates how to load and use a simple OpenGL shader program. Example is incomplete (documentation).
|
||||
/// </summary>
|
||||
[Example("First shader", ExampleCategory.OpenGL, "GLSL")]
|
||||
[Example("First shader", ExampleCategory.OpenGL, "GLSL", Documentation="SimpleGLSL")]
|
||||
public class T10_GLSL_Cube : GameWindow
|
||||
{
|
||||
#region --- Fields ---
|
|
@ -20,8 +20,8 @@ namespace Examples.Tutorial
|
|||
/// <summary>
|
||||
/// Shows how to render and scroll large amounts of text.
|
||||
/// </summary>
|
||||
[Example("Font rendering (advanced)", ExampleCategory.OpenTK, "Fonts", 2)]
|
||||
public class Text : GameWindow
|
||||
[Example("Font rendering (advanced)", ExampleCategory.OpenTK, "Fonts", 2, Documentation="FontRenderingAdvanced")]
|
||||
public class FontRenderingAdvanced : GameWindow
|
||||
{
|
||||
Font serif = new Font(FontFamily.GenericSerif, 16.0f);
|
||||
Font sans = new Font(FontFamily.GenericSansSerif, 18.0f);
|
||||
|
@ -35,7 +35,7 @@ namespace Examples.Tutorial
|
|||
float wraparound_position;
|
||||
float current_position;
|
||||
|
||||
public Text()
|
||||
public FontRenderingAdvanced()
|
||||
: base(800, 600)
|
||||
{ }
|
||||
|
||||
|
@ -147,7 +147,7 @@ namespace Examples.Tutorial
|
|||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
using (Text example = new Text())
|
||||
using (FontRenderingAdvanced example = new FontRenderingAdvanced())
|
||||
{
|
||||
// Get the title and category of this example using reflection.
|
||||
ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]);
|
|
@ -1,6 +1,6 @@
|
|||
namespace Examples.WinForms
|
||||
{
|
||||
partial class FontRendering
|
||||
partial class FontRenderingBasic
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
|
@ -9,8 +9,8 @@ using OpenTK.Graphics;
|
|||
|
||||
namespace Examples.WinForms
|
||||
{
|
||||
[Example("Font rendering (basic)", ExampleCategory.OpenTK, "Fonts", Difficulty = 1, Documentation = "FontRendering")]
|
||||
public partial class FontRendering : Form
|
||||
[Example("Font rendering (basic)", ExampleCategory.OpenTK, "Fonts", Difficulty = 1, Documentation = "FontRenderingBasic")]
|
||||
public partial class FontRenderingBasic : Form
|
||||
{
|
||||
#region Fields
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace Examples.WinForms
|
|||
|
||||
#region Constructors
|
||||
|
||||
public FontRendering()
|
||||
public FontRenderingBasic()
|
||||
{
|
||||
InitializeComponent();
|
||||
ResizeRedraw = true;
|
||||
|
@ -111,7 +111,7 @@ namespace Examples.WinForms
|
|||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
using (FontRendering example = new FontRendering())
|
||||
using (FontRenderingBasic example = new FontRenderingBasic())
|
||||
{
|
||||
Utilities.SetWindowTitle(example);
|
||||
example.ShowDialog();
|
|
@ -1,6 +1,6 @@
|
|||
namespace Examples.WinForms
|
||||
{
|
||||
partial class W02_Immediate_Mode_Cube
|
||||
partial class GameLoopForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
@ -40,7 +40,6 @@
|
|||
this.glControl.Size = new System.Drawing.Size(784, 564);
|
||||
this.glControl.TabIndex = 0;
|
||||
this.glControl.VSync = false;
|
||||
this.glControl.Layout += new System.Windows.Forms.LayoutEventHandler(this.glControl_Layout);
|
||||
//
|
||||
// W02_Immediate_Mode_Cube
|
||||
//
|
|
@ -23,14 +23,14 @@ using OpenTK.Platform;
|
|||
|
||||
namespace Examples.WinForms
|
||||
{
|
||||
[Example("GLControl game loop", ExampleCategory.OpenTK, "GLControl")]
|
||||
public partial class W02_Immediate_Mode_Cube : Form
|
||||
[Example("Simple GLControl Game Loop", ExampleCategory.OpenTK, "GLControl", 2, Documentation="GLControlGameLoop")]
|
||||
public partial class GameLoopForm : Form
|
||||
{
|
||||
static float angle = 0.0f;
|
||||
|
||||
#region --- Constructor ---
|
||||
|
||||
public W02_Immediate_Mode_Cube()
|
||||
public GameLoopForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace Examples.WinForms
|
|||
|
||||
glControl.KeyDown += new KeyEventHandler(glControl_KeyDown);
|
||||
glControl.KeyUp += new KeyEventHandler(glControl_KeyUp);
|
||||
//glControl.Resize += new EventHandler(glControl_Resize);
|
||||
glControl.Resize += new EventHandler(glControl_Resize);
|
||||
glControl.Paint += new PaintEventHandler(glControl_Paint);
|
||||
|
||||
Text =
|
||||
|
@ -58,7 +58,8 @@ namespace Examples.WinForms
|
|||
|
||||
Application.Idle += Application_Idle;
|
||||
|
||||
//glControl_Resize(glControl, EventArgs.Empty);
|
||||
// Ensure that the viewport and projection matrix are set correctly.
|
||||
glControl_Resize(glControl, EventArgs.Empty);
|
||||
}
|
||||
|
||||
void glControl_KeyUp(object sender, KeyEventArgs e)
|
||||
|
@ -207,11 +208,6 @@ namespace Examples.WinForms
|
|||
|
||||
#endregion
|
||||
|
||||
private void glControl_Layout(object sender, LayoutEventArgs e)
|
||||
{
|
||||
glControl_Resize(sender, EventArgs.Empty);
|
||||
}
|
||||
|
||||
#region public static void Main()
|
||||
|
||||
/// <summary>
|
||||
|
@ -220,7 +216,7 @@ namespace Examples.WinForms
|
|||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
using (W02_Immediate_Mode_Cube example = new W02_Immediate_Mode_Cube())
|
||||
using (GameLoopForm example = new GameLoopForm())
|
||||
{
|
||||
// Get the title and category of this example using reflection.
|
||||
ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]);
|
|
@ -1,6 +1,6 @@
|
|||
namespace Examples.WinForms
|
||||
{
|
||||
partial class W04_Multiple_GLControls
|
||||
partial class MultipleGLControlsForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
|
@ -11,17 +11,17 @@ using OpenTK.Graphics.OpenGL;
|
|||
|
||||
namespace Examples.WinForms
|
||||
{
|
||||
[Example("Multiple GLControls test", ExampleCategory.OpenTK, "GLControl", 4)]
|
||||
public partial class W04_Multiple_GLControls : Form
|
||||
[Example("Multiple GLControls", ExampleCategory.OpenTK, "GLControl", 3, Documentation="MultipleGLControls.cs")]
|
||||
public partial class MultipleGLControlsForm : Form
|
||||
{
|
||||
public W04_Multiple_GLControls()
|
||||
public MultipleGLControlsForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public static void Main()
|
||||
{
|
||||
using (W04_Multiple_GLControls example = new W04_Multiple_GLControls())
|
||||
using (MultipleGLControlsForm example = new MultipleGLControlsForm())
|
||||
{
|
||||
Utilities.SetWindowTitle(example);
|
||||
example.ShowDialog();
|
|
@ -1,6 +1,6 @@
|
|||
namespace Examples.WinForms
|
||||
{
|
||||
partial class W01_First_Window
|
||||
partial class SimpleForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
|
@ -21,10 +21,10 @@ using OpenTK.Graphics;
|
|||
|
||||
namespace Examples.WinForms
|
||||
{
|
||||
[Example("Simple GLControl", ExampleCategory.OpenTK, "GLControl", 1)]
|
||||
public partial class W01_First_Window : Form
|
||||
[Example("Simple GLControl", ExampleCategory.OpenTK, "GLControl", 1, Documentation="SimpleGLControl")]
|
||||
public partial class SimpleForm : Form
|
||||
{
|
||||
public W01_First_Window()
|
||||
public SimpleForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ namespace Examples.WinForms
|
|||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
using (W01_First_Window example = new W01_First_Window())
|
||||
using (SimpleForm example = new SimpleForm())
|
||||
{
|
||||
Utilities.SetWindowTitle(example);
|
||||
example.ShowDialog();
|
|
@ -21,10 +21,10 @@ namespace Examples.Tutorial
|
|||
/// <summary>
|
||||
/// Demonstrates the GameWindow class.
|
||||
/// </summary>
|
||||
[Example("Simple Window", ExampleCategory.OpenTK, "GameWindow")]
|
||||
public class T01_Simple_Window : GameWindow
|
||||
[Example("Simple Window", ExampleCategory.OpenTK, "GameWindow", Documentation="SimpleWindow")]
|
||||
public class SimpleWindow : GameWindow
|
||||
{
|
||||
public T01_Simple_Window() : base(800, 600)
|
||||
public SimpleWindow() : base(800, 600)
|
||||
{
|
||||
Keyboard.KeyDown += new OpenTK.Input.KeyDownEvent(Keyboard_KeyDown);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ namespace Examples.Tutorial
|
|||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
using (T01_Simple_Window example = new T01_Simple_Window())
|
||||
using (SimpleWindow example = new SimpleWindow())
|
||||
{
|
||||
// Get the title and category of this example using reflection.
|
||||
Utilities.SetWindowTitle(example);
|
|
@ -50,8 +50,6 @@ namespace Examples.Tests
|
|||
Console.WriteLine(color2);
|
||||
Console.WriteLine(color.Equals(color2));
|
||||
}
|
||||
|
||||
Console.ReadKey(true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -18,7 +18,8 @@ using OpenTK.Graphics;
|
|||
|
||||
namespace Examples.Tests
|
||||
{
|
||||
public class S01_Call_Performance : IExample
|
||||
// This test is obsolete.
|
||||
public class S01_Call_Performance
|
||||
{
|
||||
const int num_calls = 1000000;
|
||||
float[] v = new float[] { 0.0f, 0.0f };
|
833
Source/Examples/Properties/Resources.Designer.cs
generated
833
Source/Examples/Properties/Resources.Designer.cs
generated
|
@ -59,5 +59,838 @@ namespace Examples.Properties {
|
|||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region License
|
||||
/////
|
||||
///// The Open Toolkit Library License
|
||||
/////
|
||||
///// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
||||
/////
|
||||
///// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
///// of this software and associated documentation files (the "Software"), to deal
|
||||
///// in the Software without restriction, including without limitation the rights to
|
||||
///// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
///// the Software, and to permit person [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Color4Serialization {
|
||||
get {
|
||||
return ResourceManager.GetString("Color4Serialization", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #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.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Threading;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///
|
||||
///#endregion --- Using Directives ---
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// [Example("Display Lists", E [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string DisplayLists {
|
||||
get {
|
||||
return ResourceManager.GetString("DisplayLists", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region License
|
||||
/////
|
||||
///// The Open Toolkit Library License
|
||||
/////
|
||||
///// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
/////
|
||||
///// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
///// of this software and associated documentation files (the "Software"), to deal
|
||||
///// in the Software without restriction, including without limitation the rights to
|
||||
///// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
///// the Software, and to permit persons to whom the Softwa [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string EFXReverb {
|
||||
get {
|
||||
return ResourceManager.GetString("EFXReverb", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #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.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Threading;
|
||||
///using System.Reflection;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///using OpenTK.Graphics.OpenGL.Enums;
|
||||
///using OpenTK.Graphics;
|
||||
///using System.Text.RegularExpressions;
|
||||
///
|
||||
///names [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Extensions {
|
||||
get {
|
||||
return ResourceManager.GetString("Extensions", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/// * See license.txt for license info
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.IO;
|
||||
///using System.Drawing;
|
||||
///using System.Diagnostics;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Input;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// /// <summary>
|
||||
/// /// Shows how to render and scroll large amounts of text.
|
||||
/// /// </summary>
|
||||
/// [Example("Font rendering (advanced)", [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FontRenderingAdvanced {
|
||||
get {
|
||||
return ResourceManager.GetString("FontRenderingAdvanced", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {\rtf1\ansi\ansicpg1253\deff0\deflang1032{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fswiss\fcharset161{\*\fname Arial;}Arial Greek;}{\f3\fswiss\fprq2\fcharset161{\*\fname Arial;}Arial Greek;}{\f4\fmodern\fprq1\fcharset0 Consolas;}}
|
||||
///{\colortbl ;\red0\green0\blue255;\red43\green145\blue175;}
|
||||
///{\*\generator Msftedit 5.41.21.2508;}\viewkind4\uc1\pard\qc\lang1033\b\f0\fs32 Font rendering\par
|
||||
///\b0\f1\fs20\par
|
||||
///\lang1032\f2\par
|
||||
///\pard\lang1033\b\f1\fs24 Overview\par
|
||||
///\par
|
||||
///\b0\f [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FontRenderingBasic {
|
||||
get {
|
||||
return ResourceManager.GetString("FontRenderingBasic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to namespace Examples.WinForms
|
||||
///{
|
||||
/// partial class FontRenderingBasic
|
||||
/// {
|
||||
/// /// <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)
|
||||
/// {
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FontRenderingBasic_Designer {
|
||||
get {
|
||||
return ResourceManager.GetString("FontRenderingBasic_Designer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.ComponentModel;
|
||||
///using System.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///using OpenTK.Graphics;
|
||||
///
|
||||
///namespace Examples.WinForms
|
||||
///{
|
||||
/// [Example("Font rendering (basic)", ExampleCategory.OpenTK, "Fonts", Difficulty = 1, Documentation = "FontRenderingBasic")]
|
||||
/// public partial class FontRenderingBasic : Form
|
||||
/// {
|
||||
/// #region Fields
|
||||
///
|
||||
/// float[] sizes = new float[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1 [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FontRenderingBasic1 {
|
||||
get {
|
||||
return ResourceManager.GetString("FontRenderingBasic1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?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 n [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FontRenderingBasic2 {
|
||||
get {
|
||||
return ResourceManager.GetString("FontRenderingBasic2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Diagnostics;
|
||||
///using System.Drawing;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Input;
|
||||
///using OpenTK.Math;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// [Example("Framebuffer Objects", ExampleCategory.OpenGL, "FB [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FrameBufferObject {
|
||||
get {
|
||||
return ResourceManager.GetString("FrameBufferObject", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {\rtf1\ansi\ansicpg1253\deff0\deflang1032\deflangfe1032{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fswiss\fcharset161{\*\fname Arial;}Arial Greek;}}
|
||||
///{\*\generator Msftedit 5.41.21.2508;}\viewkind4\uc1\pard\qc\lang1033\b\f0\fs32 Framebuffer Objects\par
|
||||
///\b0\f1\fs20\par
|
||||
///\lang1032\f2\par
|
||||
///\pard\lang1033\b\f1\fs24 Overview\par
|
||||
///\par
|
||||
///\b0\fs22 This sample demonstrates Framebuffer objects (FBOs) via the EXT_framebuffer_object extension. FBOs provide an efficient method to perfo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string FramebufferObject1 {
|
||||
get {
|
||||
return ResourceManager.GetString("FramebufferObject1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/// * See license.txt for license info
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Diagnostics;
|
||||
///using System.Drawing;
|
||||
///using System.Threading;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Input;
|
||||
///
|
||||
///namespace Examples.Tests
|
||||
///{
|
||||
/// [Example("GameWindow states", ExampleCategory.OpenTK, "Test")]
|
||||
/// public class GameWindowStates : GameWindow
|
||||
/// {
|
||||
/// Font font [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string GameWindowStates {
|
||||
get {
|
||||
return ResourceManager.GetString("GameWindowStates", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* This source file is released under the MIT license. See License.txt for more information.
|
||||
/// * Coded by Erik Ylvisaker and Stefanos Apostolopoulos.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///#region --- Using directives ---
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.ComponentModel;
|
||||
///using System.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Diagnostics;
|
||||
///using System.Threading;
|
||||
///
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Platform;
|
||||
///
|
||||
///#endr [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string GLControlGameLoop {
|
||||
get {
|
||||
return ResourceManager.GetString("GLControlGameLoop", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing detailed licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///#region --- Using Directives ---
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Threading;
|
||||
///using System.Drawing;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///
|
||||
///#endregion
|
||||
///
|
||||
///names [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string ImmediateMode {
|
||||
get {
|
||||
return ResourceManager.GetString("ImmediateMode", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #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.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Platform;
|
||||
///using OpenTK.Input;
|
||||
///using System.Diagnostics;
|
||||
///using System.Threading;
|
||||
///
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///
|
||||
///namespace Examples.Tests
|
||||
///{
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string InputLogger {
|
||||
get {
|
||||
return ResourceManager.GetString("InputLogger", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing detailed licensing details.
|
||||
/// *
|
||||
/// * Written by Christoph Brandtner
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Diagnostics;
|
||||
///using System.Drawing;
|
||||
///using System.Drawing.Imaging;
|
||||
///using System.IO;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{ [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string JuliaSetFractal {
|
||||
get {
|
||||
return ResourceManager.GetString("JuliaSetFractal", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.ComponentModel;
|
||||
///using System.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///
|
||||
///namespace Examples.WinForms
|
||||
///{
|
||||
/// [Example("Multiple GLControls", ExampleCategory.OpenTK, "GLControl", 3)]
|
||||
/// public partial class MultipleGLControlsForm : Form
|
||||
/// {
|
||||
/// public MultipleGLControlsForm()
|
||||
/// {
|
||||
/// InitializeComponent();
|
||||
/// }
|
||||
///
|
||||
/// public s [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string MultipleGLControls {
|
||||
get {
|
||||
return ResourceManager.GetString("MultipleGLControls", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Threading;
|
||||
///using System.IO;
|
||||
///
|
||||
///using OpenTK.Audio;
|
||||
///
|
||||
///namespace Examples
|
||||
///{
|
||||
/// [Example("Playback", ExampleCategory.OpenAL, "1.1")]
|
||||
/// public class Playback
|
||||
/// {
|
||||
/// static readonly string filename = Path.Combine(Path.Combine("Data", " [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Playback {
|
||||
get {
|
||||
return ResourceManager.GetString("Playback", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to /*
|
||||
/// * Copyright (c) 2006, Creative Labs Inc.
|
||||
/// * All rights reserved.
|
||||
/// *
|
||||
/// * Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
/// * that the following conditions are met:
|
||||
/// *
|
||||
/// * * Redistributions of source code must retain the above copyright notice, this list of conditions and
|
||||
/// * the following disclaimer.
|
||||
/// * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
||||
/// * and the following [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string PlayStatic {
|
||||
get {
|
||||
return ResourceManager.GetString("PlayStatic", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #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.Data;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///
|
||||
///#endregion
|
||||
///
|
||||
///namespace Examples.WinForms
|
||||
///{
|
||||
/// [Example("Simple GLControl", ExampleCategory.OpenTK, "GLControl", 1)]
|
||||
/// pu [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string SimpleGLControl {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleGLControl", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing detailed licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///#region --- Using Directives ---
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.ComponentModel;
|
||||
///using System.Drawing;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Threading;
|
||||
///using System.Diagnostics;
|
||||
///using System.IO; [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string SimpleGLSL {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleGLSL", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/// * See license.txt for license info
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Drawing;
|
||||
///using System.Diagnostics;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Graphics.OpenGL.Enums;
|
||||
///using OpenTK.Input;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// /// <summary>
|
||||
/// /// Demonstrates the GameWindow class.
|
||||
/// /// </summary>
|
||||
/// [Exampl [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string SimpleWindow {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleWindow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Threading;
|
||||
///using System.ComponentModel;
|
||||
///
|
||||
///using OpenTK.Audio;
|
||||
///
|
||||
///namespace Examples.OpenAL
|
||||
///{
|
||||
/// // Not working correctly (sound pops).
|
||||
///
|
||||
/// //[Example("Streaming Playback", ExampleCateg [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string StreamingPlayback {
|
||||
get {
|
||||
return ResourceManager.GetString("StreamingPlayback", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Diagnostics;
|
||||
///using System.Runtime.InteropServices;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Input;
|
||||
///
|
||||
///namespace Examples
|
||||
///{
|
||||
/// [Example("GLU Tesselation Functions Test", ExampleCategory.OpenGL, "GLU", Visible = false)]
|
||||
/// public [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Tessellation {
|
||||
get {
|
||||
return ResourceManager.GetString("Tessellation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK Team.
|
||||
/// * This notice may not be removed from any source distribution.
|
||||
/// * See license.txt for licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///
|
||||
///using OpenTK.Audio;
|
||||
///
|
||||
///using AlContext = System.IntPtr;
|
||||
///using AlDevice = System.IntPtr;
|
||||
///using System.Diagnostics;
|
||||
///
|
||||
///namespace Examples
|
||||
///{
|
||||
/// [Example("AudioContext Test", ExampleCategory.OpenTK, "Test", 0, false)]
|
||||
/// class TestApp
|
||||
/// {
|
||||
/// publ [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string TestAudioContext {
|
||||
get {
|
||||
return ResourceManager.GetString("TestAudioContext", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Licensed under the MIT/X11 license.
|
||||
/// * Copyright (c) 2006-2008 the OpenTK team.
|
||||
/// * This notice may not be removed.
|
||||
/// * See license.txt for licensing detailed licensing details.
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Windows.Forms;
|
||||
///using System.Diagnostics;
|
||||
///
|
||||
///using OpenTK.Graphics;
|
||||
///using System.Threading;
|
||||
///
|
||||
///namespace Examples.Tests
|
||||
///{
|
||||
/// [Example("Test Resolution Changes", ExampleCategory.OpenTK, "Test")]
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string TestResolutionChanges {
|
||||
get {
|
||||
return ResourceManager.GetString("TestResolutionChanges", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/// * See license.txt for license info
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Diagnostics;
|
||||
///using System.IO;
|
||||
///
|
||||
///using System.Drawing;
|
||||
///using System.Drawing.Imaging;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Graphics.OpenGL.Enums;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// /// <summary>
|
||||
/// /// Demonstrates simple OpenGL Texturing. [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string Textures {
|
||||
get {
|
||||
return ResourceManager.GetString("Textures", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/// * See license.txt for license info
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Drawing;
|
||||
///using System.Threading;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics.OpenGL;
|
||||
///using System.Diagnostics;
|
||||
///using OpenTK.Input;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Graphics.OpenGL.Enums;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// /// <summary>
|
||||
/// /// Demonstrates Vertex Arrays (in system memo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string VertexArrays {
|
||||
get {
|
||||
return ResourceManager.GetString("VertexArrays", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #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.Text;
|
||||
///using System.Runtime.InteropServices;
|
||||
///using System.Threading;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///using OpenTK.Platform;
|
||||
///using OpenTK.Math;
|
||||
///
|
||||
///#endregion
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// [Example("Vertex Buffer Objects", ExampleCategory.OpenGL, "1.5", Docume [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string VertexBufferObject {
|
||||
get {
|
||||
return ResourceManager.GetString("VertexBufferObject", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to #region --- License ---
|
||||
////* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/// * See license.txt for license info
|
||||
/// */
|
||||
///#endregion
|
||||
///
|
||||
///using System;
|
||||
///using System.Collections.Generic;
|
||||
///using System.Text;
|
||||
///using System.Drawing;
|
||||
///
|
||||
///using OpenTK;
|
||||
///using OpenTK.Graphics;
|
||||
///using Examples.Shapes;
|
||||
///using OpenTK.Math;
|
||||
///
|
||||
///namespace Examples.Tutorial
|
||||
///{
|
||||
/// /// <summary>
|
||||
/// /// Demonstrates fixed-function OpenGL lighting. Example is incomplete (documentation).
|
||||
/// /// </summary>
|
||||
/// [Example("Vertex Lighting", E [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string VertexLighting {
|
||||
get {
|
||||
return ResourceManager.GetString("VertexLighting", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,16 +118,94 @@
|
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="FontRendering" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\winforms\fontrendering.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
<data name="Color4Serialization" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\test\color4serialization.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FontRenderingDoc" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\winforms\fontrendering.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<data name="DisplayLists" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\1.1\displaylists.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FramebufferObject" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\OpenGL\FrameBufferObject.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
<data name="EFXReverb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\openal\efx\efxreverb.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FramebufferObjectDoc" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\OpenGL\FramebufferObject.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1253</value>
|
||||
<data name="Extensions" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\test\extensions.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FontRenderingAdvanced" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\fonts\fontrenderingadvanced.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FontRenderingBasic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\fonts\fontrenderingbasic.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1253</value>
|
||||
</data>
|
||||
<data name="FontRenderingBasic1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\fonts\fontrenderingbasic.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FontRenderingBasic2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\fonts\fontrenderingbasic.resx;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1253</value>
|
||||
</data>
|
||||
<data name="FontRenderingBasic_Designer" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\fonts\fontrenderingbasic.designer.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FrameBufferObject" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\ext\framebufferobject.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="FramebufferObject1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\ext\framebufferobject.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1253</value>
|
||||
</data>
|
||||
<data name="GameWindowStates" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\test\gamewindowstates.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="GLControlGameLoop" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\glcontrol\glcontrolgameloop.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="ImmediateMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\1.1\immediatemode.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="InputLogger" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\test\inputlogger.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="JuliaSetFractal" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\glsl\juliasetfractal.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="MultipleGLControls" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\glcontrol\multipleglcontrols.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="Playback" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\openal\1.1\playback.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="PlayStatic" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\openal\1.1\playstatic.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="SimpleGLControl" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\glcontrol\simpleglcontrol.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="SimpleWindow" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\gamewindow\simplewindow.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="StreamingPlayback" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\openal\1.1\streamingplayback.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="Tessellation" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\glu\tessellation.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="TestAudioContext" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\openal\test\testaudiocontext.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="TestResolutionChanges" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opentk\test\testresolutionchanges.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="Textures" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\1.1\textures.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="VertexArrays" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\1.1\vertexarrays.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="VertexBufferObject" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\1.5\vertexbufferobject.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="VertexLighting" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\1.1\vertexlighting.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="SimpleGLSL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\opengl\glsl\simpleglsl.cs;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,207 +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.Text;
|
||||
using System.Drawing;
|
||||
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
using OpenTK.Input;
|
||||
using System.IO;
|
||||
using OpenTK.Graphics.OpenGL.Enums;
|
||||
using OpenTK.Math;
|
||||
|
||||
namespace Examples.Tutorial
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests Font loading and rendering.
|
||||
/// </summary>
|
||||
[Example("Fonts", ExampleCategory.OpenTK, "Fonts", Visible = false)]
|
||||
class Fonts : GameWindow
|
||||
{
|
||||
public Fonts() : base(800, 600)
|
||||
{ }
|
||||
|
||||
#region --- Fields ---
|
||||
|
||||
ITextPrinter printer = new TextPrinter();
|
||||
const string text = "Hello, world!";
|
||||
|
||||
// Load some different TextureFont sizes to compare their quality.
|
||||
// You'll never need to load that many fonts in your application,
|
||||
// 3 or 4 should be more than enough.
|
||||
Font[] fonts = new Font[]
|
||||
{
|
||||
new Font(FontFamily.GenericSerif, 8.0f),
|
||||
new Font(FontFamily.GenericSerif, 10.0f),
|
||||
new Font(FontFamily.GenericSerif, 12.0f),
|
||||
new Font(FontFamily.GenericSerif, 14.0f),
|
||||
|
||||
new Font(FontFamily.GenericSerif, 16.0f),
|
||||
new Font(FontFamily.GenericSerif, 18.0f),
|
||||
new Font(FontFamily.GenericSerif, 20.0f),
|
||||
new Font(FontFamily.GenericSerif, 22.0f),
|
||||
|
||||
new Font(FontFamily.GenericSerif, 24.0f, FontStyle.Bold),
|
||||
new Font(FontFamily.GenericSerif, 26.0f),
|
||||
new Font(FontFamily.GenericSerif, 28.0f),
|
||||
new Font(FontFamily.GenericSerif, 30.0f),
|
||||
|
||||
new Font(FontFamily.GenericSerif, 32.0f, FontStyle.Italic),
|
||||
new Font(FontFamily.GenericSerif, 34.0f),
|
||||
new Font(FontFamily.GenericSerif, 36.0f),
|
||||
new Font(FontFamily.GenericSerif, 38.0f),
|
||||
|
||||
new Font(FontFamily.GenericSansSerif, 8.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 10.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 12.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 14.0f),
|
||||
|
||||
new Font(FontFamily.GenericSansSerif, 16.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 18.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 20.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 22.0f),
|
||||
|
||||
new Font(FontFamily.GenericSansSerif, 24.0f, FontStyle.Bold),
|
||||
new Font(FontFamily.GenericSansSerif, 26.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 28.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 30.0f),
|
||||
|
||||
new Font(FontFamily.GenericSansSerif, 32.0f, FontStyle.Italic),
|
||||
new Font(FontFamily.GenericSansSerif, 34.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 36.0f),
|
||||
new Font(FontFamily.GenericSansSerif, 38.0f),
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnLoad
|
||||
|
||||
/// <summary>
|
||||
/// To maintain high rendering performance, we need to cache the text
|
||||
/// we wish to draw, for each font we want to draw it with. To achieve
|
||||
/// this, we use the TextPrinter.Prepare() method, which returns a
|
||||
/// TextHandle - i.e. a handle to the cached text.
|
||||
/// <para>
|
||||
/// We can use these TextHandles with the TextPrinter.Draw() method
|
||||
/// to draw text with very high performance.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void OnLoad(EventArgs e)
|
||||
{
|
||||
GL.ClearColor(Color.MidnightBlue);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnUnload
|
||||
|
||||
/// <summary>
|
||||
/// It is important that we need to call the Dispose() methods to reclaim of
|
||||
/// each and every TextHandle and TextureFont to reclaim the unamanged
|
||||
/// (OpenGL) resources they are using.
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void OnUnload(EventArgs e)
|
||||
{
|
||||
foreach (Font f in fonts)
|
||||
f.Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnResize
|
||||
|
||||
protected override void OnResize(OpenTK.Platform.ResizeEventArgs e)
|
||||
{
|
||||
GL.Viewport(0, 0, Width, Height);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnUpdateFrame
|
||||
|
||||
public override void OnUpdateFrame(UpdateFrameEventArgs e)
|
||||
{
|
||||
if (Keyboard[Key.Escape])
|
||||
this.Exit();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OnRenderFrame
|
||||
|
||||
/// <summary>
|
||||
/// To render pixel-perfect text, we have to setup a 2d display projection
|
||||
/// with a width/height that corresponds to our current Viewport.
|
||||
/// In OpenGL this can be easily achieved using the GL.Ortho method.
|
||||
/// <para>
|
||||
/// It is still possible to render text in a 3d projection, but it will
|
||||
/// be very hard to achieve pixel-perfect precision.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// To achieve the highest possible performance, render your 3d scene first.
|
||||
/// At the end of the RenderFrame call, setup a 2d projection and render all
|
||||
/// text in one go.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
public override void OnRenderFrame(RenderFrameEventArgs e)
|
||||
{
|
||||
GL.Clear(ClearBufferMask.ColorBufferBit);
|
||||
|
||||
printer.Begin();
|
||||
|
||||
// Print using the first font.
|
||||
for (int i = 0; i < fonts.Length / 2; i++)
|
||||
{
|
||||
printer.Print(text, fonts[i], Color.White);
|
||||
GL.Translate(0, fonts[i].Height, 0);
|
||||
}
|
||||
|
||||
// Move to the right, and print using the second font.
|
||||
//float width, height;
|
||||
//fonts[handles.Length / 2 - 1].MeasureString(text, out width, out height);
|
||||
RectangleF rect = printer.Measure(text, fonts[fonts.Length / 2 - 1]).BoundingBox;
|
||||
GL.LoadIdentity();
|
||||
GL.Translate(rect.Width + 32.0f, 0, 0);
|
||||
for (int i = fonts.Length / 2; i < fonts.Length; i++)
|
||||
{
|
||||
printer.Print(text, fonts[i], Color.White);
|
||||
GL.Translate(0, fonts[i].Height, 0);
|
||||
}
|
||||
|
||||
printer.End();
|
||||
|
||||
SwapBuffers();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public static void Main()
|
||||
|
||||
/// <summary>
|
||||
/// Entry point of this example.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
using (Fonts example = new Fonts())
|
||||
{
|
||||
// Get the title and category of this example using reflection.
|
||||
ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]);
|
||||
example.Title = String.Format("OpenTK | {0} {1}: {2}", info.Category, info.Difficulty, info.Title);
|
||||
example.Run(30.0, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue