Updated Build.exe to correctly generate sharpdev and sharpdev2 projects.
Removed some unused variables. Added licensing information.
This commit is contained in:
parent
9cd1ca9a67
commit
7a2da17f5c
50 changed files with 338 additions and 167 deletions
BIN
Build/Build.exe
BIN
Build/Build.exe
Binary file not shown.
|
@ -4,7 +4,7 @@ How to build OpenTK:
|
|||
2) Navigate to the Build folder and execute Build.exe:
|
||||
2a) Under Linux/Mac OS X, type 'mono Build.exe mono' or 'mono Build.exe mono debug' for the release/debug versions of the library.
|
||||
2b) Under Windows type 'build net' (or 'build net debug').
|
||||
3) The binaries (library, examples) are placed in the Binaries/Release folder.
|
||||
3) The binaries (library, examples) are placed in the Binaries/Release or Binaries/Debug folder.
|
||||
|
||||
|
||||
There are other parameters you can pass to Build.exe. A brief list:
|
||||
|
@ -15,7 +15,6 @@ debug - build the debug version (e.g. 'build net debug').
|
|||
|
||||
clean - delete intermediate object files and projects (reclaim some space, the binaries are not touched).
|
||||
distclean - delete intermediate and final object files (reclaim all space used during compilation).
|
||||
svnclean - delete '.svn' folders. Useful if you checked out from svn, useless if you downloaded a file release.
|
||||
|
||||
vs2005 - create project files for Visual Studio 2005.
|
||||
monodev - create project files for MonoDevelop.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 Bind.Structures;
|
||||
|
|
|
@ -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 Bind.Structures;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,29 +1,8 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2006 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
#endregion License
|
||||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -108,8 +108,6 @@ namespace Bind.Structures
|
|||
|
||||
#region public bool NeedsWrapper
|
||||
|
||||
bool _needs_wrapper;
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<string, string> 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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
|||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
|||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ---
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
/// <summary>
|
||||
|
@ -246,7 +244,7 @@ namespace OpenTK
|
|||
|
||||
#region --- IResizable Members ---
|
||||
|
||||
public new event ResizeEvent Resize;
|
||||
//public new event ResizeEvent Resize;
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -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
|
|||
/// </summary>
|
||||
HID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<IMouse> Mice { get; }
|
||||
//IEnumerable<IHid> Hids { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
#endregion
|
||||
|
||||
|
||||
#region --- Using Directives ---
|
||||
|
||||
using System;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
|||
/// </summary>
|
||||
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;
|
||||
|
|
|
@ -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<int> visualAttributes = new List<int>();
|
||||
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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue