From 7a2da17f5c8c67d28430eda15b73e0903c0ce1f3 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 10 Aug 2007 09:27:13 +0000 Subject: [PATCH] Updated Build.exe to correctly generate sharpdev and sharpdev2 projects. Removed some unused variables. Added licensing information. --- Build/Build.exe | Bin 10752 -> 10752 bytes Build/Instructions.txt | 3 +- Source/Bind/BindStreamWriter.cs | 8 ++- Source/Bind/GL2/Generator.cs | 8 ++- Source/Bind/GL2/SpecReader.cs | 8 ++- Source/Bind/GL2/SpecWriter.cs | 8 ++- Source/Bind/IBind.cs | 8 ++- Source/Bind/ISpecReader.cs | 8 ++- Source/Bind/ISpecWriter.cs | 8 ++- Source/Bind/Main.cs | 31 ++--------- Source/Bind/Settings.cs | 7 ++- Source/Bind/Structures/Constant.cs | 7 ++- Source/Bind/Structures/Delegate.cs | 2 - Source/Bind/Structures/Enum.cs | 7 ++- Source/Bind/Structures/Parameter.cs | 35 +++--------- Source/Bind/Structures/Type.cs | 24 +++++++- Source/Bind/Utilities.cs | 8 ++- Source/Bind/Wgl/Generator.cs | 8 ++- Source/Build/Build.cs | 14 ++++- Source/Examples/ExampleLauncher.cs | 10 +++- Source/Examples/IExample.cs | 8 ++- .../Basic/NoFramework/QueryModesForm.cs | 8 ++- .../QueryDisplayModes/DisplayModesForm.cs | 8 ++- .../OpenGL/Basic/QueryDisplayModes/Program.cs | 8 ++- Source/Examples/Tests/S01_Call_Performance.cs | 12 +++- Source/Examples/Tests/S02_RawInput_Logger.cs | 19 +++---- Source/Examples/Tutorial/T08_VBO.cs | 2 +- .../WinForms/W01_First_Window.Designer.cs | 3 +- Source/Examples/WinForms/W01_First_Window.cs | 5 +- Source/OpenTK/GLControl.cs | 6 +- Source/OpenTK/Input/IInputDevice.cs | 10 +++- Source/OpenTK/Input/IInputDriver.cs | 10 +++- Source/OpenTK/Input/IKeyboardDriver.cs | 8 ++- Source/OpenTK/Input/IMouse.cs | 8 ++- Source/OpenTK/Input/IMouseDriver.cs | 8 ++- Source/OpenTK/Input/Mouse.cs | 8 ++- Source/OpenTK/InputDriver.cs | 8 ++- Source/OpenTK/OpenGL/GLHelper.cs | 1 - Source/OpenTK/Platform/IGameWindow.cs | 9 ++- Source/OpenTK/Platform/INativeGLWindow.cs | 8 ++- Source/OpenTK/Platform/IResizable.cs | 8 ++- Source/OpenTK/Platform/IWindowInfo.cs | 8 ++- Source/OpenTK/Platform/Utilities.cs | 8 ++- Source/OpenTK/Platform/Windows/WinRawMouse.cs | 8 ++- Source/OpenTK/Platform/Windows/WindowInfo.cs | 8 ++- Source/OpenTK/Platform/X11/WindowInfo.cs | 20 ++++--- Source/OpenTK/Platform/X11/X11GLContext.cs | 52 ++++++++---------- Source/OpenTK/Platform/X11/X11Input.cs | 8 ++- Source/OpenTK/Platform/X11/X11Keyboard.cs | 8 ++- Source/OpenTK/Platform/X11/X11Mouse.cs | 8 ++- 50 files changed, 338 insertions(+), 167 deletions(-) diff --git a/Build/Build.exe b/Build/Build.exe index d2ec398a3b89173f7ef196c4deaebe3459ee4a9e..b4ba2af06ec2c23381c1b4bb32e073e2c2a80e5a 100644 GIT binary patch delta 2347 zcma)7du-EH6h8O&Xt%EI)^;!VpnCuo##lGl8<=$unM-(WOo)*|*x1Ii{um20+EucU zITPG=4WiLS14|r=ah4E_GdN8qAii+n50Gev|L}BbAVR|MyT8`KmL=Nce&>AWp7Wji zYU{7@*K~Kvx91M^yqYY1+g5*?CyQXM>%)k()w`99`L>Bgk^EXR;Y zr6(2;rNj_1os)sTm*(cHBp3UVw@IDWVpSwdmRN^U5GCiQ!I~0uJI+)A``q>O)3e8c0Go; z9uNB6gpGs!3U(W8KSr`dRFDhMqGa;AupATl6tvZr^DoqdaxbFV3xLVBjDlb-<09RL zbeB==#Dy9I75oKBElim~sa;oEhN=Ij^twV|>|OqTSU>xauL$ptn81T_g+Wmp;S=F|*hrwobe1tMFEKmWd0uC}`|JgwD^mRW zs}L*k>u*zlHukT8-vFvVTJ73o3@;-Tn{4EVl;XoPQ?zj&uv9KR2ibHV9-(-p5J|6Y z(VBNQ?gpa*e7npjNMBn`Wey^Ib140(wUuSCHQ?uXp*72fFEoyX$bwNQEN`=xv|FT` z%s`nsu9lWVT9cY219j{EuGQ5)%r(uyr|=EKnLxY5AwvQ zFhX-)an)_%+{*hr#F+Rw=d985l-YxDHA8Wm*e=rpO^ZCs_Oqu1%uz z>O5*=+bA2Dk4soDdC5aBN_(i1-jLdWhb12(#}HplBT@$<-{BC~(>awm{`|P+3ZRFcQ|2>)?sgW9mig>WYE^nM@tRV_26X8`9oN%{vVna{ zzbKnoCEZY(*dX0jcECR>Yw#s?2QW&ZO%bOGUJoPyuw}T39O0jmjZX=ud_VIZmeSyY2?KpN&~eL{vs2n#~Nrm z?Lr3TjJuJS6BtWy%Nw(@s70@BL}d%5(Db?#%EBI-QQd%9%KoqX9ArIG5r~?#PO=jX z|1?lz86GR|`o7{cEgL_}_og(mu)w91dS>nPJUo{^4_}d%Aa#5A*0hd*b@n}3`Zzma LbN$YG+{S+Zcp|vj delta 2126 zcma)6eN0tl7=PY#-g7QoE*B0LxCGJ#5xvSsNCFqsyogst|9~b^lmn+sF(+dunz6Qf zuP&ST6?d=A+%PF~DeI5mZfUbNv!XPe>9o0}wk+ptxoo**%|XBS+#4Ztt+PG9_xU~V z^L5_$IVao{ZtB~v&b@gkvNKoNhjpVP9l4unWcav#mVE6IO3#OlH@okm&6$-Pf3yzCykP%T4dA}mbKy~ z4J}Rgrl3gm0n|41fFb)M603N{j2h?*A-vmK>%Zz@WV7q6<*wfo3V26sQ};s#ILvtg7w5^8cs$Hsyh5(Z@zcd5jy!5$FX>EXm+nnzMK~^I{8i` zo%xO2nw%+QWzzZo&GdrI)C%{BnckJ*iRf-ZWuISqV!-~}Gh4QoDP6O*hh3Y6VM`Yc zHqF>NY3B@fTr+|Q;^y7>9hs};#LhZFX^Hw;RMq~ zYT{v*CO%9&oHRZ$X0cdje~A@GuiDQr<`eHZJispeg{@(b9fz$cm0%A3 zGjd@a)EZxNc-)48h}*^s#ikN7!Odoo55@`#9M8(K=4^ptA+uYE({zbG+d6?cV zBq>XgL6S>jD62^@+cDPl%=@z zcI7!mr>&MAwe%57zi45jDm^!mT=yrOY&t-Pn2h{0^ zWgh|BX}u;b*Tlh;1-2yQ(I{KoOzF)SVFopa&sz8`&_yq+5z(8P8@gJErYS-f$b*|| zoE~F8QU-C#ni*qhtPt#jIGYM)qtscky<+A;-3M{j&dSI^=kOOMdM&GmRgshCSuB$E zvz7rS|II5g5{!n>pAw=ISQyQhb7Sc$ErI?h%MQyY7W@e=OQFxTnbgD9(QIH9j(@qb zk!q<^>7sh-Rl0$1C_S(og#Bqcj%xLE635pRBZLoqJRw4)OQU~w`ed-Y_ z-4LAm)sUrUAkiW97;sSin9{ANbULSArYZED`V;V$dYiV;1GNf1Y5W07PUQ-Vz<(o7 z_(|>o`hd06zzdngq7X|*$#S-zI{0pEY~hR9Q7iS3g)MZPx3G`s0&ivYbe*qdLv)LG zK<`&KLB9umh!jntTk8hSvM>NVN-bIsJB>Uc=wWReaG!RYj?w|G3OEEb@@Yidjki3n z9RuFbgovg!RF_f`9b~1LlOya9t))6Tg@3k<`B($n$@Zh&^K_kf7}xpGGe27E`i({X z8C`5z<)T1EWqH}0lDdkD#U*p97gv?|sw>M&>K0Z6X4h2)%4>ar=%viVN_6vMcUZJP zr&Ns=dzzJ0zUJnpwlDsu?_KkC>y*w}d&J)S^}|zFvlQy^|648S7o7#!N|#^kD0nqG XFg=e&ozwnOmA /// Indicates whether this function needs to be wrapped with a Marshaling function. /// This flag is set if a function contains an Array parameter, or returns diff --git a/Source/Bind/Structures/Enum.cs b/Source/Bind/Structures/Enum.cs index cf6690cb..f7db633f 100644 --- a/Source/Bind/Structures/Enum.cs +++ b/Source/Bind/Structures/Enum.cs @@ -1,6 +1,7 @@ -#region License -//Copyright (c) 2006 Stefanos Apostolopoulos -//See license.txt for license info +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ #endregion using System; diff --git a/Source/Bind/Structures/Parameter.cs b/Source/Bind/Structures/Parameter.cs index 9870cf8b..288b3ea1 100644 --- a/Source/Bind/Structures/Parameter.cs +++ b/Source/Bind/Structures/Parameter.cs @@ -1,6 +1,7 @@ -#region License -//Copyright (c) 2006 Stefanos Apostolopoulos -//See license.txt for license info +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ #endregion using System; @@ -123,30 +124,6 @@ namespace Bind.Structures #endregion - #region public string GetFullType() - - public string GetFullType(Dictionary CSTypes, bool compliant) - { - if (Pointer && Settings.Compatibility == Settings.Legacy.Tao) - return "IntPtr"; - - if (!compliant) - { - return - CurrentType + - (Pointer ? "*" : "") + - (Array > 0 ? "[]" : ""); - } - - return - GetCLSCompliantType() + - (Pointer ? "*" : "") + - (Array > 0 ? "[]" : ""); - - } - - #endregion - #region override public string ToString() override public string ToString() @@ -216,6 +193,8 @@ namespace Bind.Structures #endregion + #region internal static Parameter Translate(Parameter par, string Category) + internal static Parameter Translate(Parameter par, string Category) { Enum @enum; @@ -296,6 +275,8 @@ namespace Bind.Structures return p; } + + #endregion } #endregion diff --git a/Source/Bind/Structures/Type.cs b/Source/Bind/Structures/Type.cs index 53ac0424..95cdb336 100644 --- a/Source/Bind/Structures/Type.cs +++ b/Source/Bind/Structures/Type.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; using System.IO; @@ -12,6 +18,8 @@ namespace Bind.Structures private static bool typesLoaded; + #region internal static void Initialize(string glTypes, string csTypes) + internal static void Initialize(string glTypes, string csTypes) { if (!typesLoaded) @@ -33,7 +41,11 @@ namespace Bind.Structures typesLoaded = true; } } + + #endregion + #region --- Constructors --- + public Type() { } @@ -47,6 +59,8 @@ namespace Bind.Structures this.Pointer = t.Pointer; this.Reference = t.Reference; } + + #endregion #region public string Type @@ -217,10 +231,16 @@ namespace Bind.Structures #endregion + #region public override string ToString() + public override string ToString() { return CurrentType; } + + #endregion + + #region internal static Type Translate(Type type) internal static Type Translate(Type type) { @@ -234,5 +254,7 @@ namespace Bind.Structures return t; } + + #endregion } } diff --git a/Source/Bind/Utilities.cs b/Source/Bind/Utilities.cs index f5ca722a..0c91930d 100644 --- a/Source/Bind/Utilities.cs +++ b/Source/Bind/Utilities.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; using System.IO; diff --git a/Source/Bind/Wgl/Generator.cs b/Source/Bind/Wgl/Generator.cs index b5070ada..9b57d340 100644 --- a/Source/Bind/Wgl/Generator.cs +++ b/Source/Bind/Wgl/Generator.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/Build/Build.cs b/Source/Build/Build.cs index 4fcdf3f4..79210b34 100644 --- a/Source/Build/Build.cs +++ b/Source/Build/Build.cs @@ -43,6 +43,7 @@ namespace OpenTK.Build Mono, VS2005, SharpDevelop, + SharpDevelop2, MonoDevelop, Clean, DistClean, @@ -108,6 +109,12 @@ namespace OpenTK.Build target = BuildTarget.MonoDevelop; break; + case "sharpdev2": + case "sharpdevelop2": + case "sd2": + target = BuildTarget.SharpDevelop2; + break; + case "sharpdev": case "sharpdevelop": case "sd": @@ -177,7 +184,12 @@ namespace OpenTK.Build case BuildTarget.SharpDevelop: Console.WriteLine("Creating SharpDevelop project files"); - ExecuteProcess(PrebuildPath, "/target monodev /file " + PrebuildXml); + ExecuteProcess(PrebuildPath, "/target sharpdev /file " + PrebuildXml); + break; + + case BuildTarget.SharpDevelop2: + Console.WriteLine("Creating SharpDevelop project files"); + ExecuteProcess(PrebuildPath, "/target sharpdev2 /file " + PrebuildXml); break; case BuildTarget.VS2005: diff --git a/Source/Examples/ExampleLauncher.cs b/Source/Examples/ExampleLauncher.cs index 765239cf..aeebc664 100644 --- a/Source/Examples/ExampleLauncher.cs +++ b/Source/Examples/ExampleLauncher.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -139,4 +145,4 @@ namespace Examples } } } -} \ No newline at end of file +} diff --git a/Source/Examples/IExample.cs b/Source/Examples/IExample.cs index c409129a..a1c36e0a 100644 --- a/Source/Examples/IExample.cs +++ b/Source/Examples/IExample.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs index e9d1e363..391faeef 100644 --- a/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs +++ b/Source/Examples/OpenGL/Basic/NoFramework/QueryModesForm.cs @@ -1,3 +1,9 @@ +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + #region --- Using Directives --- using System; @@ -261,4 +267,4 @@ namespace Examples.Windowing */ } } -} \ No newline at end of file +} diff --git a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs b/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs index 863c8f80..97767198 100644 --- a/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs +++ b/Source/Examples/OpenGL/Basic/QueryDisplayModes/DisplayModesForm.cs @@ -1,3 +1,9 @@ +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + using System; using System.Collections.Generic; using System.ComponentModel; @@ -29,4 +35,4 @@ namespace Examples.Windowing } } -} \ No newline at end of file +} diff --git a/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs b/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs index 718313ec..c1d8efb1 100644 --- a/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs +++ b/Source/Examples/OpenGL/Basic/QueryDisplayModes/Program.cs @@ -1,3 +1,9 @@ +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + using System; using System.Collections.Generic; using System.Windows.Forms; @@ -8,4 +14,4 @@ namespace QueryDisplayModes { } -} \ No newline at end of file +} diff --git a/Source/Examples/Tests/S01_Call_Performance.cs b/Source/Examples/Tests/S01_Call_Performance.cs index 9942c287..5573a0a1 100644 --- a/Source/Examples/Tests/S01_Call_Performance.cs +++ b/Source/Examples/Tests/S01_Call_Performance.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,7 +18,7 @@ using System.Runtime.InteropServices; namespace Examples.Tests { - public partial class S01_Call_Performance : Form, IExample + public partial class S01_Call_Performance : Form /*, IExample*/ { public S01_Call_Performance() { @@ -113,4 +119,4 @@ namespace Examples.Tests #endregion } -} \ No newline at end of file +} diff --git a/Source/Examples/Tests/S02_RawInput_Logger.cs b/Source/Examples/Tests/S02_RawInput_Logger.cs index 1aa4ec11..5a687825 100644 --- a/Source/Examples/Tests/S02_RawInput_Logger.cs +++ b/Source/Examples/Tests/S02_RawInput_Logger.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; @@ -74,16 +80,5 @@ namespace Examples.Tests GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT); Context.SwapBuffers(); } - - public override void Run() - { - while (!Quit) - { - ProcessEvents(); - OnUpdateFrame(EventArgs.Empty); - OnRenderFrame(EventArgs.Empty); - Thread.Sleep(10); - } - } } } diff --git a/Source/Examples/Tutorial/T08_VBO.cs b/Source/Examples/Tutorial/T08_VBO.cs index 1438b307..a755cde8 100644 --- a/Source/Examples/Tutorial/T08_VBO.cs +++ b/Source/Examples/Tutorial/T08_VBO.cs @@ -19,7 +19,7 @@ using System.Threading; namespace Examples.Tutorial { - public class T08_VBO : OpenTK.GameWindow, IExample + public class T08_VBO : OpenTK.GameWindow /*, IExample */ { #region --- Private Fields --- diff --git a/Source/Examples/WinForms/W01_First_Window.Designer.cs b/Source/Examples/WinForms/W01_First_Window.Designer.cs index abd7da73..9cca2746 100644 --- a/Source/Examples/WinForms/W01_First_Window.Designer.cs +++ b/Source/Examples/WinForms/W01_First_Window.Designer.cs @@ -45,7 +45,6 @@ this.glControl1.Name = "glControl1"; this.glControl1.Size = new System.Drawing.Size(629, 565); this.glControl1.TabIndex = 0; - this.glControl1.Resize += new OpenTK.Platform.ResizeEvent(this.glControl1_Resize); this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint); this.glControl1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.glControl1_KeyDown); // @@ -104,4 +103,4 @@ private System.Windows.Forms.Button greenButton; private System.Windows.Forms.Button blueButton; } -} \ No newline at end of file +} diff --git a/Source/Examples/WinForms/W01_First_Window.cs b/Source/Examples/WinForms/W01_First_Window.cs index 158ac567..fd3428b5 100644 --- a/Source/Examples/WinForms/W01_First_Window.cs +++ b/Source/Examples/WinForms/W01_First_Window.cs @@ -23,7 +23,6 @@ namespace Examples.WinForms { public partial class W01_First_Window : Form, IExample { - OpenTK.InputDriver input; public W01_First_Window() { InitializeComponent(); @@ -34,8 +33,6 @@ namespace Examples.WinForms protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); - - //input = new OpenTK.InputDriver(OpenTK.Platform.Utilities.GetWindowInfo(this)); } private void redButton_Click(object sender, EventArgs e) @@ -89,4 +86,4 @@ namespace Examples.WinForms #endregion } -} +} diff --git a/Source/OpenTK/GLControl.cs b/Source/OpenTK/GLControl.cs index c9f0cbdd..95ed6c5d 100644 --- a/Source/OpenTK/GLControl.cs +++ b/Source/OpenTK/GLControl.cs @@ -64,7 +64,7 @@ namespace OpenTK Environment.OSVersion.Platform == (PlatformID)128) // some older versions of Mono reported 128. { - glControl = new OpenTK.Platform.X11.X11GLControl(this, Width, Height, false); + glControl = new OpenTK.Platform.X11.X11GLControl(this, new DisplayMode(Width, Height)); } else { @@ -147,8 +147,6 @@ namespace OpenTK #region --- IGLControl Members --- - public event CreateEvent Create; - #region public bool IsIdle /// @@ -246,7 +244,7 @@ namespace OpenTK #region --- IResizable Members --- - public new event ResizeEvent Resize; + //public new event ResizeEvent Resize; #endregion diff --git a/Source/OpenTK/Input/IInputDevice.cs b/Source/OpenTK/Input/IInputDevice.cs index 918d23ac..1dc00986 100644 --- a/Source/OpenTK/Input/IInputDevice.cs +++ b/Source/OpenTK/Input/IInputDevice.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; @@ -30,4 +36,4 @@ namespace OpenTK.Input /// HID } -} \ No newline at end of file +} diff --git a/Source/OpenTK/Input/IInputDriver.cs b/Source/OpenTK/Input/IInputDriver.cs index d69dd889..9d1ceca3 100644 --- a/Source/OpenTK/Input/IInputDriver.cs +++ b/Source/OpenTK/Input/IInputDriver.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; @@ -11,4 +17,4 @@ namespace OpenTK.Input //IEnumerable Mice { get; } //IEnumerable Hids { get; } } -} \ No newline at end of file +} diff --git a/Source/OpenTK/Input/IKeyboardDriver.cs b/Source/OpenTK/Input/IKeyboardDriver.cs index 688e18b9..70201957 100644 --- a/Source/OpenTK/Input/IKeyboardDriver.cs +++ b/Source/OpenTK/Input/IKeyboardDriver.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Input/IMouse.cs b/Source/OpenTK/Input/IMouse.cs index 44368aa7..3e7e43df 100644 --- a/Source/OpenTK/Input/IMouse.cs +++ b/Source/OpenTK/Input/IMouse.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Input/IMouseDriver.cs b/Source/OpenTK/Input/IMouseDriver.cs index d05a21ad..1f4de18a 100644 --- a/Source/OpenTK/Input/IMouseDriver.cs +++ b/Source/OpenTK/Input/IMouseDriver.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Input/Mouse.cs b/Source/OpenTK/Input/Mouse.cs index aa6fe1b2..e505fbf8 100644 --- a/Source/OpenTK/Input/Mouse.cs +++ b/Source/OpenTK/Input/Mouse.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/InputDriver.cs b/Source/OpenTK/InputDriver.cs index 296eb62b..dfcdfb25 100644 --- a/Source/OpenTK/InputDriver.cs +++ b/Source/OpenTK/InputDriver.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/OpenGL/GLHelper.cs b/Source/OpenTK/OpenGL/GLHelper.cs index 0c9b31dc..6a271382 100644 --- a/Source/OpenTK/OpenGL/GLHelper.cs +++ b/Source/OpenTK/OpenGL/GLHelper.cs @@ -4,7 +4,6 @@ */ #endregion - #region --- Using Directives --- using System; diff --git a/Source/OpenTK/Platform/IGameWindow.cs b/Source/OpenTK/Platform/IGameWindow.cs index 1400b6a3..0eca79b9 100644 --- a/Source/OpenTK/Platform/IGameWindow.cs +++ b/Source/OpenTK/Platform/IGameWindow.cs @@ -1,8 +1,13 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; - namespace OpenTK.Platform { interface IGameWindow : INativeGLWindow diff --git a/Source/OpenTK/Platform/INativeGLWindow.cs b/Source/OpenTK/Platform/INativeGLWindow.cs index f2bcdedb..d916f81a 100644 --- a/Source/OpenTK/Platform/INativeGLWindow.cs +++ b/Source/OpenTK/Platform/INativeGLWindow.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/IResizable.cs b/Source/OpenTK/Platform/IResizable.cs index 017a6af8..7e66ed48 100644 --- a/Source/OpenTK/Platform/IResizable.cs +++ b/Source/OpenTK/Platform/IResizable.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/IWindowInfo.cs b/Source/OpenTK/Platform/IWindowInfo.cs index 28bb10f0..90d6df36 100644 --- a/Source/OpenTK/Platform/IWindowInfo.cs +++ b/Source/OpenTK/Platform/IWindowInfo.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/Utilities.cs b/Source/OpenTK/Platform/Utilities.cs index e939fe72..4fe7677b 100644 --- a/Source/OpenTK/Platform/Utilities.cs +++ b/Source/OpenTK/Platform/Utilities.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; diff --git a/Source/OpenTK/Platform/Windows/WinRawMouse.cs b/Source/OpenTK/Platform/Windows/WinRawMouse.cs index 8ac0ae86..41380aba 100644 --- a/Source/OpenTK/Platform/Windows/WinRawMouse.cs +++ b/Source/OpenTK/Platform/Windows/WinRawMouse.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/Windows/WindowInfo.cs b/Source/OpenTK/Platform/Windows/WindowInfo.cs index 11518c14..8ccb435a 100644 --- a/Source/OpenTK/Platform/Windows/WindowInfo.cs +++ b/Source/OpenTK/Platform/Windows/WindowInfo.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/X11/WindowInfo.cs b/Source/OpenTK/Platform/X11/WindowInfo.cs index 0e8fb81c..c396c1bc 100644 --- a/Source/OpenTK/Platform/X11/WindowInfo.cs +++ b/Source/OpenTK/Platform/X11/WindowInfo.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; @@ -10,20 +16,20 @@ namespace OpenTK.Platform.X11 /// internal class WindowInfo : IWindowInfo { - internal WindowInfo() - { - visinfo = new VisualInfo(); + internal WindowInfo() + { + visinfo = new VisualInfo(); } - + internal WindowInfo(WindowInfo parent) - { + { this.Handle = parent.Handle; this.TopLevelWindow = parent.TopLevelWindow; this.Screen = parent.Screen; this.Display = parent.Display; this.RootWindow = parent.RootWindow; this.VisualInfo = parent.VisualInfo; - this.Parent = parent; + this.Parent = parent; } private IntPtr rootWindow, handle, topLevelWindow, display; diff --git a/Source/OpenTK/Platform/X11/X11GLContext.cs b/Source/OpenTK/Platform/X11/X11GLContext.cs index 57472efb..e2ff6515 100644 --- a/Source/OpenTK/Platform/X11/X11GLContext.cs +++ b/Source/OpenTK/Platform/X11/X11GLContext.cs @@ -23,7 +23,6 @@ namespace OpenTK.Platform.X11 private DisplayMode mode;// = new DisplayMode(); internal WindowInfo windowInfo; - private VisualInfo visualInfo; //private IntPtr desktopResolution = IntPtr.Zero; @@ -31,8 +30,7 @@ namespace OpenTK.Platform.X11 //private int stencilBits; // These have to be used by the X11GLControl. - internal IntPtr visual; - internal IntPtr colormap; + private IntPtr visual; private bool disposed; @@ -72,7 +70,7 @@ namespace OpenTK.Platform.X11 "Making context {0} current on thread {1} (Display: {2}, Screen: {3}, Window: {4})... ", x11context, System.Threading.Thread.CurrentThread.ManagedThreadId, - windowInfo.Display, + windowInfo.Display, windowInfo.Screen, windowInfo.Handle ) @@ -168,15 +166,15 @@ namespace OpenTK.Platform.X11 visual, shareHandle, direct - ); - if (x11context != IntPtr.Zero) + ); + if (x11context != IntPtr.Zero) { Debug.WriteLine(String.Format("New opengl context created. (id: {0})", x11context)); - Debug.Unindent(); - } - else - { - throw new ApplicationException("Could not create opengl context."); + Debug.Unindent(); + } + else + { + throw new ApplicationException("Could not create opengl context."); } } @@ -188,14 +186,14 @@ namespace OpenTK.Platform.X11 { Debug.WriteLine("Creating visual."); Debug.Indent(); - + Debug.Print("Requesting DisplayMode: {0}. ", mode.ToString()); - // Hack; Temp workaround for invalid depth of 24 - //if (mode.DepthBits == 24) - //{ - // mode.DepthBits = 16; - // Debug.WriteLine("Temporary workaround applied: depth changed to 16."); - //} + // Hack; Temp workaround for invalid depth of 24 + //if (mode.DepthBits == 24) + //{ + // mode.DepthBits = 16; + // Debug.WriteLine("Temporary workaround applied: depth changed to 16."); + //} List visualAttributes = new List(); visualAttributes.Add((int)Glx.Enums.GLXAttribute.RGBA); @@ -206,9 +204,9 @@ namespace OpenTK.Platform.X11 visualAttributes.Add((int)Glx.Enums.GLXAttribute.BLUE_SIZE); visualAttributes.Add((int)mode.Color.Blue); visualAttributes.Add((int)Glx.Enums.GLXAttribute.ALPHA_SIZE); - visualAttributes.Add((int)mode.Color.Alpha); + visualAttributes.Add((int)mode.Color.Alpha); visualAttributes.Add((int)Glx.Enums.GLXAttribute.DEPTH_SIZE); - //visualAttributes.Add((int)mode.DepthBits); + //visualAttributes.Add((int)mode.DepthBits); visualAttributes.Add(1); visualAttributes.Add((int)Glx.Enums.GLXAttribute.DOUBLEBUFFER); visualAttributes.Add((int)Glx.Enums.GLXAttribute.NONE); @@ -218,7 +216,7 @@ namespace OpenTK.Platform.X11 { throw new ApplicationException("Requested mode not available."); } - windowInfo.VisualInfo = (VisualInfo)Marshal.PtrToStructure(visual, typeof(VisualInfo)); + windowInfo.VisualInfo = (VisualInfo)Marshal.PtrToStructure(visual, typeof(VisualInfo)); Debug.Print("Got visual: {0}", windowInfo.VisualInfo.ToString()); Debug.Unindent(); @@ -227,24 +225,18 @@ namespace OpenTK.Platform.X11 } #endregion - + [Obsolete] internal IntPtr XVisual { get { return this.visual; } } - + internal VisualInfo XVisualInfo { get { return windowInfo.VisualInfo; } } - - [Obsolete] - internal IntPtr XColormap - { - get { return colormap; } - } - + [Obsolete] internal IntPtr Handle { diff --git a/Source/OpenTK/Platform/X11/X11Input.cs b/Source/OpenTK/Platform/X11/X11Input.cs index 2d90dbde..b88a8bdf 100644 --- a/Source/OpenTK/Platform/X11/X11Input.cs +++ b/Source/OpenTK/Platform/X11/X11Input.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/X11/X11Keyboard.cs b/Source/OpenTK/Platform/X11/X11Keyboard.cs index ec8214b1..dc551bfa 100644 --- a/Source/OpenTK/Platform/X11/X11Keyboard.cs +++ b/Source/OpenTK/Platform/X11/X11Keyboard.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text; diff --git a/Source/OpenTK/Platform/X11/X11Mouse.cs b/Source/OpenTK/Platform/X11/X11Mouse.cs index 4a777f80..684f5ff5 100644 --- a/Source/OpenTK/Platform/X11/X11Mouse.cs +++ b/Source/OpenTK/Platform/X11/X11Mouse.cs @@ -1,4 +1,10 @@ -using System; +#region --- License --- +/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos + * See license.txt for license info + */ +#endregion + +using System; using System.Collections.Generic; using System.Text;