mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 01:05:33 +00:00
This commit is contained in:
parent
c65d759ea1
commit
fdb625da0f
79
OpenTK.sln
79
OpenTK.sln
|
@ -8,6 +8,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentat
|
|||
Todo.txt = Todo.txt
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{84C34705-D460-4028-AE58-C32CF210F9BF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Specifications", "Specifications", "{B23A6DCD-9FE9-4523-95FB-01C8D4631555}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Specifications\cs_types.txt = Specifications\cs_types.txt
|
||||
|
@ -19,38 +21,30 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Specifications", "Specifica
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Projects", "Projects", "{E9FF51BB-295E-4891-AA30-D1374F26DCE0}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{C6E60A87-12B4-444A-BE03-7E980EAC0172}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenTK", "OpenTK", "{7E640424-E2CD-4DD5-9392-7A706D73930E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenGL", "OpenGL", "{70FA6EE8-62C6-437F-AD82-117F2D9CDE68}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenGL", "OpenGL", "{2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAL", "OpenAL", "{30996477-EDDE-4E45-AB3D-5E466314C755}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Math", "Math", "{84EAC24B-BF87-477C-838D-7110A1A24D41}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Input", "Input", "{4BB769A0-1B69-474E-A99A-B6B9BE1A3A1E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platform", "Platform", "{50DCE788-72FC-47E0-A6BD-50BCCE3FCE5B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayLists", "Source\Examples\OpenGL\DisplayLists\DisplayLists.csproj", "{0D470B2A-C200-4D27-90C1-B691405E4069}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Platform.Windows", "Source\Platform\Windows\OpenTK.Platform.Windows.csproj", "{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TwoContexts", "Source\Examples\OpenGL\TwoContexts\TwoContexts.csproj", "{6CC64414-ADED-4148-9969-B2957DD6377A}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Input", "Input", "{4BB769A0-1B69-474E-A99A-B6B9BE1A3A1E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Window", "Source\Examples\OpenGL\Window\Window.csproj", "{E4CEA249-4014-49CB-AF37-5A303A4A08D1}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Math", "Math", "{84EAC24B-BF87-477C-838D-7110A1A24D41}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.OpenGL.Bind", "Source\OpenGL\Bind\OpenTK.OpenGL.Bind.csproj", "{1EDDE592-3923-4898-9006-3D69579E1745}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAL", "OpenAL", "{30996477-EDDE-4E45-AB3D-5E466314C755}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenGL", "OpenGL", "{2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.OpenGL", "Source\OpenGL\OpenGL\OpenTK.OpenGL.csproj", "{836876D1-0C8D-4240-BEE4-859D9D3D46CB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C} = {FDFA00B6-FA81-4658-86E1-F312EFB42E1C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Platform.Windows", "Source\Platform\Windows\OpenTK.Platform.Windows.csproj", "{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.OpenGL.Bind", "Source\OpenGL\Bind\OpenTK.OpenGL.Bind.csproj", "{1EDDE592-3923-4898-9006-3D69579E1745}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Source", "Source", "{84C34705-D460-4028-AE58-C32CF210F9BF}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{C6E60A87-12B4-444A-BE03-7E980EAC0172}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenGL", "OpenGL", "{70FA6EE8-62C6-437F-AD82-117F2D9CDE68}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GLSL.Lesson01", "Source\Examples\OpenGL\GLSL\Lesson01\GLSL.Lesson01.csproj", "{46980D11-67FA-4B33-903F-BC9D8A4FE60F}"
|
||||
EndProject
|
||||
|
@ -60,30 +54,18 @@ Global
|
|||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0D470B2A-C200-4D27-90C1-B691405E4069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0D470B2A-C200-4D27-90C1-B691405E4069}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0D470B2A-C200-4D27-90C1-B691405E4069}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0D470B2A-C200-4D27-90C1-B691405E4069}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6CC64414-ADED-4148-9969-B2957DD6377A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6CC64414-ADED-4148-9969-B2957DD6377A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6CC64414-ADED-4148-9969-B2957DD6377A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6CC64414-ADED-4148-9969-B2957DD6377A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E4CEA249-4014-49CB-AF37-5A303A4A08D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E4CEA249-4014-49CB-AF37-5A303A4A08D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E4CEA249-4014-49CB-AF37-5A303A4A08D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E4CEA249-4014-49CB-AF37-5A303A4A08D1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{46980D11-67FA-4B33-903F-BC9D8A4FE60F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -94,20 +76,17 @@ Global
|
|||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{84C34705-D460-4028-AE58-C32CF210F9BF} = {80BD2C66-A90B-42E7-BED8-CBF7BB8C2E3F}
|
||||
{C6E60A87-12B4-444A-BE03-7E980EAC0172} = {E9FF51BB-295E-4891-AA30-D1374F26DCE0}
|
||||
{7E640424-E2CD-4DD5-9392-7A706D73930E} = {E9FF51BB-295E-4891-AA30-D1374F26DCE0}
|
||||
{70FA6EE8-62C6-437F-AD82-117F2D9CDE68} = {C6E60A87-12B4-444A-BE03-7E980EAC0172}
|
||||
{2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{30996477-EDDE-4E45-AB3D-5E466314C755} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{84EAC24B-BF87-477C-838D-7110A1A24D41} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{4BB769A0-1B69-474E-A99A-B6B9BE1A3A1E} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{C6E60A87-12B4-444A-BE03-7E980EAC0172} = {E9FF51BB-295E-4891-AA30-D1374F26DCE0}
|
||||
{50DCE788-72FC-47E0-A6BD-50BCCE3FCE5B} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{0D470B2A-C200-4D27-90C1-B691405E4069} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
|
||||
{6CC64414-ADED-4148-9969-B2957DD6377A} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
|
||||
{E4CEA249-4014-49CB-AF37-5A303A4A08D1} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
|
||||
{46980D11-67FA-4B33-903F-BC9D8A4FE60F} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745} = {2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB} = {2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}
|
||||
{4BB769A0-1B69-474E-A99A-B6B9BE1A3A1E} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{84EAC24B-BF87-477C-838D-7110A1A24D41} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{30996477-EDDE-4E45-AB3D-5E466314C755} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2} = {7E640424-E2CD-4DD5-9392-7A706D73930E}
|
||||
{FDFA00B6-FA81-4658-86E1-F312EFB42E1C} = {50DCE788-72FC-47E0-A6BD-50BCCE3FCE5B}
|
||||
{836876D1-0C8D-4240-BEE4-859D9D3D46CB} = {2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}
|
||||
{1EDDE592-3923-4898-9006-3D69579E1745} = {2F3FEAD4-0FBD-48CC-AFA0-29FFF28284C2}
|
||||
{70FA6EE8-62C6-437F-AD82-117F2D9CDE68} = {C6E60A87-12B4-444A-BE03-7E980EAC0172}
|
||||
{46980D11-67FA-4B33-903F-BC9D8A4FE60F} = {70FA6EE8-62C6-437F-AD82-117F2D9CDE68}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
namespace OpenTK.OpenGL.Test
|
||||
{
|
||||
partial class DisplayLists
|
||||
{
|
||||
/// <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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Text = "Form1";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace OpenTK.OpenGL.Test
|
||||
{
|
||||
public partial class DisplayLists : Form
|
||||
{
|
||||
Context context;
|
||||
int[] lists = new int[2];
|
||||
|
||||
public DisplayLists()
|
||||
{
|
||||
InitializeComponent();
|
||||
context = Context.Create(this, 8, 8, 8, 8, 0, 0, false);
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
Text =
|
||||
GL.GetString(Enums.StringName.VENDOR) + " " +
|
||||
GL.GetString(Enums.StringName.RENDERER) + " " +
|
||||
GL.GetString(Enums.StringName.VERSION);
|
||||
|
||||
lists[0] = GL.GenLists(1);
|
||||
lists[1] = GL.GenLists(1);
|
||||
|
||||
GL.NewList(lists[0], Enums.ListMode.COMPILE);
|
||||
GL.Begin(Enums.BeginMode.TRIANGLES);
|
||||
GL.Color3f(1.0f, 0.0f, 0.0f); GL.Vertex3f(-0.5f, -0.5f, 1.0f);
|
||||
GL.Color3f(0.0f, 1.0f, 0.0f); GL.Vertex3f(0.5f, -0.5f, 1.0f);
|
||||
GL.Color3f(0.0f, 0.0f, 1.0f); GL.Vertex3f(0.0f, 0.5f, 1.0f);
|
||||
GL.End();
|
||||
GL.EndList();
|
||||
|
||||
GL.NewList(lists[1], Enums.ListMode.COMPILE);
|
||||
GL.Begin(Enums.BeginMode.QUADS);
|
||||
GL.Color3f(0.1f, 0.1f, 0.5f); GL.Vertex3f(-1.0f, -1.0f, 1.0f);
|
||||
GL.Color3f(1.0f, 1.0f, 1.0f); GL.Vertex3f(-1.0f, -0.5f, 1.0f);
|
||||
GL.Color3f(1.0f, 0.0f, 0.0f); GL.Vertex3f(-0.5f, -0.5f, 1.0f);
|
||||
GL.Color3f(0.1f, 0.1f, 0.5f); GL.Vertex3f(-0.5f, -1.0f, 1.0f);
|
||||
GL.End();
|
||||
GL.EndList();
|
||||
|
||||
GL.ClearColor(0.1f, 0.1f, 0.5f, 0.0f);
|
||||
|
||||
OnResize(e);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
if (ClientSize.Height == 0)
|
||||
ClientSize = new System.Drawing.Size(ClientSize.Width, 1);
|
||||
|
||||
GL.Viewport(0, 0, ClientSize.Width, ClientSize.Height);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.PROJECTION);
|
||||
GL.LoadIdentity();
|
||||
|
||||
Glu.Perspective(45.0, ClientSize.Width / (double)ClientSize.Height, 1.0, 64.0);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
|
||||
Glu.LookAt(
|
||||
0.0, 0.0, 5.0,
|
||||
0.0, 0.0, -1.0,
|
||||
0.0, 1.0, 0.0
|
||||
);
|
||||
|
||||
GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT);
|
||||
|
||||
GL.CallLists(2, Enums.ListNameType.UNSIGNED_INT, lists);
|
||||
|
||||
context.SwapBuffers();
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.Run(new DisplayLists());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0D470B2A-C200-4D27-90C1-B691405E4069}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenTK.OpenGL.Examples.DisplayLists</RootNamespace>
|
||||
<AssemblyName>OpenTK.OpenGL.Examples.DisplayLists</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\Binaries\Debug\Examples\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\Binaries\Release\Examples\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DisplayLists.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DisplayLists.Designer.cs">
|
||||
<DependentUpon>DisplayLists.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\OpenGL\OpenGL\OpenTK.OpenGL.csproj">
|
||||
<Project>{836876D1-0C8D-4240-BEE4-859D9D3D46CB}</Project>
|
||||
<Name>OpenTK.OpenGL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,33 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DisplayLists")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DisplayLists")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("377262fd-fe73-4f2a-846c-987d2e0a980a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.1")]
|
|
@ -1,63 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenTK.OpenGL.Examples.DisplayLists.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTK.OpenGL.Examples.DisplayLists.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,117 +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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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,26 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenTK.OpenGL.Examples.DisplayLists.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
|
@ -1,4 +1,4 @@
|
|||
namespace Lesson01
|
||||
namespace OpenTK.Examples.OpenGL.GLSL
|
||||
{
|
||||
partial class Cube
|
||||
{
|
||||
|
|
|
@ -8,9 +8,9 @@ using System.Windows.Forms;
|
|||
using System.Threading;
|
||||
using OpenTK.OpenGL;
|
||||
|
||||
namespace Lesson01
|
||||
namespace OpenTK.Examples.OpenGL.GLSL
|
||||
{
|
||||
public partial class Cube : Form
|
||||
public partial class Cube : GLForm
|
||||
{
|
||||
#region Shaders
|
||||
string[] vertex_shader =
|
||||
|
@ -27,15 +27,13 @@ namespace Lesson01
|
|||
};
|
||||
#endregion
|
||||
|
||||
Context context;
|
||||
GLContext context;
|
||||
static float angle;
|
||||
|
||||
#region Constructor
|
||||
public Cube()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Application.Idle += new EventHandler(OnApplicationIdle);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -44,7 +42,7 @@ namespace Lesson01
|
|||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
context = Context.Create(this, 8, 8, 8, 8, 16, 0, false);
|
||||
context = GLContext.Create(this, 8, 8, 8, 8, 16, 0, false);
|
||||
|
||||
Text =
|
||||
GL.GetString(Enums.StringName.VENDOR) + " " +
|
||||
|
@ -136,40 +134,6 @@ namespace Lesson01
|
|||
}
|
||||
#endregion
|
||||
|
||||
#region Application main loop
|
||||
/// <summary>
|
||||
/// Called when all pending messages have been processed, this is where the application 'Main Loop' resides.
|
||||
/// </summary>
|
||||
/// <param name="sender">Not used.</param>
|
||||
/// <param name="e">Not used.</param>
|
||||
void OnApplicationIdle(object sender, EventArgs e)
|
||||
{
|
||||
// Check if any new messages have popped up. If not, then run the logic at full speed.
|
||||
while (IsApplicationIdle())
|
||||
{
|
||||
// We'd like to play nice with the scheduler. If the window is not in focus,
|
||||
// we give back some thread-time to the OS, to allow other apps to function full-speed.
|
||||
// However, if the window _is_ in focus we grab all processor resources.
|
||||
if (ActiveForm != this)
|
||||
Thread.Sleep(100);
|
||||
OnPaint(null);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IsApplicationIdle
|
||||
/// <summary>
|
||||
/// Checks if there all pending messages have been processed.
|
||||
/// </summary>
|
||||
/// <returns>Returns true if there are no messages left, false otherwise.</returns>
|
||||
static public bool IsApplicationIdle()
|
||||
{
|
||||
//OpenTK.Platform.Windows.Api.MessageStruct msg;
|
||||
Message msg;
|
||||
return !OpenTK.Platform.Windows.Api.PeekMessage(out msg, IntPtr.Zero, 0, 0, 0);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DrawCube
|
||||
public void DrawCube()
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<ProjectGuid>{46980D11-67FA-4B33-903F-BC9D8A4FE60F}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GLSL.Lesson01</RootNamespace>
|
||||
<RootNamespace>OpenTK.Examples.OpenGL.GLSL</RootNamespace>
|
||||
<AssemblyName>GLSL.Lesson01</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
@ -78,11 +78,4 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -8,7 +8,7 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GLSL.Lesson01.Properties {
|
||||
namespace OpenTK.Examples.OpenGL.GLSL.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ namespace GLSL.Lesson01.Properties {
|
|||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GLSL.Lesson01.Properties.Resources", typeof(Resources).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTK.Examples.OpenGL.GLSL.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GLSL.Lesson01.Properties {
|
||||
namespace OpenTK.Examples.OpenGL.GLSL.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TwoContexts")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TwoContexts")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f658d492-480e-49b8-9198-8001df3e576a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,63 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenTK.OpenGL.Examples.TwoContexts.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTK.OpenGL.Examples.TwoContexts.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,117 +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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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,26 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenTK.OpenGL.Examples.TwoContexts.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
|
@ -1,76 +0,0 @@
|
|||
namespace OpenTK.OpenGL.Test
|
||||
{
|
||||
partial class TwoContexts
|
||||
{
|
||||
/// <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.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Location = new System.Drawing.Point(12, 12);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(268, 100);
|
||||
this.panel1.TabIndex = 0;
|
||||
this.panel1.Resize += new System.EventHandler(this.panel1_Resize);
|
||||
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
|
||||
this.panel1.SizeChanged += new System.EventHandler(this.panel1_Resize);
|
||||
//
|
||||
// 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, 154);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(268, 100);
|
||||
this.panel2.TabIndex = 1;
|
||||
this.panel2.Resize += new System.EventHandler(this.panel2_Resize);
|
||||
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
|
||||
//
|
||||
// TwoContexts
|
||||
//
|
||||
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.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "TwoContexts";
|
||||
this.Text = "TwoContexts";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,142 +0,0 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using OpenTK.OpenGL;
|
||||
|
||||
namespace OpenTK.OpenGL.Test
|
||||
{
|
||||
public partial class TwoContexts : Form
|
||||
{
|
||||
Context context1, context2;
|
||||
|
||||
public TwoContexts()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
context1 = Context.Create(panel1, 8, 8, 8, 8, 0, 0, false);
|
||||
context2 = Context.Create(panel2, 8, 8, 8, 8, 0, 0, false);
|
||||
|
||||
Text =
|
||||
GL.GetString(Enums.StringName.VENDOR) + " " +
|
||||
GL.GetString(Enums.StringName.RENDERER) + " " +
|
||||
GL.GetString(Enums.StringName.VERSION);
|
||||
|
||||
context1.MakeCurrent();
|
||||
GL.ClearColor(0.1f, 0.1f, 0.5f, 0.0f);
|
||||
|
||||
context2.MakeCurrent();
|
||||
GL.ClearColor(0.7f, 0.1f, 0.1f, 0.0f);
|
||||
|
||||
panel1_Resize(null, null);
|
||||
panel2_Resize(null, null);
|
||||
}
|
||||
|
||||
private void panel1_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
context1.MakeCurrent();
|
||||
|
||||
GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
Glu.LookAt(
|
||||
0.0, 0.0, 5.0,
|
||||
0.0, 0.0, -1.0,
|
||||
0.0, 1.0, 0.0
|
||||
);
|
||||
|
||||
GL.Begin(Enums.BeginMode.TRIANGLES);
|
||||
|
||||
GL.Color3f(1.0f, 0.0f, 0.0f); GL.Vertex3f(-1.0f, -1.0f, -5.0f);
|
||||
GL.Color3f(0.0f, 0.0f, 1.0f); GL.Vertex3f( 1.0f, 1.0f, -5.0f);
|
||||
GL.Color3f(0.0f, 1.0f, 0.0f); GL.Vertex3f(-1.0f, 1.0f, -5.0f);
|
||||
|
||||
GL.End();
|
||||
|
||||
context1.SwapBuffers();
|
||||
}
|
||||
|
||||
private void panel1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
context1.MakeCurrent();
|
||||
|
||||
if (panel1.ClientSize.Height == 0)
|
||||
panel1.ClientSize = new System.Drawing.Size(panel1.ClientSize.Width, 1);
|
||||
|
||||
GL.Viewport(0, 0, panel1.ClientSize.Width, panel1.ClientSize.Height);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.PROJECTION);
|
||||
GL.LoadIdentity();
|
||||
|
||||
Glu.Perspective(45.0, panel1.ClientSize.Width / (double)panel1.ClientSize.Height, 1.0, 64.0);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
}
|
||||
|
||||
private void panel2_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
context2.MakeCurrent();
|
||||
|
||||
GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
Glu.LookAt(
|
||||
0.0, 0.0, 5.0,
|
||||
0.0, 0.0, -1.0,
|
||||
0.0, 1.0, 0.0
|
||||
);
|
||||
|
||||
GL.Begin(Enums.BeginMode.TRIANGLES);
|
||||
|
||||
GL.Color3f(1.0f, 0.0f, 0.0f); GL.Vertex3f(-1.0f, -1.0f, -5.0f);
|
||||
GL.Color3f(0.0f, 0.0f, 1.0f); GL.Vertex3f(1.0f, 1.0f, -5.0f);
|
||||
GL.Color3f(0.0f, 1.0f, 0.0f); GL.Vertex3f(-1.0f, 1.0f, -5.0f);
|
||||
|
||||
GL.End();
|
||||
|
||||
context2.SwapBuffers();
|
||||
}
|
||||
|
||||
private void panel2_Resize(object sender, EventArgs e)
|
||||
{
|
||||
context2.MakeCurrent();
|
||||
|
||||
if (panel2.ClientSize.Height == 0)
|
||||
panel2.ClientSize = new System.Drawing.Size(panel2.ClientSize.Width, 1);
|
||||
|
||||
GL.Viewport(0, 0, panel2.ClientSize.Width, panel2.ClientSize.Height);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.PROJECTION);
|
||||
GL.LoadIdentity();
|
||||
|
||||
Glu.Perspective(45.0, panel2.ClientSize.Width / (double)panel2.ClientSize.Height, 1.0, 64.0);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.Run(new TwoContexts());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6CC64414-ADED-4148-9969-B2957DD6377A}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenTK.OpenGL.Examples.TwoContexts</RootNamespace>
|
||||
<AssemblyName>OpenTK.OpenGL.Examples.TwoContexts</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\Binaries\Debug\Examples\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\Binaries\Release\Examples\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="TwoContexts.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="TwoContexts.Designer.cs">
|
||||
<DependentUpon>TwoContexts.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="TwoContexts.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>TwoContexts.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\OpenGL\OpenGL\OpenTK.OpenGL.csproj">
|
||||
<Project>{836876D1-0C8D-4240-BEE4-859D9D3D46CB}</Project>
|
||||
<Name>OpenTK.OpenGL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -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,97 +0,0 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using OpenTK.OpenGL;
|
||||
|
||||
namespace Test
|
||||
{
|
||||
class Program : Form
|
||||
{
|
||||
public Context context;
|
||||
|
||||
Program()
|
||||
{
|
||||
context = Context.Create(this, 8, 8, 8, 8, 0, 0, false);
|
||||
//this.Text =
|
||||
// GL.GetString(Enums.StringName.VENDOR) + " " +
|
||||
// GL.GetString(Enums.StringName.RENDERER) + " " +
|
||||
// GL.GetString(Enums.StringName.VERSION);
|
||||
Text = Width.ToString() + "x" + Height.ToString();
|
||||
this.CenterToScreen();
|
||||
this.ResizeRedraw = true;
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
System.Drawing.Size size = ClientSize;
|
||||
|
||||
if (size.Height == 0)
|
||||
size.Height = 1;
|
||||
|
||||
// Set the viewport to be the entire window
|
||||
GL.Viewport(0, 0, size.Width, size.Height);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.PROJECTION);
|
||||
GL.LoadIdentity();
|
||||
Glu.Perspective(45.0, (double)size.Width / (double)size.Height, 1.0, 20.0);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
Glu.LookAt( 0.0, 0.0, -5.0,
|
||||
0.0, 0.0, 1.0,
|
||||
0.0, 1.0, 0.0 );
|
||||
|
||||
Text = "Size: " + size.Width.ToString() + "x" + size.Height.ToString();
|
||||
|
||||
ClientSize = size;
|
||||
|
||||
base.OnResize(e);
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT);
|
||||
|
||||
GL.PushMatrix();
|
||||
|
||||
GL.Begin(Enums.BeginMode.TRIANGLES);
|
||||
|
||||
GL.Color3f(1.0f, 0.0f, 0.0f); GL.Vertex3f(-0.5f, -0.5f, 5.0f);
|
||||
GL.Color3f(0.0f, 1.0f, 0.0f); GL.Vertex3f( 0.5f, -0.5f, 5.0f);
|
||||
GL.Color3f(0.0f, 0.0f, 1.0f); GL.Vertex3f( 0.0f, 0.5f, 5.0f);
|
||||
|
||||
GL.End();
|
||||
|
||||
GL.PopMatrix();
|
||||
|
||||
context.SwapBuffers();
|
||||
|
||||
base.OnPaint(e);
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
Application.Run(new Program());
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Program
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(632, 446);
|
||||
this.Name = "Program";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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,33 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Window")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Window")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2006")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("24d8672e-23eb-48d2-9733-545e9f2148bc")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,63 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenTK.OpenGL.Examples.Window.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenTK.OpenGL.Examples.Window.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,117 +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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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,26 +0,0 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.42
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace OpenTK.OpenGL.Examples.Window.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
38
Source/Examples/OpenGL/Window/Window.Designer.cs
generated
38
Source/Examples/OpenGL/Window/Window.Designer.cs
generated
|
@ -1,38 +0,0 @@
|
|||
namespace OpenTK.OpenGL.Test
|
||||
{
|
||||
partial class Window
|
||||
{
|
||||
/// <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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Text = "GLForm";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using OpenTK.OpenGL;
|
||||
|
||||
|
||||
namespace OpenTK.OpenGL.Test
|
||||
{
|
||||
public partial class Window : Form
|
||||
{
|
||||
public Context context;
|
||||
|
||||
public Window()
|
||||
{
|
||||
InitializeComponent();
|
||||
context = Context.Create(this, 8, 8, 8, 8, 16, 0, false);
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
Text =
|
||||
GL.GetString(Enums.StringName.VENDOR) + " " +
|
||||
GL.GetString(Enums.StringName.RENDERER) + " " +
|
||||
GL.GetString(Enums.StringName.VERSION);
|
||||
|
||||
GL.ClearColor(0.1f, 0.1f, 0.5f, 0.0f);
|
||||
|
||||
OnResize(e);
|
||||
}
|
||||
|
||||
protected override void OnResize(EventArgs e)
|
||||
{
|
||||
base.OnResize(e);
|
||||
|
||||
if (ClientSize.Height == 0)
|
||||
ClientSize = new System.Drawing.Size(ClientSize.Width, 1);
|
||||
|
||||
GL.Viewport(0, 0, ClientSize.Width, ClientSize.Height);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.PROJECTION);
|
||||
GL.LoadIdentity();
|
||||
|
||||
Glu.Perspective(45.0, ClientSize.Width / (double)ClientSize.Height, 1.0, 64.0);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
GL.MatrixMode(Enums.MatrixMode.MODELVIEW);
|
||||
GL.LoadIdentity();
|
||||
Glu.LookAt(
|
||||
0.0, 0.0, 5.0,
|
||||
0.0, 0.0, -1.0,
|
||||
0.0, 1.0, 0.0
|
||||
);
|
||||
|
||||
GL.Clear(Enums.ClearBufferMask.COLOR_BUFFER_BIT);
|
||||
|
||||
GL.Begin(Enums.BeginMode.TRIANGLES);
|
||||
|
||||
GL.Color3f(1.0f, 0.0f, 0.0f); GL.Vertex3i(-1, -1, 1);
|
||||
GL.Color3f(0.0f, 0.0f, 1.0f); GL.Vertex3i(1, -1, 1);
|
||||
GL.Color3f(0.0f, 1.0f, 0.0f); GL.Vertex3i(1, 1, 1);
|
||||
|
||||
GL.End();
|
||||
|
||||
context.SwapBuffers();
|
||||
}
|
||||
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.Run(new Window());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E4CEA249-4014-49CB-AF37-5A303A4A08D1}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>OpenTK.OpenGL.Examples.Window</RootNamespace>
|
||||
<AssemblyName>OpenTK.OpenGL.Examples.Window</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\Binaries\Debug\Examples\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\..\Binaries\Release\Examples\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Window.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Window.Designer.cs">
|
||||
<DependentUpon>Window.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\OpenGL\OpenGL\OpenTK.OpenGL.csproj">
|
||||
<Project>{836876D1-0C8D-4240-BEE4-859D9D3D46CB}</Project>
|
||||
<Name>OpenTK.OpenGL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -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,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
@ -11,6 +10,7 @@
|
|||
<RootNamespace>OpenTK.OpenGL.Bind</RootNamespace>
|
||||
<AssemblyName>OpenTK.OpenGL.Bind</AssemblyName>
|
||||
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
|
||||
<PostBuildEvent>$(TargetName)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -20,8 +20,6 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
@ -30,33 +28,6 @@
|
|||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ReadSpecs.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Structures\Constant.cs" />
|
||||
<Compile Include="Structures\Enum.cs" />
|
||||
<Compile Include="Structures\Function.cs" />
|
||||
<Compile Include="Structures\Parameter.cs" />
|
||||
<Compile Include="Structures\ParameterCollection.cs" />
|
||||
<Compile Include="TranslateSpecs.cs" />
|
||||
<Compile Include="WriteContexts.cs" />
|
||||
<Compile Include="WriteSpecs.cs" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>$(TargetName)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
|
@ -73,4 +44,22 @@
|
|||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ReadSpecs.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Structures\Constant.cs" />
|
||||
<Compile Include="Structures\Enum.cs" />
|
||||
<Compile Include="Structures\Function.cs" />
|
||||
<Compile Include="Structures\Parameter.cs" />
|
||||
<Compile Include="Structures\ParameterCollection.cs" />
|
||||
<Compile Include="TranslateSpecs.cs" />
|
||||
<Compile Include="WriteContexts.cs" />
|
||||
<Compile Include="WriteSpecs.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="changelog.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,14 +1,6 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory>
|
||||
</InstallUrlHistory>
|
||||
<SupportUrlHistory>
|
||||
</SupportUrlHistory>
|
||||
<UpdateUrlHistory>
|
||||
</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory>
|
||||
</BootstrapperUrlHistory>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
|
|
|
@ -29,5 +29,5 @@ using System.Runtime.InteropServices;
|
|||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("0.7.5.0")]
|
||||
[assembly: AssemblyFileVersion("0.7.5.0")]
|
||||
[assembly: AssemblyVersion("0.7.5.1")]
|
||||
[assembly: AssemblyFileVersion("0.7.5.1")]
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -13,7 +14,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
static class SpecReader
|
||||
{
|
||||
#region Read function specs
|
||||
|
||||
public static List<Function> ReadFunctionSpecs(string file)
|
||||
{
|
||||
List<Function> functions = new List<Function>();
|
||||
|
@ -125,89 +125,9 @@ namespace OpenTK.OpenGL.Bind
|
|||
|
||||
return functions;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Read constant specs
|
||||
[Obsolete]
|
||||
public static List<Constant> ReadConstantSpecs(string file)
|
||||
{
|
||||
List<Constant> constants = new List<Constant>();
|
||||
|
||||
string path = Path.Combine(Settings.InputPath, file);
|
||||
StreamReader sr;
|
||||
|
||||
try
|
||||
{
|
||||
sr = new StreamReader(path);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine("Error opening spec file: {0}", path);
|
||||
return null;
|
||||
}
|
||||
Console.WriteLine("Reading constant specs from file: {0}", file);
|
||||
|
||||
do
|
||||
{
|
||||
string line = sr.ReadLine().Trim();
|
||||
|
||||
if (String.IsNullOrEmpty(line) ||
|
||||
line.StartsWith("#") || // Disregard comments.
|
||||
line.StartsWith("passthru") || // Disregard passthru statements.
|
||||
line.StartsWith("required-props:") ||
|
||||
line.StartsWith("param:") ||
|
||||
line.StartsWith("dlflags:") ||
|
||||
line.StartsWith("glxflags:") ||
|
||||
line.StartsWith("vectorequiv:") ||
|
||||
line.StartsWith("category:") ||
|
||||
line.StartsWith("version:") ||
|
||||
line.StartsWith("glxsingle:") ||
|
||||
line.StartsWith("glxropcode:") ||
|
||||
line.StartsWith("glxvendorpriv:") ||
|
||||
line.StartsWith("glsflags:") ||
|
||||
line.StartsWith("glsopcode:") ||
|
||||
line.StartsWith("glsalias:") ||
|
||||
line.StartsWith("wglflags:") ||
|
||||
line.StartsWith("extension:") ||
|
||||
line.StartsWith("alias:") ||
|
||||
line.StartsWith("offset:") ||
|
||||
line.Contains("enum:"))
|
||||
continue;
|
||||
|
||||
line = line.Replace('\t', ' ');
|
||||
|
||||
string[] words = line.Split(Translation.Separators, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (words.Length == 0)
|
||||
continue;
|
||||
|
||||
Constant c = new Constant();
|
||||
if (line.Contains("="))
|
||||
{
|
||||
c.Name = words[0];
|
||||
c.Value = words[2];
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(c.Name) && !ListContainsConstant(constants, c))
|
||||
constants.Add(c);
|
||||
}
|
||||
while (!sr.EndOfStream);
|
||||
|
||||
return constants;
|
||||
}
|
||||
|
||||
public static bool ListContainsConstant(List<Constant> constants, Constant c)
|
||||
{
|
||||
foreach (Constant d in constants)
|
||||
if (d.Name == c.Name)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Read enum specs
|
||||
|
||||
public static Hashtable ReadEnumSpecs(string file)
|
||||
{
|
||||
Hashtable enums = new Hashtable();
|
||||
|
@ -315,11 +235,9 @@ namespace OpenTK.OpenGL.Bind
|
|||
|
||||
return enums;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Read type map
|
||||
|
||||
public static Dictionary<string, string> ReadTypeMap(string file)
|
||||
{
|
||||
Dictionary<string, string> map = new Dictionary<string, string>();
|
||||
|
@ -360,7 +278,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
|
||||
return map;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -9,6 +10,7 @@ using System.Collections;
|
|||
|
||||
namespace OpenTK.OpenGL.Bind
|
||||
{
|
||||
#region WrapperTypes enum
|
||||
public enum WrapperTypes
|
||||
{
|
||||
None,
|
||||
|
@ -20,6 +22,7 @@ namespace OpenTK.OpenGL.Bind
|
|||
ReturnsString,
|
||||
ReturnsVoidPointer,
|
||||
}
|
||||
#endregion
|
||||
|
||||
static class Translation
|
||||
{
|
||||
|
@ -230,7 +233,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
#endregion
|
||||
|
||||
#region Translate parameters
|
||||
|
||||
private static void TranslateParameters(Function f, Hashtable enums)
|
||||
{
|
||||
string s;
|
||||
|
@ -248,7 +250,8 @@ namespace OpenTK.OpenGL.Bind
|
|||
}
|
||||
else if (p.Type == "GLenum")
|
||||
{
|
||||
p.Type = "Enums." + f.Category;
|
||||
if (enums.ContainsKey(f.Category))
|
||||
p.Type = "Enums." + f.Category;
|
||||
}
|
||||
else if (GLtypes.TryGetValue(p.Type, out s))
|
||||
p.Type = s;
|
||||
|
@ -299,7 +302,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
//}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Generate wrappers
|
||||
|
@ -320,7 +322,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
#endregion
|
||||
|
||||
#region Translate enums
|
||||
|
||||
public static void TranslateEnums(System.Collections.Hashtable enums)
|
||||
{
|
||||
foreach (Enum e in enums.Values)
|
||||
|
@ -341,7 +342,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
@ -8,10 +13,9 @@ namespace OpenTK.OpenGL.Bind
|
|||
static class ContextWriter
|
||||
{
|
||||
#region Write main context
|
||||
|
||||
public static void WriteMainContext(string output_path, List<Function> functions)
|
||||
{
|
||||
string filename = Path.Combine(output_path, "ContextLoad.cs");
|
||||
string filename = Path.Combine(output_path, "GLContextLoad.cs");
|
||||
|
||||
if (!Directory.Exists(Settings.OutputPath))
|
||||
Directory.CreateDirectory(Settings.OutputPath);
|
||||
|
@ -27,7 +31,7 @@ namespace OpenTK.OpenGL.Bind
|
|||
sw.WriteLine();
|
||||
sw.WriteLine("namespace {0}", Settings.OutputNamespace);
|
||||
sw.WriteLine("{");
|
||||
sw.WriteLine(" public abstract partial class Context");
|
||||
sw.WriteLine(" public abstract partial class GLContext");
|
||||
sw.WriteLine(" {");
|
||||
|
||||
sw.WriteLine(" #region OpenGL function loading");
|
||||
|
@ -49,9 +53,9 @@ namespace OpenTK.OpenGL.Bind
|
|||
sw.Flush();
|
||||
sw.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteDerivedContext
|
||||
public static void WriteDerivedContext(string output_path, string class_name, List<Function> functions, params string[] import_list)
|
||||
{
|
||||
string filename = Path.Combine(output_path, class_name + "Load.cs");
|
||||
|
@ -94,6 +98,7 @@ namespace OpenTK.OpenGL.Bind
|
|||
sw.Flush();
|
||||
sw.Close();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IsImport
|
||||
private static bool IsImportFunction(Function f, string[] import_list)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections;
|
||||
|
@ -14,7 +15,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
static partial class SpecWriter
|
||||
{
|
||||
#region WriteSpecs
|
||||
|
||||
public static void WriteSpecs(string output_path, List<Function> functions, List<Function> wrappers, Hashtable enums)
|
||||
{
|
||||
string filename = Path.Combine(output_path, Settings.OutputClass + ".cs");
|
||||
|
@ -53,12 +53,18 @@ namespace OpenTK.OpenGL.Bind
|
|||
sw.Flush();
|
||||
sw.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteLicense
|
||||
public static void WriteLicense(StreamWriter sw)
|
||||
{
|
||||
sw.WriteLine("#region License");
|
||||
sw.WriteLine("//Copyright (c) 2006 Stephen Apostolopoulos");
|
||||
sw.WriteLine("//See license.txt for license info");
|
||||
sw.WriteLine("#endregion");
|
||||
sw.WriteLine();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region WriteTypes
|
||||
private static void WriteTypes(StreamWriter sw)
|
||||
|
@ -167,7 +173,7 @@ namespace OpenTK.OpenGL.Bind
|
|||
{
|
||||
if (!f.Extension)
|
||||
{
|
||||
sw.WriteLine(" [DllImport(\"opengl32\", EntryPoint = \"gl{0}\")]", f.Name.TrimEnd('_'));
|
||||
sw.WriteLine(" [DllImport(\"opengl32.dll\", EntryPoint = \"gl{0}\")]", f.Name.TrimEnd('_'));
|
||||
sw.WriteLine(" public static extern {0};", f.ToString());
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +201,6 @@ namespace OpenTK.OpenGL.Bind
|
|||
#endregion
|
||||
|
||||
#region Write wrappers
|
||||
|
||||
public static void WriteWrappers(StreamWriter sw, List<Function> wrappers)
|
||||
{
|
||||
sw.WriteLine(" #region Wrappers");
|
||||
|
|
14
Source/OpenGL/Bind/changelog.txt
Normal file
14
Source/OpenGL/Bind/changelog.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
OpenTK.OpenGL.Bind 0.7.5 -> 0.7.5.1
|
||||
+ Added license information to the generated bindings.
|
||||
+ Changed the name of the main Context class to GLContext (Context is used in the BCL).
|
||||
|
||||
OpenTK.OpenGL.Bind 0.7.4 -> 0.7.5
|
||||
+ Added wrappers for all functions that accept arrays. Permitted parameters for these are: an array of the original type (e.g. float[]), an IntPtr (if you manage memory yourself), or any blittable type (e.g. float[,,]). No type checking is done in the last case, so be careful!
|
||||
+ Updated the wrappers for all functions that accept or return void pointers. Permitted parameters for these are: an IntPtr or any blittable type (type checking is turned off, so be extra careful!)
|
||||
+ Aliased the GLbool type to int. It is hacky, but the examples bundled with Tao rely on this...
|
||||
+ Added a wrapper for glLineStipple. Now you can pass an int to it, but only the last 16 bits will be used for the stipple (as per the function specification). This was the only way to avoid aliasing the parameter to ushort (non-CLS compatible) or having the user write unchecked((short)0x....) every time he used the function.
|
||||
+ Added the WrapperType enum. Every function has a Property that indicates the wrapper it will need. This cleans up the WriteWrappers function somewhat.
|
||||
+ Added the PreviousType property to the Function class. This is used when generating wrappers for functions with type-checked arrays (e.g. float[] arrays etc).
|
||||
+ Corrected some type aliases in cs_types.txt
|
||||
+ Added the missing wrappers for glReadPixels! (this falls in the out void array).
|
||||
+ A missing enum now defaults to Enum.[Function category] (a new property was added to the Function class and the SpecReader.ReadFunctions function was modified). I should test this to see if it works ok.
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,8 @@
|
|||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
#region License
|
||||
//Copyright (c) 2006 Stephen Apostolopoulos
|
||||
//See license.txt for license info
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/* Copyright (c) 2006 Stephen Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using OpenTK.OpenGL.Platform;
|
||||
|
||||
namespace OpenTK.OpenGL
|
||||
{
|
||||
public abstract partial class Context : IDisposable
|
||||
{
|
||||
public bool CoreLoaded = false;
|
||||
public bool ExtensionsLoaded = false;
|
||||
|
||||
public abstract void SwapBuffers();
|
||||
public abstract System.Delegate GetAddress(string function_string, Type function_type);
|
||||
public abstract void MakeCurrent();
|
||||
|
||||
//public abstract void LoadExtensions();
|
||||
|
||||
public abstract void Dispose();
|
||||
|
||||
public static Context Create(Control c, int red, int green, int blue, int alpha, int depth, int stencil, bool fullscreen)
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major < 6 ||
|
||||
Environment.OSVersion.Platform == PlatformID.Win32Windows)
|
||||
{
|
||||
return new WindowsContext(c, red, green, blue, alpha, depth, stencil, fullscreen);
|
||||
}
|
||||
else if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version.Major >= 6)
|
||||
{
|
||||
return new WindowsVistaContext(c, red, green, blue, alpha, depth, stencil, fullscreen);
|
||||
}
|
||||
else if (Environment.OSVersion.Platform == PlatformID.Unix)
|
||||
{
|
||||
return new X11Context(c, red, green, blue, alpha, depth, stencil, fullscreen);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new PlatformNotSupportedException("The platform on which you are trying to run this program is not currently supported. Sorry for the inconvenience.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace OpenTK.OpenGL.Platform
|
||||
{
|
||||
public partial class WindowsContext : OpenTK.OpenGL.Context
|
||||
public partial class WindowsContext : OpenTK.OpenGL.GLContext
|
||||
{
|
||||
const string _dll_name = "OPENGL32.DLL";
|
||||
int _dll_handle;
|
||||
|
@ -33,11 +33,11 @@ namespace OpenTK.OpenGL.Platform
|
|||
error_code = Marshal.GetLastWin32Error();
|
||||
if (error_code != 0)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("LoadLibrary({0}) set error code: {1}. Will not load extensions.", _dll_name, error_code);
|
||||
//System.Diagnostics.Debug.WriteLine("LoadLibrary({0}) set error code: {1}. Will not load extensions.", _dll_name, error_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine("Loaded dll: {0}", _dll_name);
|
||||
//System.Diagnostics.Debug.WriteLine("Loaded dll: {0}", _dll_name);
|
||||
load_extensions = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ using OpenTK.OpenGL;
|
|||
|
||||
namespace OpenTK.OpenGL.Platform
|
||||
{
|
||||
public partial class WindowsVistaContext : OpenTK.OpenGL.Context
|
||||
public partial class WindowsVistaContext : OpenTK.OpenGL.GLContext
|
||||
{
|
||||
const string _dll_name = "OPENGL32.DLL";
|
||||
int _dll_handle;
|
||||
|
|
|
@ -9,7 +9,7 @@ using System.Windows.Forms;
|
|||
|
||||
namespace OpenTK.OpenGL.Platform
|
||||
{
|
||||
public partial class X11Context : OpenTK.OpenGL.Context
|
||||
public partial class X11Context : OpenTK.OpenGL.GLContext
|
||||
{
|
||||
public X11Context(Control c, int red, int green, int blue, int alpha, int depth, int stencil, bool fullscreen)
|
||||
{
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace OpenTK.OpenGL
|
||||
{
|
||||
//public partial class Enums
|
||||
//{
|
||||
// const int VERTEX_SHADER = VERSION_2_0.VERTEX_SHADER;
|
||||
// const int FRAGMENT_SHADER = VERSION_2_0.FRAGMENT_SHADER;
|
||||
//}
|
||||
}
|
|
@ -34,6 +34,7 @@
|
|||
<Reference Include="System.Data">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<HintPath>H:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -42,17 +43,19 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Bindings\ContextLoad.cs" />
|
||||
<Compile Include="Bindings\GLContextLoad.cs" />
|
||||
<Compile Include="Bindings\GL.cs" />
|
||||
<Compile Include="Bindings\WindowsContextLoad.cs" />
|
||||
<Compile Include="Bindings\WindowsVistaContextLoad.cs" />
|
||||
<Compile Include="Bindings\X11ContextLoad.cs" />
|
||||
<Compile Include="Forms\GLForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Glu.cs" />
|
||||
<Compile Include="Contexts\Context.cs" />
|
||||
<Compile Include="Contexts\GLContext.cs" />
|
||||
<Compile Include="Contexts\WindowsContext.cs" />
|
||||
<Compile Include="Contexts\WindowsVistaContext.cs" />
|
||||
<Compile Include="Contexts\X11Context.cs" />
|
||||
<Compile Include="MissingEnums.cs" />
|
||||
<Compile Include="Wgl.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
@ -63,15 +66,4 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -38,11 +38,4 @@
|
|||
<Compile Include="WinAPI.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,16 +1,12 @@
|
|||
OpenTK 0.3.2 -> 0.3.3
|
||||
+ OpenTK.OpenGL.Bind 0.7.5 -> 0.7.5.1 (see Bind changelog for more information)
|
||||
+ Added the GLForm class.
|
||||
+ Added the GLForm.Lesson01 example.
|
||||
|
||||
OpenTK 0.3.1 -> 0.3.2
|
||||
+ OpenTK.OpenGL.Glu: Eliminated the temporary IntPtr variable in the GetString and ErrorString functions.
|
||||
+ Specifications.cs_types.txt: Changed types in order to be CLS compliant.
|
||||
+ OpenTK.OpenGL.Bind 0.7.4 -> 0.7.5
|
||||
+ + Added wrappers for all functions that accept arrays. Permitted parameters for these are: an array of the original type (e.g. float[]), an IntPtr (if you manage memory yourself), or any blittable type (e.g. float[,,]). No type checking is done in the last case, so be careful!
|
||||
+ + Updated the wrappers for all functions that accept or return void pointers. Permitted parameters for these are: an IntPtr or any blittable type (type checking is turned off, so be extra careful!)
|
||||
+ + Aliased the GLbool type to int. It is hacky, but the examples bundled with Tao rely on this...
|
||||
+ + Added a wrapper for glLineStipple. Now you can pass an int to it, but only the last 16 bits will be used for the stipple (as per the function specification). This was the only way to avoid aliasing the parameter to ushort (non-CLS compatible) or having the user write unchecked((short)0x....) every time he used the function.
|
||||
+ + Added the WrapperType enum. Every function has a Property that indicates the wrapper it will need. This cleans up the WriteWrappers function somewhat.
|
||||
+ + Added the PreviousType property to the Function class. This is used when generating wrappers for functions with type-checked arrays (e.g. float[] arrays etc).
|
||||
+ + Corrected some type aliases in cs_types.txt
|
||||
+ + Added the missing wrappers for glReadPixels! (this falls in the out void array).
|
||||
+ + A missing enum now defaults to Enum.[Function category] (a new property was added to the Function class and the SpecReader.ReadFunctions function was modified). I should test this to see if it works ok.
|
||||
+ Added the GLSL.Lesson01 example.
|
||||
|
||||
OpenTK 0.3.0 -> 0.3.1
|
||||
|
|
1
todo.txt
1
todo.txt
|
@ -1,4 +1,5 @@
|
|||
Todo:
|
||||
+ Find out why many examples crash when compiled in release mode, but only when run outside the editor.
|
||||
+ Add more examples (e.g. the GLSL example I wrote, some of kanato's examples etc).
|
||||
+ + Change the hierarchy of the WindowsContext and WindowsVistaContext classes. The should have a common ancestor who manages the windows creation (it should be the same for both).
|
||||
+ + Add more constructors to the WindowsContext classes. This probably needs updating of the WinAPI assembly.
|
||||
|
|
Loading…
Reference in a new issue