Updated Build.exe to correctly generate sharpdev and sharpdev2 projects.

Removed some unused variables.
Added licensing information.
This commit is contained in:
the_fiddler 2007-08-10 09:27:13 +00:00
parent 9cd1ca9a67
commit 7a2da17f5c
50 changed files with 338 additions and 167 deletions

Binary file not shown.

View file

@ -4,7 +4,7 @@ How to build OpenTK:
2) Navigate to the Build folder and execute Build.exe: 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. 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'). 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: 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). 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). 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. vs2005 - create project files for Visual Studio 2005.
monodev - create project files for MonoDevelop. monodev - create project files for MonoDevelop.

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using Bind.Structures; using Bind.Structures;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using Bind.Structures; using Bind.Structures;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;

View file

@ -1,29 +1,8 @@
#region License #region --- License ---
/* /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
MIT License * See license.txt for license info
Copyright ©2003-2006 Tao Framework Team */
http://www.taoframework.com #endregion
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
using System; using System;
using System.Text; using System.Text;

View file

@ -1,6 +1,7 @@
#region License #region --- License ---
//Copyright (c) 2006 Stefanos Apostolopoulos /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
//See license.txt for license info * See license.txt for license info
*/
#endregion #endregion
using System; using System;

View file

@ -1,6 +1,7 @@
#region License #region --- License ---
//Copyright (c) 2006 Stefanos Apostolopoulos /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
//See license.txt for license info * See license.txt for license info
*/
#endregion #endregion
using System; using System;

View file

@ -108,8 +108,6 @@ namespace Bind.Structures
#region public bool NeedsWrapper #region public bool NeedsWrapper
bool _needs_wrapper;
/// <summary> /// <summary>
/// Indicates whether this function needs to be wrapped with a Marshaling function. /// 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 /// This flag is set if a function contains an Array parameter, or returns

View file

@ -1,6 +1,7 @@
#region License #region --- License ---
//Copyright (c) 2006 Stefanos Apostolopoulos /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
//See license.txt for license info * See license.txt for license info
*/
#endregion #endregion
using System; using System;

View file

@ -1,6 +1,7 @@
#region License #region --- License ---
//Copyright (c) 2006 Stefanos Apostolopoulos /* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
//See license.txt for license info * See license.txt for license info
*/
#endregion #endregion
using System; using System;
@ -123,30 +124,6 @@ namespace Bind.Structures
#endregion #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() #region override public string ToString()
override public string ToString() override public string ToString()
@ -216,6 +193,8 @@ namespace Bind.Structures
#endregion #endregion
#region internal static Parameter Translate(Parameter par, string Category)
internal static Parameter Translate(Parameter par, string Category) internal static Parameter Translate(Parameter par, string Category)
{ {
Enum @enum; Enum @enum;
@ -296,6 +275,8 @@ namespace Bind.Structures
return p; return p;
} }
#endregion
} }
#endregion #endregion

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;
@ -12,6 +18,8 @@ namespace Bind.Structures
private static bool typesLoaded; private static bool typesLoaded;
#region internal static void Initialize(string glTypes, string csTypes)
internal static void Initialize(string glTypes, string csTypes) internal static void Initialize(string glTypes, string csTypes)
{ {
if (!typesLoaded) if (!typesLoaded)
@ -33,7 +41,11 @@ namespace Bind.Structures
typesLoaded = true; typesLoaded = true;
} }
} }
#endregion
#region --- Constructors ---
public Type() public Type()
{ {
} }
@ -47,6 +59,8 @@ namespace Bind.Structures
this.Pointer = t.Pointer; this.Pointer = t.Pointer;
this.Reference = t.Reference; this.Reference = t.Reference;
} }
#endregion
#region public string Type #region public string Type
@ -217,10 +231,16 @@ namespace Bind.Structures
#endregion #endregion
#region public override string ToString()
public override string ToString() public override string ToString()
{ {
return CurrentType; return CurrentType;
} }
#endregion
#region internal static Type Translate(Type type)
internal static Type Translate(Type type) internal static Type Translate(Type type)
{ {
@ -234,5 +254,7 @@ namespace Bind.Structures
return t; return t;
} }
#endregion
} }
} }

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.IO; using System.IO;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -43,6 +43,7 @@ namespace OpenTK.Build
Mono, Mono,
VS2005, VS2005,
SharpDevelop, SharpDevelop,
SharpDevelop2,
MonoDevelop, MonoDevelop,
Clean, Clean,
DistClean, DistClean,
@ -108,6 +109,12 @@ namespace OpenTK.Build
target = BuildTarget.MonoDevelop; target = BuildTarget.MonoDevelop;
break; break;
case "sharpdev2":
case "sharpdevelop2":
case "sd2":
target = BuildTarget.SharpDevelop2;
break;
case "sharpdev": case "sharpdev":
case "sharpdevelop": case "sharpdevelop":
case "sd": case "sd":
@ -177,7 +184,12 @@ namespace OpenTK.Build
case BuildTarget.SharpDevelop: case BuildTarget.SharpDevelop:
Console.WriteLine("Creating SharpDevelop project files"); 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; break;
case BuildTarget.VS2005: case BuildTarget.VS2005:

View file

@ -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.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -139,4 +145,4 @@ namespace Examples
} }
} }
} }
} }

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -1,3 +1,9 @@
#region --- License ---
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
* See license.txt for license info
*/
#endregion
#region --- Using Directives --- #region --- Using Directives ---
using System; using System;
@ -261,4 +267,4 @@ namespace Examples.Windowing
*/ */
} }
} }
} }

View file

@ -1,3 +1,9 @@
#region --- License ---
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
* See license.txt for license info
*/
#endregion
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@ -29,4 +35,4 @@ namespace Examples.Windowing
} }
} }
} }

View file

@ -1,3 +1,9 @@
#region --- License ---
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
* See license.txt for license info
*/
#endregion
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
@ -8,4 +14,4 @@ namespace QueryDisplayModes
{ {
} }
} }

View file

@ -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.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@ -12,7 +18,7 @@ using System.Runtime.InteropServices;
namespace Examples.Tests namespace Examples.Tests
{ {
public partial class S01_Call_Performance : Form, IExample public partial class S01_Call_Performance : Form /*, IExample*/
{ {
public S01_Call_Performance() public S01_Call_Performance()
{ {
@ -113,4 +119,4 @@ namespace Examples.Tests
#endregion #endregion
} }
} }

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
@ -74,16 +80,5 @@ namespace Examples.Tests
GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT); GL.Clear(GL.Enums.ClearBufferMask.COLOR_BUFFER_BIT);
Context.SwapBuffers(); Context.SwapBuffers();
} }
public override void Run()
{
while (!Quit)
{
ProcessEvents();
OnUpdateFrame(EventArgs.Empty);
OnRenderFrame(EventArgs.Empty);
Thread.Sleep(10);
}
}
} }
} }

View file

@ -19,7 +19,7 @@ using System.Threading;
namespace Examples.Tutorial namespace Examples.Tutorial
{ {
public class T08_VBO : OpenTK.GameWindow, IExample public class T08_VBO : OpenTK.GameWindow /*, IExample */
{ {
#region --- Private Fields --- #region --- Private Fields ---

View file

@ -45,7 +45,6 @@
this.glControl1.Name = "glControl1"; this.glControl1.Name = "glControl1";
this.glControl1.Size = new System.Drawing.Size(629, 565); this.glControl1.Size = new System.Drawing.Size(629, 565);
this.glControl1.TabIndex = 0; 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.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint);
this.glControl1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.glControl1_KeyDown); 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 greenButton;
private System.Windows.Forms.Button blueButton; private System.Windows.Forms.Button blueButton;
} }
} }

View file

@ -23,7 +23,6 @@ namespace Examples.WinForms
{ {
public partial class W01_First_Window : Form, IExample public partial class W01_First_Window : Form, IExample
{ {
OpenTK.InputDriver input;
public W01_First_Window() public W01_First_Window()
{ {
InitializeComponent(); InitializeComponent();
@ -34,8 +33,6 @@ namespace Examples.WinForms
protected override void OnHandleCreated(EventArgs e) protected override void OnHandleCreated(EventArgs e)
{ {
base.OnHandleCreated(e); base.OnHandleCreated(e);
//input = new OpenTK.InputDriver(OpenTK.Platform.Utilities.GetWindowInfo(this));
} }
private void redButton_Click(object sender, EventArgs e) private void redButton_Click(object sender, EventArgs e)
@ -89,4 +86,4 @@ namespace Examples.WinForms
#endregion #endregion
} }
} }

View file

@ -64,7 +64,7 @@ namespace OpenTK
Environment.OSVersion.Platform == (PlatformID)128) Environment.OSVersion.Platform == (PlatformID)128)
// some older versions of Mono reported 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 else
{ {
@ -147,8 +147,6 @@ namespace OpenTK
#region --- IGLControl Members --- #region --- IGLControl Members ---
public event CreateEvent Create;
#region public bool IsIdle #region public bool IsIdle
/// <summary> /// <summary>
@ -246,7 +244,7 @@ namespace OpenTK
#region --- IResizable Members --- #region --- IResizable Members ---
public new event ResizeEvent Resize; //public new event ResizeEvent Resize;
#endregion #endregion

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
@ -30,4 +36,4 @@ namespace OpenTK.Input
/// </summary> /// </summary>
HID HID
} }
} }

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
@ -11,4 +17,4 @@ namespace OpenTK.Input
//IEnumerable<IMouse> Mice { get; } //IEnumerable<IMouse> Mice { get; }
//IEnumerable<IHid> Hids { get; } //IEnumerable<IHid> Hids { get; }
} }
} }

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -4,7 +4,6 @@
*/ */
#endregion #endregion
#region --- Using Directives --- #region --- Using Directives ---
using System; using System;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
namespace OpenTK.Platform namespace OpenTK.Platform
{ {
interface IGameWindow : INativeGLWindow interface IGameWindow : INativeGLWindow

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;
@ -10,20 +16,20 @@ namespace OpenTK.Platform.X11
/// </summary> /// </summary>
internal class WindowInfo : IWindowInfo internal class WindowInfo : IWindowInfo
{ {
internal WindowInfo() internal WindowInfo()
{ {
visinfo = new VisualInfo(); visinfo = new VisualInfo();
} }
internal WindowInfo(WindowInfo parent) internal WindowInfo(WindowInfo parent)
{ {
this.Handle = parent.Handle; this.Handle = parent.Handle;
this.TopLevelWindow = parent.TopLevelWindow; this.TopLevelWindow = parent.TopLevelWindow;
this.Screen = parent.Screen; this.Screen = parent.Screen;
this.Display = parent.Display; this.Display = parent.Display;
this.RootWindow = parent.RootWindow; this.RootWindow = parent.RootWindow;
this.VisualInfo = parent.VisualInfo; this.VisualInfo = parent.VisualInfo;
this.Parent = parent; this.Parent = parent;
} }
private IntPtr rootWindow, handle, topLevelWindow, display; private IntPtr rootWindow, handle, topLevelWindow, display;

View file

@ -23,7 +23,6 @@ namespace OpenTK.Platform.X11
private DisplayMode mode;// = new DisplayMode(); private DisplayMode mode;// = new DisplayMode();
internal WindowInfo windowInfo; internal WindowInfo windowInfo;
private VisualInfo visualInfo;
//private IntPtr desktopResolution = IntPtr.Zero; //private IntPtr desktopResolution = IntPtr.Zero;
@ -31,8 +30,7 @@ namespace OpenTK.Platform.X11
//private int stencilBits; //private int stencilBits;
// These have to be used by the X11GLControl. // These have to be used by the X11GLControl.
internal IntPtr visual; private IntPtr visual;
internal IntPtr colormap;
private bool disposed; private bool disposed;
@ -72,7 +70,7 @@ namespace OpenTK.Platform.X11
"Making context {0} current on thread {1} (Display: {2}, Screen: {3}, Window: {4})... ", "Making context {0} current on thread {1} (Display: {2}, Screen: {3}, Window: {4})... ",
x11context, x11context,
System.Threading.Thread.CurrentThread.ManagedThreadId, System.Threading.Thread.CurrentThread.ManagedThreadId,
windowInfo.Display, windowInfo.Display,
windowInfo.Screen, windowInfo.Screen,
windowInfo.Handle windowInfo.Handle
) )
@ -168,15 +166,15 @@ namespace OpenTK.Platform.X11
visual, visual,
shareHandle, shareHandle,
direct direct
); );
if (x11context != IntPtr.Zero) if (x11context != IntPtr.Zero)
{ {
Debug.WriteLine(String.Format("New opengl context created. (id: {0})", x11context)); Debug.WriteLine(String.Format("New opengl context created. (id: {0})", x11context));
Debug.Unindent(); Debug.Unindent();
} }
else else
{ {
throw new ApplicationException("Could not create opengl context."); throw new ApplicationException("Could not create opengl context.");
} }
} }
@ -188,14 +186,14 @@ namespace OpenTK.Platform.X11
{ {
Debug.WriteLine("Creating visual."); Debug.WriteLine("Creating visual.");
Debug.Indent(); Debug.Indent();
Debug.Print("Requesting DisplayMode: {0}. ", mode.ToString()); Debug.Print("Requesting DisplayMode: {0}. ", mode.ToString());
// Hack; Temp workaround for invalid depth of 24 // Hack; Temp workaround for invalid depth of 24
//if (mode.DepthBits == 24) //if (mode.DepthBits == 24)
//{ //{
// mode.DepthBits = 16; // mode.DepthBits = 16;
// Debug.WriteLine("Temporary workaround applied: depth changed to 16."); // Debug.WriteLine("Temporary workaround applied: depth changed to 16.");
//} //}
List<int> visualAttributes = new List<int>(); List<int> visualAttributes = new List<int>();
visualAttributes.Add((int)Glx.Enums.GLXAttribute.RGBA); 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)Glx.Enums.GLXAttribute.BLUE_SIZE);
visualAttributes.Add((int)mode.Color.Blue); visualAttributes.Add((int)mode.Color.Blue);
visualAttributes.Add((int)Glx.Enums.GLXAttribute.ALPHA_SIZE); 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)Glx.Enums.GLXAttribute.DEPTH_SIZE);
//visualAttributes.Add((int)mode.DepthBits); //visualAttributes.Add((int)mode.DepthBits);
visualAttributes.Add(1); visualAttributes.Add(1);
visualAttributes.Add((int)Glx.Enums.GLXAttribute.DOUBLEBUFFER); visualAttributes.Add((int)Glx.Enums.GLXAttribute.DOUBLEBUFFER);
visualAttributes.Add((int)Glx.Enums.GLXAttribute.NONE); visualAttributes.Add((int)Glx.Enums.GLXAttribute.NONE);
@ -218,7 +216,7 @@ namespace OpenTK.Platform.X11
{ {
throw new ApplicationException("Requested mode not available."); 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.Print("Got visual: {0}", windowInfo.VisualInfo.ToString());
Debug.Unindent(); Debug.Unindent();
@ -227,24 +225,18 @@ namespace OpenTK.Platform.X11
} }
#endregion #endregion
[Obsolete] [Obsolete]
internal IntPtr XVisual internal IntPtr XVisual
{ {
get { return this.visual; } get { return this.visual; }
} }
internal VisualInfo XVisualInfo internal VisualInfo XVisualInfo
{ {
get { return windowInfo.VisualInfo; } get { return windowInfo.VisualInfo; }
} }
[Obsolete]
internal IntPtr XColormap
{
get { return colormap; }
}
[Obsolete] [Obsolete]
internal IntPtr Handle internal IntPtr Handle
{ {

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;

View file

@ -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.Collections.Generic;
using System.Text; using System.Text;