mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 19:35:29 +00:00
Merge pull request #559 from Nihlus/purge-region
Purge region declarations
This commit is contained in:
commit
3cf88759eb
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit Library
|
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit Library
|
||||||
|
@ -24,9 +23,6 @@
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -44,18 +42,12 @@ namespace Bind
|
||||||
IBind Generator { get; set; }
|
IBind Generator { get; set; }
|
||||||
Settings Settings { get { return Generator.Settings; } }
|
Settings Settings { get { return Generator.Settings; } }
|
||||||
|
|
||||||
#region ISpecWriter Members
|
|
||||||
|
|
||||||
public void WriteBindings(IBind generator)
|
public void WriteBindings(IBind generator)
|
||||||
{
|
{
|
||||||
Generator = generator;
|
Generator = generator;
|
||||||
WriteBindings(generator.Delegates, generator.Wrappers, generator.Enums);
|
WriteBindings(generator.Delegates, generator.Wrappers, generator.Enums);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
private static void ConsoleRewrite(string text)
|
private static void ConsoleRewrite(string text)
|
||||||
{
|
{
|
||||||
int left = Console.CursorLeft;
|
int left = Console.CursorLeft;
|
||||||
|
@ -67,8 +59,6 @@ namespace Bind
|
||||||
Console.SetCursorPosition(left, top);
|
Console.SetCursorPosition(left, top);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region WriteBindings
|
|
||||||
|
|
||||||
void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
|
void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Writing bindings to {0}", Settings.OutputPath);
|
Console.WriteLine("Writing bindings to {0}", Settings.OutputPath);
|
||||||
|
@ -143,10 +133,6 @@ namespace Bind
|
||||||
File.Move(temp_wrappers_file, output_wrappers);
|
File.Move(temp_wrappers_file, output_wrappers);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WriteWrappers
|
|
||||||
|
|
||||||
void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers,
|
void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers,
|
||||||
DelegateCollection delegates, EnumCollection enums,
|
DelegateCollection delegates, EnumCollection enums,
|
||||||
IDictionary<string, string> CSTypes)
|
IDictionary<string, string> CSTypes)
|
||||||
|
@ -398,10 +384,6 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WriteTypes
|
|
||||||
|
|
||||||
public void WriteTypes(BindStreamWriter sw, Dictionary<string, string> CSTypes)
|
public void WriteTypes(BindStreamWriter sw, Dictionary<string, string> CSTypes)
|
||||||
{
|
{
|
||||||
sw.WriteLine();
|
sw.WriteLine();
|
||||||
|
@ -411,10 +393,6 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WriteConstants
|
|
||||||
|
|
||||||
void WriteConstants(BindStreamWriter sw, IEnumerable<Constant> constants)
|
void WriteConstants(BindStreamWriter sw, IEnumerable<Constant> constants)
|
||||||
{
|
{
|
||||||
// Make sure everything is sorted. This will avoid random changes between
|
// Make sure everything is sorted. This will avoid random changes between
|
||||||
|
@ -439,10 +417,6 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WriteEnums
|
|
||||||
|
|
||||||
void WriteEnums(BindStreamWriter sw, EnumCollection enums, FunctionCollection wrappers)
|
void WriteEnums(BindStreamWriter sw, EnumCollection enums, FunctionCollection wrappers)
|
||||||
{
|
{
|
||||||
//sw.WriteLine("#pragma warning disable 3019"); // CLSCompliant attribute
|
//sw.WriteLine("#pragma warning disable 3019"); // CLSCompliant attribute
|
||||||
|
@ -548,18 +522,12 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WriteLicense
|
|
||||||
|
|
||||||
public void WriteLicense(BindStreamWriter sw)
|
public void WriteLicense(BindStreamWriter sw)
|
||||||
{
|
{
|
||||||
sw.WriteLine(File.ReadAllText(Path.Combine(Settings.InputPath, Settings.LicenseFile)));
|
sw.WriteLine(File.ReadAllText(Path.Combine(Settings.InputPath, Settings.LicenseFile)));
|
||||||
sw.WriteLine();
|
sw.WriteLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// For example, if parameter foo has indirection level = 1, then it
|
// For example, if parameter foo has indirection level = 1, then it
|
||||||
// is consumed as 'foo*' in the fixed_statements and the call string.
|
// is consumed as 'foo*' in the fixed_statements and the call string.
|
||||||
readonly static string[] pointer_levels = new string[] { "", "*", "**", "***", "****" };
|
readonly static string[] pointer_levels = new string[] { "", "*", "**", "***", "****" };
|
||||||
|
@ -757,7 +725,5 @@ namespace Bind
|
||||||
pointer_levels[type.Pointer],
|
pointer_levels[type.Pointer],
|
||||||
array_levels[type.Array]);
|
array_levels[type.Array]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -87,8 +85,6 @@ namespace Bind
|
||||||
return path.ToString();
|
return path.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
EnumCollection ProcessNames(EnumCollection enums, XPathNavigator nav, string apiname)
|
EnumCollection ProcessNames(EnumCollection enums, XPathNavigator nav, string apiname)
|
||||||
{
|
{
|
||||||
EnumCollection processed_enums = new EnumCollection();
|
EnumCollection processed_enums = new EnumCollection();
|
||||||
|
@ -420,7 +416,5 @@ namespace Bind
|
||||||
}
|
}
|
||||||
return is_number;
|
return is_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit library.
|
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -141,8 +139,6 @@ namespace Bind
|
||||||
return wrappers;
|
return wrappers;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
void GenerateDocumentation(FunctionCollection wrappers,
|
void GenerateDocumentation(FunctionCollection wrappers,
|
||||||
EnumProcessor enum_processor, DocProcessor doc_processor)
|
EnumProcessor enum_processor, DocProcessor doc_processor)
|
||||||
{
|
{
|
||||||
|
@ -1248,7 +1244,5 @@ namespace Bind
|
||||||
func.ReturnType.QualifiedType = "bool";
|
func.ReturnType.QualifiedType = "bool";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// GL2Generator.cs
|
// GL2Generator.cs
|
||||||
//
|
//
|
||||||
|
@ -25,7 +24,6 @@
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -20,8 +18,6 @@ namespace Bind.GL2
|
||||||
{
|
{
|
||||||
abstract class Generator : IBind
|
abstract class Generator : IBind
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
protected string glTypemap = "GL2/gl.tm";
|
protected string glTypemap = "GL2/gl.tm";
|
||||||
protected string csTypemap = "csharp.tm";
|
protected string csTypemap = "csharp.tm";
|
||||||
protected string enumSpec = "GL2/enum.spec";
|
protected string enumSpec = "GL2/enum.spec";
|
||||||
|
@ -56,10 +52,6 @@ namespace Bind.GL2
|
||||||
|
|
||||||
public Settings Settings { get; protected set; }
|
public Settings Settings { get; protected set; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public Generator(Settings settings)
|
public Generator(Settings settings)
|
||||||
{
|
{
|
||||||
if (settings == null)
|
if (settings == null)
|
||||||
|
@ -86,10 +78,6 @@ namespace Bind.GL2
|
||||||
SpecReader = new XmlSpecReader(Settings);
|
SpecReader = new XmlSpecReader(Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
IEnumerable<string> GetFiles(string path)
|
IEnumerable<string> GetFiles(string path)
|
||||||
{
|
{
|
||||||
path = Path.Combine(Settings.InputPath, path);
|
path = Path.Combine(Settings.InputPath, path);
|
||||||
|
@ -107,10 +95,6 @@ namespace Bind.GL2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IBind Members
|
|
||||||
|
|
||||||
public DelegateCollection Delegates { get; private set; }
|
public DelegateCollection Delegates { get; private set; }
|
||||||
public EnumCollection Enums { get; private set; }
|
public EnumCollection Enums { get; private set; }
|
||||||
public FunctionCollection Wrappers { get; private set; }
|
public FunctionCollection Wrappers { get; private set; }
|
||||||
|
@ -146,7 +130,5 @@ namespace Bind.GL2
|
||||||
Wrappers = func_processor.Process(enum_processor, doc_processor,
|
Wrappers = func_processor.Process(enum_processor, doc_processor,
|
||||||
Delegates, Enums, Profile, Version);
|
Delegates, Enums, Profile, Version);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using Bind.Structures;
|
using Bind.Structures;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -19,8 +17,6 @@ namespace Bind.Structures
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class Constant : IComparable<Constant>
|
class Constant : IComparable<Constant>
|
||||||
{
|
{
|
||||||
#region PreviousName
|
|
||||||
|
|
||||||
string original_name;
|
string original_name;
|
||||||
|
|
||||||
// Gets the name prior to translation.
|
// Gets the name prior to translation.
|
||||||
|
@ -30,10 +26,6 @@ namespace Bind.Structures
|
||||||
private set { original_name = value; }
|
private set { original_name = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string Name
|
|
||||||
|
|
||||||
string _name;
|
string _name;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -55,10 +47,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string Value
|
|
||||||
|
|
||||||
string _value;
|
string _value;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -79,10 +67,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string Reference
|
|
||||||
|
|
||||||
string _reference;
|
string _reference;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -98,10 +82,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool Unchecked
|
|
||||||
|
|
||||||
public bool Unchecked
|
public bool Unchecked
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -115,10 +95,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates an empty Constant.
|
/// Creates an empty Constant.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -137,8 +113,6 @@ namespace Bind.Structures
|
||||||
Value = value;
|
Value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Replces the Value of the given constant with the value referenced by the [c.Reference, c.Value] pair.
|
/// Replces the Value of the given constant with the value referenced by the [c.Reference, c.Value] pair.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -192,8 +166,6 @@ namespace Bind.Structures
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region ToString
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
@ -204,10 +176,6 @@ namespace Bind.Structures
|
||||||
Value);
|
Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable <Constant>Members
|
|
||||||
|
|
||||||
public int CompareTo(Constant other)
|
public int CompareTo(Constant other)
|
||||||
{
|
{
|
||||||
int ret = Value.CompareTo(other.Value);
|
int ret = Value.CompareTo(other.Value);
|
||||||
|
@ -215,7 +183,5 @@ namespace Bind.Structures
|
||||||
return Name.CompareTo(other.Name);
|
return Name.CompareTo(other.Name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -33,8 +31,6 @@ namespace Bind.Structures
|
||||||
// The default Regex matches no functions. Create a new Regex in Bind.Generator classes to override the default behavior.
|
// The default Regex matches no functions. Create a new Regex in Bind.Generator classes to override the default behavior.
|
||||||
internal static Regex endingsAddV = new Regex("^0", RegexOptions.Compiled);
|
internal static Regex endingsAddV = new Regex("^0", RegexOptions.Compiled);
|
||||||
|
|
||||||
#region --- Constructors ---
|
|
||||||
|
|
||||||
public Delegate()
|
public Delegate()
|
||||||
{
|
{
|
||||||
Parameters = new ParameterCollection();
|
Parameters = new ParameterCollection();
|
||||||
|
@ -57,12 +53,6 @@ namespace Bind.Structures
|
||||||
Slot = d.Slot;
|
Slot = d.Slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Properties ---
|
|
||||||
|
|
||||||
#region public bool CLSCompliant
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the CLSCompliant property. True if the delegate is not CLSCompliant.
|
/// Gets the CLSCompliant property. True if the delegate is not CLSCompliant.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -92,10 +82,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string Category
|
|
||||||
|
|
||||||
private string _category;
|
private string _category;
|
||||||
|
|
||||||
public string Category
|
public string Category
|
||||||
|
@ -104,10 +90,6 @@ namespace Bind.Structures
|
||||||
set { _category = value; }
|
set { _category = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool NeedsWrapper
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value that indicates whether this function needs to be wrapped with a Marshaling function.
|
/// Gets a value that 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
|
||||||
|
@ -132,10 +114,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public virtual bool Unsafe
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// True if the delegate must be declared as 'unsafe'.
|
/// True if the delegate must be declared as 'unsafe'.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -163,10 +141,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public Parameter ReturnType
|
|
||||||
|
|
||||||
Type _return_type = new Type();
|
Type _return_type = new Type();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the return value of the opengl function.
|
/// Gets or sets the return value of the opengl function.
|
||||||
|
@ -180,10 +154,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public virtual string Name
|
|
||||||
|
|
||||||
string _name;
|
string _name;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the opengl function.
|
/// Gets or sets the name of the opengl function.
|
||||||
|
@ -200,10 +170,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public ParameterCollection Parameters
|
|
||||||
|
|
||||||
ParameterCollection _parameters;
|
ParameterCollection _parameters;
|
||||||
|
|
||||||
public ParameterCollection Parameters
|
public ParameterCollection Parameters
|
||||||
|
@ -212,10 +178,6 @@ namespace Bind.Structures
|
||||||
set { _parameters = value; }
|
set { _parameters = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string Version
|
|
||||||
|
|
||||||
string _version;
|
string _version;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -227,18 +189,12 @@ namespace Bind.Structures
|
||||||
set { _version = value; }
|
set { _version = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool Extension
|
|
||||||
|
|
||||||
public string Extension
|
public string Extension
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public bool Deprecated { get; set; }
|
public bool Deprecated { get; set; }
|
||||||
public string DeprecatedVersion { get; set; }
|
public string DeprecatedVersion { get; set; }
|
||||||
public string EntryPoint { get; set; }
|
public string EntryPoint { get; set; }
|
||||||
|
@ -247,8 +203,6 @@ namespace Bind.Structures
|
||||||
// Slot index in the address table
|
// Slot index in the address table
|
||||||
public int Slot { get; set; }
|
public int Slot { get; set; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// This method should only be used for debugging purposes, not for code generation!
|
// This method should only be used for debugging purposes, not for code generation!
|
||||||
// Returns a string representing the full delegate declaration without decorations.
|
// Returns a string representing the full delegate declaration without decorations.
|
||||||
// (ie "(unsafe) void delegate glXxxYyy(int a, float b, IntPtr c)"
|
// (ie "(unsafe) void delegate glXxxYyy(int a, float b, IntPtr c)"
|
||||||
|
@ -266,8 +220,6 @@ namespace Bind.Structures
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IComparable<Delegate> Members
|
|
||||||
|
|
||||||
public int CompareTo(Delegate other)
|
public int CompareTo(Delegate other)
|
||||||
{
|
{
|
||||||
int ret = Name.CompareTo(other.Name);
|
int ret = Name.CompareTo(other.Name);
|
||||||
|
@ -278,10 +230,6 @@ namespace Bind.Structures
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<Delegate> Members
|
|
||||||
|
|
||||||
public bool Equals(Delegate other)
|
public bool Equals(Delegate other)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
|
@ -289,12 +237,8 @@ namespace Bind.Structures
|
||||||
Parameters.Equals(other.Parameters) &&
|
Parameters.Equals(other.Parameters) &&
|
||||||
ReturnType.Equals(other.ReturnType);
|
ReturnType.Equals(other.ReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region DelegateCollection
|
|
||||||
|
|
||||||
class DelegateCollection : IDictionary<string, List<Delegate>>
|
class DelegateCollection : IDictionary<string, List<Delegate>>
|
||||||
{
|
{
|
||||||
readonly SortedDictionary<string, List<Delegate>> Delegates =
|
readonly SortedDictionary<string, List<Delegate>> Delegates =
|
||||||
|
@ -348,8 +292,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IDictionary Members
|
|
||||||
|
|
||||||
public void Add(string key, List<Delegate> value)
|
public void Add(string key, List<Delegate> value)
|
||||||
{
|
{
|
||||||
Delegates.Add(key, value.ToList());
|
Delegates.Add(key, value.ToList());
|
||||||
|
@ -398,10 +340,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ICollection implementation
|
|
||||||
|
|
||||||
public void Add(KeyValuePair<string, List<Delegate>> item)
|
public void Add(KeyValuePair<string, List<Delegate>> item)
|
||||||
{
|
{
|
||||||
Delegates.Add(item.Key, item.Value.ToList());
|
Delegates.Add(item.Key, item.Value.ToList());
|
||||||
|
@ -443,26 +381,14 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEnumerable implementation
|
|
||||||
|
|
||||||
public IEnumerator<KeyValuePair<string, List<Delegate>>> GetEnumerator()
|
public IEnumerator<KeyValuePair<string, List<Delegate>>> GetEnumerator()
|
||||||
{
|
{
|
||||||
return Delegates.GetEnumerator();
|
return Delegates.GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEnumerable implementation
|
|
||||||
|
|
||||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
return Delegates.GetEnumerator();
|
return Delegates.GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// Documentation.cs
|
// Documentation.cs
|
||||||
//
|
//
|
||||||
// Author:
|
// Author:
|
||||||
|
@ -25,7 +24,6 @@
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -13,8 +11,6 @@ using System.Xml.XPath;
|
||||||
|
|
||||||
namespace Bind.Structures
|
namespace Bind.Structures
|
||||||
{
|
{
|
||||||
#region class Enum
|
|
||||||
|
|
||||||
class Enum
|
class Enum
|
||||||
{
|
{
|
||||||
string _name, _type;
|
string _name, _type;
|
||||||
|
@ -81,10 +77,6 @@ namespace Bind.Structures
|
||||||
public bool CLSCompliant { get; set; }
|
public bool CLSCompliant { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region class EnumCollection
|
|
||||||
|
|
||||||
class EnumCollection : IDictionary<string, Enum>
|
class EnumCollection : IDictionary<string, Enum>
|
||||||
{
|
{
|
||||||
SortedDictionary<string, Enum> Enumerations = new SortedDictionary<string, Enum>();
|
SortedDictionary<string, Enum> Enumerations = new SortedDictionary<string, Enum>();
|
||||||
|
@ -119,8 +111,6 @@ namespace Bind.Structures
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
public void Add(Enum e)
|
public void Add(Enum e)
|
||||||
{
|
{
|
||||||
Add(e.Name, e);
|
Add(e.Name, e);
|
||||||
|
@ -134,10 +124,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDictionary<string, Enum> Members
|
|
||||||
|
|
||||||
public void Add(string key, Enum value)
|
public void Add(string key, Enum value)
|
||||||
{
|
{
|
||||||
if (ContainsKey(key))
|
if (ContainsKey(key))
|
||||||
|
@ -235,9 +221,5 @@ namespace Bind.Structures
|
||||||
{
|
{
|
||||||
return Enumerations.GetEnumerator();
|
return Enumerations.GetEnumerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace Bind.Structures
|
namespace Bind.Structures
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -14,14 +12,8 @@ namespace Bind.Structures
|
||||||
{
|
{
|
||||||
class Function : Delegate, IEquatable<Function>, IComparable<Function>
|
class Function : Delegate, IEquatable<Function>, IComparable<Function>
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
Delegate wrapped_delegate;
|
Delegate wrapped_delegate;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Constructors ---
|
|
||||||
|
|
||||||
public Function(Delegate d)
|
public Function(Delegate d)
|
||||||
: base(d)
|
: base(d)
|
||||||
{
|
{
|
||||||
|
@ -42,20 +34,12 @@ namespace Bind.Structures
|
||||||
Body.AddRange(f.Body);
|
Body.AddRange(f.Body);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public Delegate WrappedDelegate
|
|
||||||
|
|
||||||
public Delegate WrappedDelegate
|
public Delegate WrappedDelegate
|
||||||
{
|
{
|
||||||
get { return wrapped_delegate; }
|
get { return wrapped_delegate; }
|
||||||
set { wrapped_delegate = value; }
|
set { wrapped_delegate = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void TurnVoidPointersToIntPtr()
|
|
||||||
|
|
||||||
public void TurnVoidPointersToIntPtr()
|
public void TurnVoidPointersToIntPtr()
|
||||||
{
|
{
|
||||||
foreach (Parameter p in Parameters)
|
foreach (Parameter p in Parameters)
|
||||||
|
@ -68,10 +52,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public override bool Unsafe
|
|
||||||
|
|
||||||
public override bool Unsafe
|
public override bool Unsafe
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -80,10 +60,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public FunctionBody Body
|
|
||||||
|
|
||||||
FunctionBody _body;
|
FunctionBody _body;
|
||||||
|
|
||||||
public FunctionBody Body
|
public FunctionBody Body
|
||||||
|
@ -92,22 +68,10 @@ namespace Bind.Structures
|
||||||
set { _body = value; }
|
set { _body = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string TrimmedName
|
|
||||||
|
|
||||||
public string TrimmedName { get; set; }
|
public string TrimmedName { get; set; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Documentation
|
|
||||||
|
|
||||||
public Documentation Documentation { get; set; }
|
public Documentation Documentation { get; set; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ToString
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return String.Format("{0} {1}{2}",
|
return String.Format("{0} {1}{2}",
|
||||||
|
@ -116,10 +80,6 @@ namespace Bind.Structures
|
||||||
Parameters);
|
Parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<Function> Members
|
|
||||||
|
|
||||||
public bool Equals(Function other)
|
public bool Equals(Function other)
|
||||||
{
|
{
|
||||||
bool result =
|
bool result =
|
||||||
|
@ -129,10 +89,6 @@ namespace Bind.Structures
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<Function> Members
|
|
||||||
|
|
||||||
public int CompareTo(Function other)
|
public int CompareTo(Function other)
|
||||||
{
|
{
|
||||||
int ret = Name.CompareTo(other.Name);
|
int ret = Name.CompareTo(other.Name);
|
||||||
|
@ -142,12 +98,8 @@ namespace Bind.Structures
|
||||||
ret = ReturnType.CompareTo(other.ReturnType);
|
ret = ReturnType.CompareTo(other.ReturnType);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region class FunctionBody : List<string>
|
|
||||||
|
|
||||||
public class FunctionBody : List<string>
|
public class FunctionBody : List<string>
|
||||||
{
|
{
|
||||||
public FunctionBody()
|
public FunctionBody()
|
||||||
|
@ -208,10 +160,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region class FunctionCollection : SortedDictionary<string, List<Function>>
|
|
||||||
|
|
||||||
class FunctionCollection : SortedDictionary<string, List<Function>>
|
class FunctionCollection : SortedDictionary<string, List<Function>>
|
||||||
{
|
{
|
||||||
Regex unsignedFunctions = new Regex(@".+(u[dfisb]v?)", RegexOptions.Compiled);
|
Regex unsignedFunctions = new Regex(@".+(u[dfisb]v?)", RegexOptions.Compiled);
|
||||||
|
@ -276,6 +224,4 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -19,8 +17,6 @@ namespace Bind.Structures
|
||||||
{
|
{
|
||||||
string cache;
|
string cache;
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a new Parameter without type and name.
|
/// Creates a new Parameter without type and name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -49,10 +45,6 @@ namespace Bind.Structures
|
||||||
//this.rebuild = false;
|
//this.rebuild = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region RawName
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the raw name of the parameter.
|
/// Gets or sets the raw name of the parameter.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -62,10 +54,6 @@ namespace Bind.Structures
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Name
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name of the parameter. If the name matches a keyword of the current language,
|
/// Gets the name of the parameter. If the name matches a keyword of the current language,
|
||||||
/// then it is escaped with <see cref="Settings.KeywordEscapeCharacter"/>.
|
/// then it is escaped with <see cref="Settings.KeywordEscapeCharacter"/>.
|
||||||
|
@ -90,10 +78,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region UnmanagedType
|
|
||||||
|
|
||||||
UnmanagedType _unmanaged_type;
|
UnmanagedType _unmanaged_type;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the parameter.
|
/// Gets or sets the name of the parameter.
|
||||||
|
@ -110,10 +94,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public FlowDirection Flow
|
|
||||||
|
|
||||||
FlowDirection _flow;
|
FlowDirection _flow;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -131,10 +111,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool NeedsPin
|
|
||||||
|
|
||||||
public bool NeedsPin
|
public bool NeedsPin
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -144,10 +120,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool Unchecked
|
|
||||||
|
|
||||||
private bool _unchecked;
|
private bool _unchecked;
|
||||||
|
|
||||||
public bool Unchecked
|
public bool Unchecked
|
||||||
|
@ -162,10 +134,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool Generic
|
|
||||||
|
|
||||||
bool generic;
|
bool generic;
|
||||||
public bool Generic
|
public bool Generic
|
||||||
{
|
{
|
||||||
|
@ -173,10 +141,6 @@ namespace Bind.Structures
|
||||||
set { generic = value; }
|
set { generic = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool DiffersOnlyOnReference
|
|
||||||
|
|
||||||
// Returns true if this parameter differs only on reference compared to another parameter, i.e:
|
// Returns true if this parameter differs only on reference compared to another parameter, i.e:
|
||||||
// returns true for 'int' & 'ref int'
|
// returns true for 'int' & 'ref int'
|
||||||
// returns true for 'ref float' & 'float'
|
// returns true for 'ref float' & 'float'
|
||||||
|
@ -191,10 +155,6 @@ namespace Bind.Structures
|
||||||
other.Reference && !(Reference || Array > 0 || Pointer != 0));
|
other.Reference && !(Reference || Array > 0 || Pointer != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string ComputeSize
|
|
||||||
|
|
||||||
string computeSize;
|
string computeSize;
|
||||||
public string ComputeSize
|
public string ComputeSize
|
||||||
{
|
{
|
||||||
|
@ -202,10 +162,6 @@ namespace Bind.Structures
|
||||||
set { computeSize = value; }
|
set { computeSize = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Static Members
|
|
||||||
|
|
||||||
// Returns the FlowDirection that matches the specified string
|
// Returns the FlowDirection that matches the specified string
|
||||||
// ("out" or "in", otherwise undefined).
|
// ("out" or "in", otherwise undefined).
|
||||||
public static FlowDirection GetFlowDirection(string direction)
|
public static FlowDirection GetFlowDirection(string direction)
|
||||||
|
@ -213,9 +169,6 @@ namespace Bind.Structures
|
||||||
return direction == "out" ? FlowDirection.Out : direction == "in" ? FlowDirection.In : FlowDirection.Undefined;
|
return direction == "out" ? FlowDirection.Out : direction == "in" ? FlowDirection.In : FlowDirection.Undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<Parameter> Members
|
|
||||||
|
|
||||||
public int CompareTo(Parameter other)
|
public int CompareTo(Parameter other)
|
||||||
{
|
{
|
||||||
|
@ -225,10 +178,6 @@ namespace Bind.Structures
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ToString
|
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return String.Format("{2}{0} {1}",
|
return String.Format("{2}{0} {1}",
|
||||||
|
@ -239,10 +188,6 @@ namespace Bind.Structures
|
||||||
String.Empty);
|
String.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<Parameter> Members
|
|
||||||
|
|
||||||
public bool Equals(Parameter other)
|
public bool Equals(Parameter other)
|
||||||
{
|
{
|
||||||
bool result =
|
bool result =
|
||||||
|
@ -251,8 +196,6 @@ namespace Bind.Structures
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -270,8 +213,6 @@ namespace Bind.Structures
|
||||||
public bool Rebuild { get; set; }
|
public bool Rebuild { get; set; }
|
||||||
Settings Settings { get; set; }
|
Settings Settings { get; set; }
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public ParameterCollection()
|
public ParameterCollection()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -290,20 +231,12 @@ namespace Bind.Structures
|
||||||
Add(new Parameter(p));
|
Add(new Parameter(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region BuildCache
|
|
||||||
|
|
||||||
void BuildCache()
|
void BuildCache()
|
||||||
{
|
{
|
||||||
BuildReferenceAndPointerParametersCache();
|
BuildReferenceAndPointerParametersCache();
|
||||||
Rebuild = false;
|
Rebuild = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool HasPointerParameters
|
|
||||||
|
|
||||||
public bool HasPointerParameters
|
public bool HasPointerParameters
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -317,10 +250,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool HasReferenceParameters
|
|
||||||
|
|
||||||
public bool HasReferenceParameters
|
public bool HasReferenceParameters
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -334,10 +263,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool HasUnsignedParameters
|
|
||||||
|
|
||||||
public bool HasUnsignedParameters
|
public bool HasUnsignedParameters
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -351,10 +276,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool HasGenericParameters
|
|
||||||
|
|
||||||
public bool HasGenericParameters
|
public bool HasGenericParameters
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -368,9 +289,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region void BuildReferenceAndPointerParametersCache()
|
|
||||||
|
|
||||||
void BuildReferenceAndPointerParametersCache()
|
void BuildReferenceAndPointerParametersCache()
|
||||||
{
|
{
|
||||||
|
@ -390,10 +308,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ToString
|
|
||||||
|
|
||||||
// Only use for debugging, not for code generation!
|
// Only use for debugging, not for code generation!
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
@ -414,10 +328,6 @@ namespace Bind.Structures
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ContainsType
|
|
||||||
|
|
||||||
public bool ContainsType(string type)
|
public bool ContainsType(string type)
|
||||||
{
|
{
|
||||||
foreach (Parameter p in this)
|
foreach (Parameter p in this)
|
||||||
|
@ -426,10 +336,6 @@ namespace Bind.Structures
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IList<Parameter> Members
|
|
||||||
|
|
||||||
public void Add(Parameter p)
|
public void Add(Parameter p)
|
||||||
{
|
{
|
||||||
Parameters.Add(p);
|
Parameters.Add(p);
|
||||||
|
@ -511,10 +417,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<ParameterCollection> Members
|
|
||||||
|
|
||||||
public int CompareTo(ParameterCollection other)
|
public int CompareTo(ParameterCollection other)
|
||||||
{
|
{
|
||||||
if (Count < other.Count)
|
if (Count < other.Count)
|
||||||
|
@ -537,10 +439,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<ParameterCollection> Members
|
|
||||||
|
|
||||||
public bool Equals(ParameterCollection other)
|
public bool Equals(ParameterCollection other)
|
||||||
{
|
{
|
||||||
if (Count != other.Count)
|
if (Count != other.Count)
|
||||||
|
@ -553,7 +451,5 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -17,8 +15,6 @@ namespace Bind.Structures
|
||||||
string current_qualifier = String.Empty;
|
string current_qualifier = String.Empty;
|
||||||
string previous_qualifier = String.Empty;
|
string previous_qualifier = String.Empty;
|
||||||
|
|
||||||
#region --- Constructors ---
|
|
||||||
|
|
||||||
public Type()
|
public Type()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -39,10 +35,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
string CurrentQualifier
|
string CurrentQualifier
|
||||||
{
|
{
|
||||||
get { return current_qualifier; }
|
get { return current_qualifier; }
|
||||||
|
@ -55,10 +47,6 @@ namespace Bind.Structures
|
||||||
set { previous_qualifier = value; }
|
set { previous_qualifier = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
public string QualifiedType
|
public string QualifiedType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -87,8 +75,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region public string CurrentType
|
|
||||||
|
|
||||||
string type;
|
string type;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the type of the parameter.
|
/// Gets the type of the parameter.
|
||||||
|
@ -117,10 +103,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public string PreviousType
|
|
||||||
|
|
||||||
private string _previous_type;
|
private string _previous_type;
|
||||||
|
|
||||||
public string PreviousType
|
public string PreviousType
|
||||||
|
@ -129,10 +111,6 @@ namespace Bind.Structures
|
||||||
private set { _previous_type = value; }
|
private set { _previous_type = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool Reference
|
|
||||||
|
|
||||||
bool reference;
|
bool reference;
|
||||||
|
|
||||||
public bool Reference
|
public bool Reference
|
||||||
|
@ -141,10 +119,6 @@ namespace Bind.Structures
|
||||||
set { reference = value; }
|
set { reference = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int Array
|
|
||||||
|
|
||||||
int array;
|
int array;
|
||||||
|
|
||||||
public int Array
|
public int Array
|
||||||
|
@ -153,10 +127,6 @@ namespace Bind.Structures
|
||||||
set { array = value > 0 ? value : 0; }
|
set { array = value > 0 ? value : 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int ElementCount
|
|
||||||
|
|
||||||
int element_count;
|
int element_count;
|
||||||
|
|
||||||
// If the type is an array and ElementCount > 0, then ElemenCount defines the expected array length.
|
// If the type is an array and ElementCount > 0, then ElemenCount defines the expected array length.
|
||||||
|
@ -166,10 +136,6 @@ namespace Bind.Structures
|
||||||
set { element_count = value > 0 ? value : 0; }
|
set { element_count = value > 0 ? value : 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int Pointer
|
|
||||||
|
|
||||||
int pointer;
|
int pointer;
|
||||||
|
|
||||||
public int Pointer
|
public int Pointer
|
||||||
|
@ -178,12 +144,9 @@ namespace Bind.Structures
|
||||||
set { pointer = value > 0 ? value : 0; }
|
set { pointer = value > 0 ? value : 0; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
// Set to true if parameter is an enum.
|
// Set to true if parameter is an enum.
|
||||||
public bool IsEnum { get; set; }
|
public bool IsEnum { get; set; }
|
||||||
|
|
||||||
#region public bool CLSCompliant
|
|
||||||
|
|
||||||
public bool CLSCompliant
|
public bool CLSCompliant
|
||||||
{
|
{
|
||||||
|
@ -238,10 +201,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool Unsigned
|
|
||||||
|
|
||||||
public bool Unsigned
|
public bool Unsigned
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -250,10 +209,6 @@ namespace Bind.Structures
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public WrapperTypes WrapperType
|
|
||||||
|
|
||||||
private WrapperTypes _wrapper_type = WrapperTypes.None;
|
private WrapperTypes _wrapper_type = WrapperTypes.None;
|
||||||
|
|
||||||
public WrapperTypes WrapperType
|
public WrapperTypes WrapperType
|
||||||
|
@ -262,10 +217,6 @@ namespace Bind.Structures
|
||||||
set { _wrapper_type = value; }
|
set { _wrapper_type = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public override string ToString()
|
|
||||||
|
|
||||||
static readonly string[] PointerLevels =
|
static readonly string[] PointerLevels =
|
||||||
{
|
{
|
||||||
"",
|
"",
|
||||||
|
@ -292,12 +243,6 @@ namespace Bind.Structures
|
||||||
ArrayLevels[Array]);
|
ArrayLevels[Array]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<Type> Members
|
|
||||||
|
|
||||||
public int CompareTo(Type other)
|
public int CompareTo(Type other)
|
||||||
{
|
{
|
||||||
// Make sure that Pointer parameters are sorted last to avoid bug [#1098].
|
// Make sure that Pointer parameters are sorted last to avoid bug [#1098].
|
||||||
|
@ -322,10 +267,6 @@ namespace Bind.Structures
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<Type> Members
|
|
||||||
|
|
||||||
public bool Equals(Type other)
|
public bool Equals(Type other)
|
||||||
{
|
{
|
||||||
bool result =
|
bool result =
|
||||||
|
@ -341,7 +282,5 @@ namespace Bind.Structures
|
||||||
// redefinition errors in the generated bindings.
|
// redefinition errors in the generated bindings.
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#region --- License ---
|
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
|
||||||
* See license.txt for license info
|
* See license.txt for license info
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -15,8 +13,6 @@ using Enum=Bind.Structures.Enum;
|
||||||
|
|
||||||
namespace Bind
|
namespace Bind
|
||||||
{
|
{
|
||||||
#region WrapperTypes enum
|
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum WrapperTypes
|
public enum WrapperTypes
|
||||||
{
|
{
|
||||||
|
@ -96,8 +92,6 @@ namespace Bind
|
||||||
SizeParameter = 1 << 14,
|
SizeParameter = 1 << 14,
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
static class Utilities
|
static class Utilities
|
||||||
{
|
{
|
||||||
public static readonly char[] Separators = { ' ', '\n', ',', '(', ')', ';', '#' };
|
public static readonly char[] Separators = { ' ', '\n', ',', '(', ')', ';', '#' };
|
||||||
|
@ -149,8 +143,6 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region internal StreamReader OpenSpecFile(string file)
|
|
||||||
|
|
||||||
internal static StreamReader OpenSpecFile(string folder, string file)
|
internal static StreamReader OpenSpecFile(string folder, string file)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrEmpty(folder) || String.IsNullOrEmpty(file))
|
if (String.IsNullOrEmpty(folder) || String.IsNullOrEmpty(file))
|
||||||
|
@ -163,10 +155,6 @@ namespace Bind
|
||||||
return new StreamReader(path);
|
return new StreamReader(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Keywords
|
|
||||||
|
|
||||||
public static readonly List<string> CSharpKeywords = new List<string>(
|
public static readonly List<string> CSharpKeywords = new List<string>(
|
||||||
new string[]
|
new string[]
|
||||||
{
|
{
|
||||||
|
@ -193,10 +181,6 @@ namespace Bind
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Merge
|
|
||||||
|
|
||||||
// Merges the specified enum collections.
|
// Merges the specified enum collections.
|
||||||
internal static void Merge(EnumCollection enums, EnumCollection new_enums)
|
internal static void Merge(EnumCollection enums, EnumCollection new_enums)
|
||||||
{
|
{
|
||||||
|
@ -256,10 +240,6 @@ namespace Bind
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region internal static string GetGL2Extension(string name)
|
|
||||||
|
|
||||||
internal static string GetGL2Extension(string name)
|
internal static string GetGL2Extension(string name)
|
||||||
{
|
{
|
||||||
return GetExtension(name, false);
|
return GetExtension(name, false);
|
||||||
|
@ -286,26 +266,16 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region private static bool IsGL2Extension(string function)
|
|
||||||
|
|
||||||
private static bool IsGL2Extension(string function)
|
private static bool IsGL2Extension(string function)
|
||||||
{
|
{
|
||||||
return !String.IsNullOrEmpty(GetGL2Extension(function));
|
return !String.IsNullOrEmpty(GetGL2Extension(function));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region internal static string StripGL2Extension(string p)
|
|
||||||
|
|
||||||
internal static string StripGL2Extension(string p)
|
internal static string StripGL2Extension(string p)
|
||||||
{
|
{
|
||||||
return p.Substring(0, p.Length - GetGL2Extension(p).Length);
|
return p.Substring(0, p.Length - GetGL2Extension(p).Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public static bool RequiresSlot(this Delegate d, Settings settings)
|
public static bool RequiresSlot(this Delegate d, Settings settings)
|
||||||
{
|
{
|
||||||
double version;
|
double version;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit library.
|
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -43,8 +41,6 @@ namespace Bind
|
||||||
{
|
{
|
||||||
Settings Settings { get; set; }
|
Settings Settings { get; set; }
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public XmlSpecReader(Settings settings)
|
public XmlSpecReader(Settings settings)
|
||||||
{
|
{
|
||||||
if (settings == null)
|
if (settings == null)
|
||||||
|
@ -52,10 +48,6 @@ namespace Bind
|
||||||
Settings = settings;
|
Settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ISpecReader Members
|
|
||||||
|
|
||||||
public void ReadDelegates(string file, DelegateCollection delegates, string apiname, string apiversions)
|
public void ReadDelegates(string file, DelegateCollection delegates, string apiname, string apiversions)
|
||||||
{
|
{
|
||||||
var specs = new XPathDocument(file);
|
var specs = new XPathDocument(file);
|
||||||
|
@ -214,10 +206,6 @@ namespace Bind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
static void GetSignaturePaths(string apiname, string apiversion, out string xpath_add, out string xpath_delete)
|
static void GetSignaturePaths(string apiname, string apiversion, out string xpath_add, out string xpath_delete)
|
||||||
{
|
{
|
||||||
xpath_add = "/signatures/add";
|
xpath_add = "/signatures/add";
|
||||||
|
@ -466,7 +454,5 @@ restart:
|
||||||
Utilities.Merge(enums, all);
|
Utilities.Merge(enums, all);
|
||||||
return enums;
|
return enums;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -159,13 +159,10 @@ namespace Mono.Options
|
||||||
this.c = c;
|
this.c = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region ICollection
|
|
||||||
void ICollection.CopyTo (Array array, int index) {(values as ICollection).CopyTo (array, index);}
|
void ICollection.CopyTo (Array array, int index) {(values as ICollection).CopyTo (array, index);}
|
||||||
bool ICollection.IsSynchronized {get {return (values as ICollection).IsSynchronized;}}
|
bool ICollection.IsSynchronized {get {return (values as ICollection).IsSynchronized;}}
|
||||||
object ICollection.SyncRoot {get {return (values as ICollection).SyncRoot;}}
|
object ICollection.SyncRoot {get {return (values as ICollection).SyncRoot;}}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region ICollection<T>
|
|
||||||
public void Add (string item) {values.Add (item);}
|
public void Add (string item) {values.Add (item);}
|
||||||
public void Clear () {values.Clear ();}
|
public void Clear () {values.Clear ();}
|
||||||
public bool Contains (string item) {return values.Contains (item);}
|
public bool Contains (string item) {return values.Contains (item);}
|
||||||
|
@ -173,17 +170,11 @@ namespace Mono.Options
|
||||||
public bool Remove (string item) {return values.Remove (item);}
|
public bool Remove (string item) {return values.Remove (item);}
|
||||||
public int Count {get {return values.Count;}}
|
public int Count {get {return values.Count;}}
|
||||||
public bool IsReadOnly {get {return false;}}
|
public bool IsReadOnly {get {return false;}}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEnumerable
|
|
||||||
IEnumerator IEnumerable.GetEnumerator () {return values.GetEnumerator ();}
|
IEnumerator IEnumerable.GetEnumerator () {return values.GetEnumerator ();}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEnumerable<T>
|
|
||||||
public IEnumerator<string> GetEnumerator () {return values.GetEnumerator ();}
|
public IEnumerator<string> GetEnumerator () {return values.GetEnumerator ();}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IList
|
|
||||||
int IList.Add (object value) {return (values as IList).Add (value);}
|
int IList.Add (object value) {return (values as IList).Add (value);}
|
||||||
bool IList.Contains (object value) {return (values as IList).Contains (value);}
|
bool IList.Contains (object value) {return (values as IList).Contains (value);}
|
||||||
int IList.IndexOf (object value) {return (values as IList).IndexOf (value);}
|
int IList.IndexOf (object value) {return (values as IList).IndexOf (value);}
|
||||||
|
@ -192,9 +183,7 @@ namespace Mono.Options
|
||||||
void IList.RemoveAt (int index) {(values as IList).RemoveAt (index);}
|
void IList.RemoveAt (int index) {(values as IList).RemoveAt (index);}
|
||||||
bool IList.IsFixedSize {get {return false;}}
|
bool IList.IsFixedSize {get {return false;}}
|
||||||
object IList.this [int index] {get {return this [index];} set {(values as IList)[index] = value;}}
|
object IList.this [int index] {get {return this [index];} set {(values as IList)[index] = value;}}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IList<T>
|
|
||||||
public int IndexOf (string item) {return values.IndexOf (item);}
|
public int IndexOf (string item) {return values.IndexOf (item);}
|
||||||
public void Insert (int index, string item) {values.Insert (index, item);}
|
public void Insert (int index, string item) {values.Insert (index, item);}
|
||||||
public void RemoveAt (int index) {values.RemoveAt (index);}
|
public void RemoveAt (int index) {values.RemoveAt (index);}
|
||||||
|
@ -221,7 +210,6 @@ namespace Mono.Options
|
||||||
values [index] = value;
|
values [index] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
public List<string> ToList ()
|
public List<string> ToList ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
// Created by Erik Ylvisaker on 3/17/08.
|
// Created by Erik Ylvisaker on 3/17/08.
|
||||||
|
|
||||||
|
@ -344,7 +342,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
/*
|
/*
|
||||||
** Current state functions
|
** Current state functions
|
||||||
*/
|
*/
|
||||||
#region --- aglSetCurrentContext ---
|
|
||||||
|
|
||||||
[DllImport(agl,EntryPoint="aglSetCurrentContext")] static extern byte _aglSetCurrentContext(AGLContext ctx);
|
[DllImport(agl,EntryPoint="aglSetCurrentContext")] static extern byte _aglSetCurrentContext(AGLContext ctx);
|
||||||
internal static bool aglSetCurrentContext(IntPtr context)
|
internal static bool aglSetCurrentContext(IntPtr context)
|
||||||
|
@ -357,8 +354,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
[DllImport(agl)] internal static extern AGLContext aglGetCurrentContext();
|
[DllImport(agl)] internal static extern AGLContext aglGetCurrentContext();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
// Created by Erik Ylvisaker on 3/17/08.
|
// Created by Erik Ylvisaker on 3/17/08.
|
||||||
|
|
||||||
|
@ -201,8 +199,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
function, err, Agl.ErrorString(err)));
|
function, err, Agl.ErrorString(err)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IGraphicsContext Members
|
|
||||||
|
|
||||||
bool firstSwap = true;
|
bool firstSwap = true;
|
||||||
public void SwapBuffers()
|
public void SwapBuffers()
|
||||||
{
|
{
|
||||||
|
@ -311,10 +307,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
~AglContext()
|
~AglContext()
|
||||||
{
|
{
|
||||||
Dispose(false);
|
Dispose(false);
|
||||||
|
@ -363,10 +355,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
disposed = true;
|
disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IGraphicsContextInternal Members
|
|
||||||
|
|
||||||
public IntPtr GetAddress(string function)
|
public IntPtr GetAddress(string function)
|
||||||
{
|
{
|
||||||
return NS.GetAddress(function);
|
return NS.GetAddress(function);
|
||||||
|
@ -392,7 +380,5 @@ namespace OpenTK.Platform.MacOS
|
||||||
return Handle;
|
return Handle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -58,8 +56,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
return GetGraphicsModeFromPixelFormat(pixelformat);
|
return GetGraphicsModeFromPixelFormat(pixelformat);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Internal Members
|
|
||||||
|
|
||||||
static bool RelaxGraphicsMode(ref ColorFormat color, ref int depth, ref int stencil, ref int samples, ref ColorFormat accum, ref int buffers, ref bool stereo)
|
static bool RelaxGraphicsMode(ref ColorFormat color, ref int depth, ref int stencil, ref int samples, ref ColorFormat accum, ref int buffers, ref bool stereo)
|
||||||
{
|
{
|
||||||
// Parameters are relaxed in order of importance.
|
// Parameters are relaxed in order of importance.
|
||||||
|
@ -224,7 +220,5 @@ namespace OpenTK.Platform.MacOS
|
||||||
IntPtr pixelformat = Agl.aglChoosePixelFormat(IntPtr.Zero, 0, attribs.ToArray());
|
IntPtr pixelformat = Agl.aglChoosePixelFormat(IntPtr.Zero, 0, attribs.ToArray());
|
||||||
return pixelformat;
|
return pixelformat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -67,8 +65,6 @@ namespace OpenTK
|
||||||
return control.Location.Y;
|
return control.Location.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IGLControl Members
|
|
||||||
|
|
||||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
// AGL does not support OpenGL profiles
|
// AGL does not support OpenGL profiles
|
||||||
|
@ -93,7 +89,5 @@ namespace OpenTK
|
||||||
return window_info;
|
return window_info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
@ -33,8 +31,6 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
class DummyGLControl : IGLControl
|
class DummyGLControl : IGLControl
|
||||||
{
|
{
|
||||||
#region IGLControl Members
|
|
||||||
|
|
||||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
return new DummyContext();
|
return new DummyContext();
|
||||||
|
@ -50,10 +46,6 @@ namespace OpenTK
|
||||||
get { return Utilities.CreateDummyWindowInfo(); }
|
get { return Utilities.CreateDummyWindowInfo(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region class DummyContext
|
|
||||||
|
|
||||||
class DummyContext : IGraphicsContext, IGraphicsContextInternal
|
class DummyContext : IGraphicsContext, IGraphicsContextInternal
|
||||||
{
|
{
|
||||||
static int instance_count;
|
static int instance_count;
|
||||||
|
@ -65,8 +57,6 @@ namespace OpenTK
|
||||||
bool is_disposed;
|
bool is_disposed;
|
||||||
int swap_interval;
|
int swap_interval;
|
||||||
|
|
||||||
#region IGraphicsContext Members
|
|
||||||
|
|
||||||
public void SwapBuffers()
|
public void SwapBuffers()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -139,10 +129,6 @@ namespace OpenTK
|
||||||
is_disposed = true;
|
is_disposed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IGraphicsContextInternal
|
|
||||||
|
|
||||||
public ContextHandle Context
|
public ContextHandle Context
|
||||||
{
|
{
|
||||||
get { return handle; }
|
get { return handle; }
|
||||||
|
@ -162,10 +148,6 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
get { return this; }
|
get { return this; }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
src/OpenTK.GLControl/GLControl.Designer.cs
generated
4
src/OpenTK.GLControl/GLControl.Designer.cs
generated
|
@ -20,8 +20,6 @@
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Component Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
|
@ -39,7 +37,5 @@
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -64,8 +62,6 @@ namespace OpenTK
|
||||||
// evaluate this in the constructor.
|
// evaluate this in the constructor.
|
||||||
readonly bool design_mode;
|
readonly bool design_mode;
|
||||||
|
|
||||||
#region --- Constructors ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance.
|
/// Constructs a new instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -125,10 +121,6 @@ namespace OpenTK
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Private Methods ---
|
|
||||||
|
|
||||||
IGLControl Implementation
|
IGLControl Implementation
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -160,10 +152,6 @@ namespace OpenTK
|
||||||
RecreateHandle();
|
RecreateHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Protected Methods ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <c>CreateParams</c> instance for this <c>GLControl</c>
|
/// Gets the <c>CreateParams</c> instance for this <c>GLControl</c>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -309,12 +297,6 @@ namespace OpenTK
|
||||||
base.OnParentChanged(e);
|
base.OnParentChanged(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Public Methods ---
|
|
||||||
|
|
||||||
#region public void SwapBuffers()
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swaps the front and back buffers, presenting the rendered scene to the screen.
|
/// Swaps the front and back buffers, presenting the rendered scene to the screen.
|
||||||
/// This method will have no effect on a single-buffered <c>GraphicsMode</c>.
|
/// This method will have no effect on a single-buffered <c>GraphicsMode</c>.
|
||||||
|
@ -325,10 +307,6 @@ namespace OpenTK
|
||||||
Context.SwapBuffers();
|
Context.SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void MakeCurrent()
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>
|
/// <para>
|
||||||
/// Makes <see cref="GLControl.Context"/> current in the calling thread.
|
/// Makes <see cref="GLControl.Context"/> current in the calling thread.
|
||||||
|
@ -350,10 +328,6 @@ namespace OpenTK
|
||||||
Context.MakeCurrent(Implementation.WindowInfo);
|
Context.MakeCurrent(Implementation.WindowInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool IsIdle
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether the current thread contains pending system messages.
|
/// Gets a value indicating whether the current thread contains pending system messages.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -367,10 +341,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public IGraphicsContext Context
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <c>IGraphicsContext</c> instance that is associated with the <c>GLControl</c>.
|
/// Gets the <c>IGraphicsContext</c> instance that is associated with the <c>GLControl</c>.
|
||||||
/// The associated <c>IGraphicsContext</c> is updated whenever the <c>GLControl</c>
|
/// The associated <c>IGraphicsContext</c> is updated whenever the <c>GLControl</c>
|
||||||
|
@ -390,10 +360,6 @@ namespace OpenTK
|
||||||
private set { context = value; }
|
private set { context = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public float AspectRatio
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the aspect ratio of this GLControl.
|
/// Gets the aspect ratio of this GLControl.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -407,10 +373,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool VSync
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether vsync is active for this <c>GLControl</c>.
|
/// Gets or sets a value indicating whether vsync is active for this <c>GLControl</c>.
|
||||||
/// When using multiple <c>GLControl</c>s, ensure that <see cref="Context"/>
|
/// When using multiple <c>GLControl</c>s, ensure that <see cref="Context"/>
|
||||||
|
@ -451,10 +413,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GraphicsMode GraphicsMode
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <c>GraphicsMode</c> of the <c>IGraphicsContext</c> associated with
|
/// Gets the <c>GraphicsMode</c> of the <c>IGraphicsContext</c> associated with
|
||||||
/// this <c>GLControl</c>. If you wish to change <c>GraphicsMode</c>, you must
|
/// this <c>GLControl</c>. If you wish to change <c>GraphicsMode</c>, you must
|
||||||
|
@ -469,10 +427,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WindowInfo
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="OpenTK.Platform.IWindowInfo"/> for this instance.
|
/// Gets the <see cref="OpenTK.Platform.IWindowInfo"/> for this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -480,9 +434,5 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
get { return implementation.WindowInfo; }
|
get { return implementation.WindowInfo; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// NS.cs
|
// NS.cs
|
||||||
//
|
//
|
||||||
|
@ -26,8 +25,6 @@
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
//
|
//
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos
|
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -37,10 +35,6 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
class WinGLControl : IGLControl
|
class WinGLControl : IGLControl
|
||||||
{
|
{
|
||||||
#region P/Invoke declarations
|
|
||||||
|
|
||||||
#region Message
|
|
||||||
|
|
||||||
struct MSG
|
struct MSG
|
||||||
{
|
{
|
||||||
public IntPtr HWnd;
|
public IntPtr HWnd;
|
||||||
|
@ -57,10 +51,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Point
|
|
||||||
|
|
||||||
struct POINT
|
struct POINT
|
||||||
{
|
{
|
||||||
public int X;
|
public int X;
|
||||||
|
@ -83,32 +73,14 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region PeekMessage
|
|
||||||
|
|
||||||
[System.Security.SuppressUnmanagedCodeSecurity]
|
[System.Security.SuppressUnmanagedCodeSecurity]
|
||||||
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
||||||
static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags);
|
static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
MSG msg = new MSG();
|
MSG msg = new MSG();
|
||||||
IWindowInfo window_info;
|
IWindowInfo window_info;
|
||||||
GraphicsMode mode;
|
GraphicsMode mode;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public WinGLControl(GraphicsMode mode, Control control)
|
public WinGLControl(GraphicsMode mode, Control control)
|
||||||
{
|
{
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
@ -116,10 +88,6 @@ namespace OpenTK
|
||||||
window_info = Utilities.CreateWindowsWindowInfo(control.Handle);
|
window_info = Utilities.CreateWindowsWindowInfo(control.Handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IGLControl Members
|
|
||||||
|
|
||||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
return new GraphicsContext(mode, window_info, major, minor, flags);
|
return new GraphicsContext(mode, window_info, major, minor, flags);
|
||||||
|
@ -138,7 +106,5 @@ namespace OpenTK
|
||||||
return window_info;
|
return window_info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
#region --- License ---
|
/* Licensed under the MIT/X11 license.
|
||||||
/* Licensed under the MIT/X11 license.
|
|
||||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||||
* This notice may not be removed from any source distribution.
|
* This notice may not be removed from any source distribution.
|
||||||
* See license.txt for licensing detailed licensing details.
|
* See license.txt for licensing detailed licensing details.
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -19,8 +17,6 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
class X11GLControl : IGLControl
|
class X11GLControl : IGLControl
|
||||||
{
|
{
|
||||||
#region P/Invokes
|
|
||||||
|
|
||||||
[DllImport("libX11")]
|
[DllImport("libX11")]
|
||||||
static extern IntPtr XCreateColormap(IntPtr display, IntPtr window, IntPtr visual, int alloc);
|
static extern IntPtr XCreateColormap(IntPtr display, IntPtr window, IntPtr visual, int alloc);
|
||||||
|
|
||||||
|
@ -56,10 +52,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
GraphicsMode mode;
|
GraphicsMode mode;
|
||||||
IWindowInfo window_info;
|
IWindowInfo window_info;
|
||||||
IntPtr display;
|
IntPtr display;
|
||||||
|
@ -68,8 +60,6 @@ namespace OpenTK
|
||||||
// Use reflection to retrieve the necessary values from Mono's Windows.Forms implementation.
|
// Use reflection to retrieve the necessary values from Mono's Windows.Forms implementation.
|
||||||
Type xplatui = Type.GetType("System.Windows.Forms.XplatUIX11, System.Windows.Forms");
|
Type xplatui = Type.GetType("System.Windows.Forms.XplatUIX11, System.Windows.Forms");
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
internal X11GLControl(GraphicsMode mode, Control control)
|
internal X11GLControl(GraphicsMode mode, Control control)
|
||||||
{
|
{
|
||||||
if (mode == null)
|
if (mode == null)
|
||||||
|
@ -105,8 +95,6 @@ namespace OpenTK
|
||||||
window_info = Utilities.CreateX11WindowInfo(display, screen, control.Handle, rootWindow, IntPtr.Zero);
|
window_info = Utilities.CreateX11WindowInfo(display, screen, control.Handle, rootWindow, IntPtr.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IGLControl Members
|
|
||||||
|
|
||||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
GraphicsContext context = new GraphicsContext(mode, this.WindowInfo, major, minor, flags);
|
GraphicsContext context = new GraphicsContext(mode, this.WindowInfo, major, minor, flags);
|
||||||
|
@ -141,10 +129,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
static object GetStaticFieldValue(Type type, string fieldName)
|
static object GetStaticFieldValue(Type type, string fieldName)
|
||||||
{
|
{
|
||||||
return type.GetField(fieldName,
|
return type.GetField(fieldName,
|
||||||
|
@ -156,7 +140,5 @@ namespace OpenTK
|
||||||
type.GetField(fieldName,
|
type.GetField(fieldName,
|
||||||
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).SetValue(null, value);
|
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).SetValue(null, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,24 +19,14 @@ namespace OpenTK
|
||||||
public class GLWidget: DrawingArea
|
public class GLWidget: DrawingArea
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Static attrs.
|
|
||||||
|
|
||||||
private static int _GraphicsContextCount;
|
private static int _GraphicsContextCount;
|
||||||
private static bool _SharedContextInitialized = false;
|
private static bool _SharedContextInitialized = false;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Attributes
|
|
||||||
|
|
||||||
private IGraphicsContext _GraphicsContext;
|
private IGraphicsContext _GraphicsContext;
|
||||||
private IWindowInfo _WindowInfo;
|
private IWindowInfo _WindowInfo;
|
||||||
private GraphicsContextFlags _GraphicsContextFlags;
|
private GraphicsContextFlags _GraphicsContextFlags;
|
||||||
private bool _Initialized = false;
|
private bool _Initialized = false;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use a single buffer versus a double buffer.
|
/// Use a single buffer versus a double buffer.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -98,10 +88,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Construction/Destruction
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="GLWidget"/> class.
|
/// Initializes a new instance of the <see cref="GLWidget"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -204,10 +190,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region New Events
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the first <see cref="GraphicsContext"/> is created in the case where
|
/// Called when the first <see cref="GraphicsContext"/> is created in the case where
|
||||||
/// GraphicsContext.ShareContexts == true;
|
/// GraphicsContext.ShareContexts == true;
|
||||||
|
@ -281,8 +263,6 @@ namespace OpenTK
|
||||||
ShuttingDown(this, EventArgs.Empty);
|
ShuttingDown(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if GTK3
|
#if GTK3
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the widget needs to be (fully or partially) redrawn.
|
/// Called when the widget needs to be (fully or partially) redrawn.
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -41,8 +39,6 @@ namespace OpenTK.Audio
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class AudioCapture : IDisposable
|
public sealed class AudioCapture : IDisposable
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
// This must stay private info so the end-user cannot call any Alc commands for the recording device.
|
// This must stay private info so the end-user cannot call any Alc commands for the recording device.
|
||||||
IntPtr Handle;
|
IntPtr Handle;
|
||||||
|
|
||||||
|
@ -52,9 +48,6 @@ namespace OpenTK.Audio
|
||||||
ALFormat sample_format;
|
ALFormat sample_format;
|
||||||
int sample_frequency;
|
int sample_frequency;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
static AudioCapture()
|
static AudioCapture()
|
||||||
{
|
{
|
||||||
|
@ -120,12 +113,6 @@ namespace OpenTK.Audio
|
||||||
SampleFrequency = frequency;
|
SampleFrequency = frequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Constructor
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
#region CurrentDevice
|
|
||||||
|
|
||||||
private string device_name;
|
private string device_name;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -139,10 +126,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region AvailableDevices
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of strings containing all known recording devices.
|
/// Returns a list of strings containing all known recording devices.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -154,10 +137,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region DefaultDevice
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the name of the device that will be used as recording default.
|
/// Returns the name of the device that will be used as recording default.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -169,10 +148,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region CheckErrors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks for ALC error conditions.
|
/// Checks for ALC error conditions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -185,10 +160,6 @@ namespace OpenTK.Audio
|
||||||
new AudioDeviceErrorChecker(Handle).Dispose();
|
new AudioDeviceErrorChecker(Handle).Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region CurrentError
|
|
||||||
|
|
||||||
/// <summary>Returns the ALC error code for this device.</summary>
|
/// <summary>Returns the ALC error code for this device.</summary>
|
||||||
public AlcError CurrentError
|
public AlcError CurrentError
|
||||||
{
|
{
|
||||||
|
@ -198,10 +169,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Start & Stop
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start recording samples.
|
/// Start recording samples.
|
||||||
/// The number of available samples can be obtained through the <see cref="AvailableSamples"/> property.
|
/// The number of available samples can be obtained through the <see cref="AvailableSamples"/> property.
|
||||||
|
@ -220,10 +187,6 @@ namespace OpenTK.Audio
|
||||||
_isrecording = false;
|
_isrecording = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Start & Stop Capture
|
|
||||||
|
|
||||||
#region AvailableSamples
|
|
||||||
|
|
||||||
/// <summary>Returns the number of available samples for capture.</summary>
|
/// <summary>Returns the number of available samples for capture.</summary>
|
||||||
public int AvailableSamples
|
public int AvailableSamples
|
||||||
{
|
{
|
||||||
|
@ -237,10 +200,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Available samples property
|
|
||||||
|
|
||||||
#region ReadSamples
|
|
||||||
|
|
||||||
/// <summary>Fills the specified buffer with samples from the internal capture ring-buffer. This method does not block: it is an error to specify a sampleCount larger than AvailableSamples.</summary>
|
/// <summary>Fills the specified buffer with samples from the internal capture ring-buffer. This method does not block: it is an error to specify a sampleCount larger than AvailableSamples.</summary>
|
||||||
/// <param name="buffer">A pointer to a previously initialized and pinned array.</param>
|
/// <param name="buffer">A pointer to a previously initialized and pinned array.</param>
|
||||||
/// <param name="sampleCount">The number of samples to be written to the buffer.</param>
|
/// <param name="sampleCount">The number of samples to be written to the buffer.</param>
|
||||||
|
@ -274,10 +233,6 @@ namespace OpenTK.Audio
|
||||||
finally { buffer_ptr.Free(); }
|
finally { buffer_ptr.Free(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region SampleFormat & SampleFrequency
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the OpenTK.Audio.ALFormat for this instance.
|
/// Gets the OpenTK.Audio.ALFormat for this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -296,10 +251,6 @@ namespace OpenTK.Audio
|
||||||
private set { sample_frequency = value; }
|
private set { sample_frequency = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IsRunning
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether this instance is currently capturing samples.
|
/// Gets a value indicating whether this instance is currently capturing samples.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -308,12 +259,6 @@ namespace OpenTK.Audio
|
||||||
get { return _isrecording; }
|
get { return _isrecording; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
// Retrieves the sample size in bytes for various ALFormats.
|
// Retrieves the sample size in bytes for various ALFormats.
|
||||||
// Compressed formats always return 1.
|
// Compressed formats always return 1.
|
||||||
static int GetSampleSize(ALFormat format)
|
static int GetSampleSize(ALFormat format)
|
||||||
|
@ -374,10 +319,6 @@ namespace OpenTK.Audio
|
||||||
"\nBuffer Size: " + buffersize;
|
"\nBuffer Size: " + buffersize;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Finalizes this instance.
|
/// Finalizes this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -409,7 +350,5 @@ namespace OpenTK.Audio
|
||||||
this.IsDisposed = true;
|
this.IsDisposed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Destructor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
@ -41,8 +39,6 @@ namespace OpenTK.Audio
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class AudioContext : IDisposable
|
public sealed class AudioContext : IDisposable
|
||||||
{
|
{
|
||||||
#region --- Fields ---
|
|
||||||
|
|
||||||
bool disposed;
|
bool disposed;
|
||||||
bool is_processing, is_synchronized;
|
bool is_processing, is_synchronized;
|
||||||
IntPtr device_handle;
|
IntPtr device_handle;
|
||||||
|
@ -53,12 +49,6 @@ namespace OpenTK.Audio
|
||||||
static object audio_context_lock = new object();
|
static object audio_context_lock = new object();
|
||||||
static Dictionary<ContextHandle, AudioContext> available_contexts = new Dictionary<ContextHandle, AudioContext>();
|
static Dictionary<ContextHandle, AudioContext> available_contexts = new Dictionary<ContextHandle, AudioContext>();
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Constructors ---
|
|
||||||
|
|
||||||
#region static AudioContext()
|
|
||||||
|
|
||||||
/// \internal
|
/// \internal
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs before the actual class constructor, to load available devices.
|
/// Runs before the actual class constructor, to load available devices.
|
||||||
|
@ -69,28 +59,16 @@ namespace OpenTK.Audio
|
||||||
{ }
|
{ }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion static AudioContext()
|
|
||||||
|
|
||||||
#region public AudioContext()
|
|
||||||
|
|
||||||
/// <summary>Constructs a new AudioContext, using the default audio device.</summary>
|
/// <summary>Constructs a new AudioContext, using the default audio device.</summary>
|
||||||
public AudioContext()
|
public AudioContext()
|
||||||
: this(null, 0, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
: this(null, 0, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public AudioContext(string device)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new AudioContext instance.
|
/// Constructs a new AudioContext instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="device">The device name that will host this instance.</param>
|
/// <param name="device">The device name that will host this instance.</param>
|
||||||
public AudioContext(string device) : this(device, 0, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
public AudioContext(string device) : this(device, 0, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public AudioContext(string device, int freq)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
||||||
/// <param name="device">The name of the audio device to use.</param>
|
/// <param name="device">The name of the audio device to use.</param>
|
||||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||||
|
@ -100,10 +78,6 @@ namespace OpenTK.Audio
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public AudioContext(string device, int freq) : this(device, freq, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
public AudioContext(string device, int freq) : this(device, freq, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public AudioContext(string device, int freq, int refresh)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
||||||
/// <param name="device">The name of the audio device to use.</param>
|
/// <param name="device">The name of the audio device to use.</param>
|
||||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||||
|
@ -115,10 +89,6 @@ namespace OpenTK.Audio
|
||||||
public AudioContext(string device, int freq, int refresh)
|
public AudioContext(string device, int freq, int refresh)
|
||||||
: this(device, freq, refresh, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
: this(device, freq, refresh, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public AudioContext(string device, int freq, int refresh, bool sync)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
||||||
/// <param name="device">The name of the audio device to use.</param>
|
/// <param name="device">The name of the audio device to use.</param>
|
||||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||||
|
@ -131,10 +101,6 @@ namespace OpenTK.Audio
|
||||||
public AudioContext(string device, int freq, int refresh, bool sync)
|
public AudioContext(string device, int freq, int refresh, bool sync)
|
||||||
: this(AudioDeviceEnumerator.AvailablePlaybackDevices[0], freq, refresh, sync, true) { }
|
: this(AudioDeviceEnumerator.AvailablePlaybackDevices[0], freq, refresh, sync, true) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public AudioContext(string device, int freq, int refresh, bool sync, bool enableEfx)
|
|
||||||
|
|
||||||
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
|
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
|
||||||
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
|
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
|
||||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||||
|
@ -165,10 +131,6 @@ namespace OpenTK.Audio
|
||||||
CreateContext(device, freq, refresh, sync, enableEfx, MaxAuxiliarySends.UseDriverDefault);
|
CreateContext(device, freq, refresh, sync, enableEfx, MaxAuxiliarySends.UseDriverDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public AudioContext(string device, int freq, int refresh, bool sync, bool enableEfx, MaxAuxiliarySends efxMaxAuxSends)
|
|
||||||
|
|
||||||
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
|
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
|
||||||
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
|
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
|
||||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||||
|
@ -200,14 +162,6 @@ namespace OpenTK.Audio
|
||||||
CreateContext(device, freq, refresh, sync, enableEfx, efxMaxAuxSends);
|
CreateContext(device, freq, refresh, sync, enableEfx, efxMaxAuxSends);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion --- Constructors ---
|
|
||||||
|
|
||||||
#region --- Private Methods ---
|
|
||||||
|
|
||||||
#region CreateContext
|
|
||||||
|
|
||||||
/// <summary>May be passed at context construction time to indicate the number of desired auxiliary effect slot sends per source.</summary>
|
/// <summary>May be passed at context construction time to indicate the number of desired auxiliary effect slot sends per source.</summary>
|
||||||
public enum MaxAuxiliarySends:int
|
public enum MaxAuxiliarySends:int
|
||||||
{
|
{
|
||||||
|
@ -353,10 +307,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion --- Private Methods ---
|
|
||||||
|
|
||||||
#region static void MakeCurrent(AudioContext context)
|
|
||||||
|
|
||||||
/// \internal
|
/// \internal
|
||||||
/// <summary>Makes the specified AudioContext current in the calling thread.</summary>
|
/// <summary>Makes the specified AudioContext current in the calling thread.</summary>
|
||||||
/// <param name="context">The OpenTK.Audio.AudioContext to make current, or null.</param>
|
/// <param name="context">The OpenTK.Audio.AudioContext to make current, or null.</param>
|
||||||
|
@ -377,10 +327,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region internal bool IsCurrent
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a System.Boolean indicating whether the AudioContext
|
/// Gets or sets a System.Boolean indicating whether the AudioContext
|
||||||
/// is current.
|
/// is current.
|
||||||
|
@ -410,20 +356,8 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IntPtr Device
|
|
||||||
|
|
||||||
IntPtr Device { get { return device_handle; } }
|
IntPtr Device { get { return device_handle; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Public Members ---
|
|
||||||
|
|
||||||
#region CheckErrors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks for ALC error conditions.
|
/// Checks for ALC error conditions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -439,10 +373,6 @@ namespace OpenTK.Audio
|
||||||
new AudioDeviceErrorChecker(device_handle).Dispose();
|
new AudioDeviceErrorChecker(device_handle).Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region CurrentError
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the ALC error code for this instance.
|
/// Returns the ALC error code for this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -457,10 +387,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region MakeCurrent
|
|
||||||
|
|
||||||
/// <summary>Makes the AudioContext current in the calling thread.</summary>
|
/// <summary>Makes the AudioContext current in the calling thread.</summary>
|
||||||
/// <exception cref="ObjectDisposedException">
|
/// <exception cref="ObjectDisposedException">
|
||||||
/// Occurs if this function is called after the AudioContext has been disposed.
|
/// Occurs if this function is called after the AudioContext has been disposed.
|
||||||
|
@ -480,10 +406,6 @@ namespace OpenTK.Audio
|
||||||
AudioContext.MakeCurrent(this);
|
AudioContext.MakeCurrent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IsProcessing
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Boolean indicating whether the AudioContext is
|
/// Gets a System.Boolean indicating whether the AudioContext is
|
||||||
/// currently processing audio events.
|
/// currently processing audio events.
|
||||||
|
@ -502,10 +424,6 @@ namespace OpenTK.Audio
|
||||||
private set { is_processing = value; }
|
private set { is_processing = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IsSynchronized
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Boolean indicating whether the AudioContext is
|
/// Gets a System.Boolean indicating whether the AudioContext is
|
||||||
/// synchronized.
|
/// synchronized.
|
||||||
|
@ -523,10 +441,6 @@ namespace OpenTK.Audio
|
||||||
private set { is_synchronized = value; }
|
private set { is_synchronized = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void Process
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Processes queued audio events.
|
/// Processes queued audio events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -554,10 +468,6 @@ namespace OpenTK.Audio
|
||||||
IsProcessing = true;
|
IsProcessing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void Suspend
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Suspends processing of audio events.
|
/// Suspends processing of audio events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -587,10 +497,6 @@ namespace OpenTK.Audio
|
||||||
IsProcessing = false;
|
IsProcessing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool SupportsExtension(string extension)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether the specified OpenAL extension is supported.
|
/// Checks whether the specified OpenAL extension is supported.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -604,10 +510,6 @@ namespace OpenTK.Audio
|
||||||
return Alc.IsExtensionPresent(this.Device, extension);
|
return Alc.IsExtensionPresent(this.Device, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region CurrentDevice
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.String with the name of the device used in this context.
|
/// Gets a System.String with the name of the device used in this context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -622,14 +524,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion --- Public Members ---
|
|
||||||
|
|
||||||
#region --- Static Members ---
|
|
||||||
|
|
||||||
#region public static AudioContext CurrentContext
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the OpenTK.Audio.AudioContext which is current in the application.
|
/// Gets the OpenTK.Audio.AudioContext which is current in the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -657,10 +551,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region AvailableDevices
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of strings containing all known playback devices.
|
/// Returns a list of strings containing all known playback devices.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -671,10 +561,6 @@ namespace OpenTK.Audio
|
||||||
return AudioDeviceEnumerator.AvailablePlaybackDevices;
|
return AudioDeviceEnumerator.AvailablePlaybackDevices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion public static IList<string> AvailablePlaybackDevices
|
|
||||||
|
|
||||||
#region DefaultDevice
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the name of the device that will be used as playback default.
|
/// Returns the name of the device that will be used as playback default.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -686,12 +572,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- IDisposable Members ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes of the AudioContext, cleaning up all resources consumed by it.
|
/// Disposes of the AudioContext, cleaning up all resources consumed by it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -732,10 +612,6 @@ namespace OpenTK.Audio
|
||||||
this.Dispose(false);
|
this.Dispose(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Overrides ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Calculates the hash code for this instance.
|
/// Calculates the hash code for this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -764,7 +640,5 @@ namespace OpenTK.Audio
|
||||||
return String.Format("{0} (handle: {1}, device: {2})",
|
return String.Format("{0} (handle: {1}, device: {2})",
|
||||||
this.device_name, this.context_handle, this.device_handle);
|
this.device_name, this.context_handle, this.device_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -36,8 +34,6 @@ namespace OpenTK.Audio
|
||||||
{
|
{
|
||||||
internal static class AudioDeviceEnumerator
|
internal static class AudioDeviceEnumerator
|
||||||
{
|
{
|
||||||
#region All device strings
|
|
||||||
|
|
||||||
private static readonly List<string> available_playback_devices = new List<string>();
|
private static readonly List<string> available_playback_devices = new List<string>();
|
||||||
private static readonly List<string> available_recording_devices = new List<string>();
|
private static readonly List<string> available_recording_devices = new List<string>();
|
||||||
|
|
||||||
|
@ -56,10 +52,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion All device strings
|
|
||||||
|
|
||||||
#region Default device strings
|
|
||||||
|
|
||||||
private static string default_playback_device;
|
private static string default_playback_device;
|
||||||
internal static string DefaultPlaybackDevice
|
internal static string DefaultPlaybackDevice
|
||||||
{
|
{
|
||||||
|
@ -78,10 +70,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Default device strings
|
|
||||||
|
|
||||||
#region Is OpenAL supported?
|
|
||||||
|
|
||||||
private static bool openal_supported = true;
|
private static bool openal_supported = true;
|
||||||
internal static bool IsOpenALSupported
|
internal static bool IsOpenALSupported
|
||||||
{
|
{
|
||||||
|
@ -91,10 +79,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Is OpenAL supported?
|
|
||||||
|
|
||||||
#region Alc Version number
|
|
||||||
|
|
||||||
internal enum AlcVersion
|
internal enum AlcVersion
|
||||||
{
|
{
|
||||||
Alc1_0,
|
Alc1_0,
|
||||||
|
@ -110,10 +94,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Alc Version number
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
// Loads all available audio devices into the available_*_devices lists.
|
// Loads all available audio devices into the available_*_devices lists.
|
||||||
static AudioDeviceEnumerator()
|
static AudioDeviceEnumerator()
|
||||||
{
|
{
|
||||||
|
@ -222,7 +202,5 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -35,15 +33,9 @@ namespace OpenTK.Audio
|
||||||
{
|
{
|
||||||
struct AudioDeviceErrorChecker : IDisposable
|
struct AudioDeviceErrorChecker : IDisposable
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
readonly IntPtr Device;
|
readonly IntPtr Device;
|
||||||
static readonly string ErrorString = "Device {0} reported {1}.";
|
static readonly string ErrorString = "Device {0} reported {1}.";
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public AudioDeviceErrorChecker(IntPtr device)
|
public AudioDeviceErrorChecker(IntPtr device)
|
||||||
{
|
{
|
||||||
if (device == IntPtr.Zero)
|
if (device == IntPtr.Zero)
|
||||||
|
@ -52,10 +44,6 @@ namespace OpenTK.Audio
|
||||||
Device = device;
|
Device = device;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
AlcError err = Alc.GetError(Device);
|
AlcError err = Alc.GetError(Device);
|
||||||
|
@ -79,7 +67,5 @@ namespace OpenTK.Audio
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* AlFunctions.cs
|
||||||
/* AlFunctions.cs
|
|
||||||
* C header: \OpenAL 1.1 SDK\include\Al.h
|
* C header: \OpenAL 1.1 SDK\include\Al.h
|
||||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
@ -71,15 +69,9 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static partial class AL
|
public static partial class AL
|
||||||
{
|
{
|
||||||
|
|
||||||
#region Constants
|
|
||||||
|
|
||||||
internal const string Lib = "openal32.dll";
|
internal const string Lib = "openal32.dll";
|
||||||
private const CallingConvention Style = CallingConvention.Cdecl;
|
private const CallingConvention Style = CallingConvention.Cdecl;
|
||||||
|
|
||||||
#endregion Constants
|
|
||||||
|
|
||||||
#region Renderer State management
|
|
||||||
|
|
||||||
/// <summary>This function enables a feature of the OpenAL driver. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.</summary>
|
/// <summary>This function enables a feature of the OpenAL driver. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.</summary>
|
||||||
/// <param name="capability">The name of a capability to enable.</param>
|
/// <param name="capability">The name of a capability to enable.</param>
|
||||||
[DllImport(AL.Lib, EntryPoint = "alEnable", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[DllImport(AL.Lib, EntryPoint = "alEnable", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
|
@ -99,10 +91,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern bool IsEnabled(ALCapability capability);
|
public static extern bool IsEnabled(ALCapability capability);
|
||||||
// AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
|
// AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
|
||||||
|
|
||||||
#endregion Renderer State management
|
|
||||||
|
|
||||||
#region State retrieval
|
|
||||||
|
|
||||||
[DllImport(AL.Lib, EntryPoint = "alGetString", ExactSpelling = true, CallingConvention = AL.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
[DllImport(AL.Lib, EntryPoint = "alGetString", ExactSpelling = true, CallingConvention = AL.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||||
private static extern IntPtr GetStringPrivate(ALGetString param); // accepts the enums AlError, AlContextString
|
private static extern IntPtr GetStringPrivate(ALGetString param); // accepts the enums AlError, AlContextString
|
||||||
// AL_API const ALchar* AL_APIENTRY alGetString( ALenum param );
|
// AL_API const ALchar* AL_APIENTRY alGetString( ALenum param );
|
||||||
|
@ -168,10 +156,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern ALError GetError();
|
public static extern ALError GetError();
|
||||||
// AL_API ALenum AL_APIENTRY alGetError( void );
|
// AL_API ALenum AL_APIENTRY alGetError( void );
|
||||||
|
|
||||||
#endregion State retrieval
|
|
||||||
|
|
||||||
#region Extension support.
|
|
||||||
|
|
||||||
///<summary>This function tests if a specific Extension is available for the OpenAL driver.</summary>
|
///<summary>This function tests if a specific Extension is available for the OpenAL driver.</summary>
|
||||||
/// <param name="extname">A string naming the desired extension. Example: "EAX-RAM"</param>
|
/// <param name="extname">A string naming the desired extension. Example: "EAX-RAM"</param>
|
||||||
/// <returns>Returns True if the Extension is available or False if not available.</returns>
|
/// <returns>Returns True if the Extension is available or False if not available.</returns>
|
||||||
|
@ -193,8 +177,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern int GetEnumValue([In] string ename);
|
public static extern int GetEnumValue([In] string ename);
|
||||||
// AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
|
// AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
|
||||||
|
|
||||||
#endregion Extension support.
|
|
||||||
|
|
||||||
/* Listener
|
/* Listener
|
||||||
* Listener represents the location and orientation of the
|
* Listener represents the location and orientation of the
|
||||||
* 'user' in 3D-space.
|
* 'user' in 3D-space.
|
||||||
|
@ -207,8 +189,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
* Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
|
* Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#region Set Listener parameters
|
|
||||||
|
|
||||||
/// <summary>This function sets a floating-point property for the listener.</summary>
|
/// <summary>This function sets a floating-point property for the listener.</summary>
|
||||||
/// <param name="param">The name of the attribute to be set: ALListenerf.Gain</param>
|
/// <param name="param">The name of the attribute to be set: ALListenerf.Gain</param>
|
||||||
/// <param name="value">The float value to set the attribute to.</param>
|
/// <param name="value">The float value to set the attribute to.</param>
|
||||||
|
@ -281,10 +261,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
// AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
|
// AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||||
// AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
|
// AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
|
||||||
|
|
||||||
#endregion Set Listener parameters
|
|
||||||
|
|
||||||
#region Get Listener parameters
|
|
||||||
|
|
||||||
/// <summary>This function retrieves a floating-point property of the listener.</summary>
|
/// <summary>This function retrieves a floating-point property of the listener.</summary>
|
||||||
/// <param name="param">the name of the attribute to be retrieved: ALListenerf.Gain</param>
|
/// <param name="param">the name of the attribute to be retrieved: ALListenerf.Gain</param>
|
||||||
/// <param name="value">a pointer to the floating-point value being retrieved.</param>
|
/// <param name="value">a pointer to the floating-point value being retrieved.</param>
|
||||||
|
@ -345,8 +321,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
// AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
// AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
||||||
// AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
|
// AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
|
||||||
|
|
||||||
#endregion Get Listener parameters
|
|
||||||
|
|
||||||
/* Source
|
/* Source
|
||||||
* Sources represent individual sound objects in 3D-space.
|
* Sources represent individual sound objects in 3D-space.
|
||||||
* Sources take the PCM buffer provided in the specified Buffer,
|
* Sources take the PCM buffer provided in the specified Buffer,
|
||||||
|
@ -384,10 +358,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
* Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
|
* Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#region Create Source objects
|
|
||||||
|
|
||||||
#region GenSources()
|
|
||||||
|
|
||||||
[DllImport(AL.Lib, EntryPoint = "alGenSources", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[DllImport(AL.Lib, EntryPoint = "alGenSources", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
unsafe private static extern void GenSourcesPrivate(int n, [Out] uint* sources);
|
unsafe private static extern void GenSourcesPrivate(int n, [Out] uint* sources);
|
||||||
// AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* Sources );
|
// AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* Sources );
|
||||||
|
@ -465,10 +435,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GenSources(1, out source);
|
GenSources(1, out source);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion GenSources()
|
|
||||||
|
|
||||||
#region DeleteSources()
|
|
||||||
|
|
||||||
/// <summary>This function deletes one or more sources.</summary>
|
/// <summary>This function deletes one or more sources.</summary>
|
||||||
/// <param name="n">The number of sources to be deleted.</param>
|
/// <param name="n">The number of sources to be deleted.</param>
|
||||||
/// <param name="sources">Pointer to an array of source names identifying the sources to be deleted.</param>
|
/// <param name="sources">Pointer to an array of source names identifying the sources to be deleted.</param>
|
||||||
|
@ -524,10 +490,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
DeleteSources(1, ref source);
|
DeleteSources(1, ref source);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion DeleteSources()
|
|
||||||
|
|
||||||
#region IsSource()
|
|
||||||
|
|
||||||
/// <summary>This function tests if a source name is valid, returning True if valid and False if not.</summary>
|
/// <summary>This function tests if a source name is valid, returning True if valid and False if not.</summary>
|
||||||
/// <param name="sid">A source name to be tested for validity</param>
|
/// <param name="sid">A source name to be tested for validity</param>
|
||||||
/// <returns>Success.</returns>
|
/// <returns>Success.</returns>
|
||||||
|
@ -543,14 +505,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
return IsSource((uint)sid);
|
return IsSource((uint)sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion IsSource()
|
|
||||||
|
|
||||||
#endregion Create Source objects
|
|
||||||
|
|
||||||
#region Set Source parameters
|
|
||||||
|
|
||||||
#region Sourcef
|
|
||||||
|
|
||||||
/// <summary>This function sets a floating-point property of a source.</summary>
|
/// <summary>This function sets a floating-point property of a source.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being set</param>
|
/// <param name="sid">Source name whose attribute is being set</param>
|
||||||
/// <param name="param">The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency.</param>
|
/// <param name="param">The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency.</param>
|
||||||
|
@ -568,10 +522,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Source((uint)sid, param, value);
|
Source((uint)sid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Sourcef
|
|
||||||
|
|
||||||
#region Source3f
|
|
||||||
|
|
||||||
/// <summary>This function sets a source property requiring three floating-point values.</summary>
|
/// <summary>This function sets a source property requiring three floating-point values.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||||
/// <param name="param">The name of the attribute to set: ALSource3f.Position, Velocity, Direction.</param>
|
/// <param name="param">The name of the attribute to set: ALSource3f.Position, Velocity, Direction.</param>
|
||||||
|
@ -612,10 +562,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Source((uint)sid, param, values.X, values.Y, values.Z);
|
Source((uint)sid, param, values.X, values.Y, values.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Source3f
|
|
||||||
|
|
||||||
#region Sourcei
|
|
||||||
|
|
||||||
/// <summary>This function sets an integer property of a source.</summary>
|
/// <summary>This function sets an integer property of a source.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||||
/// <param name="param">The name of the attribute to set: ALSourcei.SourceRelative, ConeInnerAngle, ConeOuterAngle, Looping, Buffer, SourceState.</param>
|
/// <param name="param">The name of the attribute to set: ALSourcei.SourceRelative, ConeInnerAngle, ConeOuterAngle, Looping, Buffer, SourceState.</param>
|
||||||
|
@ -669,10 +615,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Source((uint)source, ALSourcei.Buffer, buffer);
|
Source((uint)source, ALSourcei.Buffer, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Sourcei
|
|
||||||
|
|
||||||
#region Source3i
|
|
||||||
|
|
||||||
/// <summary>This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots.</summary>
|
/// <summary>This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||||
/// <param name="param">The name of the attribute to set: EfxAuxiliarySendFilter</param>
|
/// <param name="param">The name of the attribute to set: EfxAuxiliarySendFilter</param>
|
||||||
|
@ -694,18 +636,10 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Source((uint)sid, param, value1, value2, value3);
|
Source((uint)sid, param, value1, value2, value3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Source3i
|
|
||||||
|
|
||||||
// Not used by any Enum:
|
// Not used by any Enum:
|
||||||
// AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
|
// AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
|
||||||
// AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
|
// AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
|
||||||
|
|
||||||
#endregion Set Source parameters
|
|
||||||
|
|
||||||
#region Get Source parameters
|
|
||||||
|
|
||||||
#region GetSourcef
|
|
||||||
|
|
||||||
/// <summary>This function retrieves a floating-point property of a source.</summary>
|
/// <summary>This function retrieves a floating-point property of a source.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
||||||
/// <param name="param">The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency.</param>
|
/// <param name="param">The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency.</param>
|
||||||
|
@ -723,10 +657,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetSource((uint)sid, param, out value);
|
GetSource((uint)sid, param, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion GetSourcef
|
|
||||||
|
|
||||||
#region GetSource3f
|
|
||||||
|
|
||||||
/// <summary>This function retrieves three floating-point values representing a property of a source.</summary>
|
/// <summary>This function retrieves three floating-point values representing a property of a source.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
||||||
/// <param name="param">the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction.</param>
|
/// <param name="param">the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction.</param>
|
||||||
|
@ -767,10 +697,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetSource((uint)sid, param, out values.X, out values.Y, out values.Z);
|
GetSource((uint)sid, param, out values.X, out values.Y, out values.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion GetSource3f
|
|
||||||
|
|
||||||
#region GetSourcei
|
|
||||||
|
|
||||||
/// <summary>This function retrieves an integer property of a source.</summary>
|
/// <summary>This function retrieves an integer property of a source.</summary>
|
||||||
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
||||||
/// <param name="param">The name of the attribute to retrieve: ALSourcei.SourceRelative, Buffer, SourceState, BuffersQueued, BuffersProcessed.</param>
|
/// <param name="param">The name of the attribute to retrieve: ALSourcei.SourceRelative, Buffer, SourceState, BuffersQueued, BuffersProcessed.</param>
|
||||||
|
@ -811,19 +737,11 @@ namespace OpenTK.Audio.OpenAL
|
||||||
value = result != 0;
|
value = result != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion GetSourcei
|
|
||||||
|
|
||||||
// Not used by any Enum:
|
// Not used by any Enum:
|
||||||
// AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
// AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||||
// AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
|
// AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
|
||||||
// AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
|
// AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
|
||||||
|
|
||||||
#endregion Get Source parameters
|
|
||||||
|
|
||||||
#region Source vector based playback calls
|
|
||||||
|
|
||||||
#region SourcePlay
|
|
||||||
|
|
||||||
/// <summary>This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.</summary>
|
/// <summary>This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.</summary>
|
||||||
/// <param name="ns">The number of sources to be played.</param>
|
/// <param name="ns">The number of sources to be played.</param>
|
||||||
/// <param name="sids">A pointer to an array of sources to be played.</param>
|
/// <param name="sids">A pointer to an array of sources to be played.</param>
|
||||||
|
@ -874,10 +792,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourcePlay
|
|
||||||
|
|
||||||
#region SourceStop
|
|
||||||
|
|
||||||
/// <summary>This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.</summary>
|
/// <summary>This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.</summary>
|
||||||
/// <param name="ns">The number of sources to stop.</param>
|
/// <param name="ns">The number of sources to stop.</param>
|
||||||
/// <param name="sids">A pointer to an array of sources to be stopped.</param>
|
/// <param name="sids">A pointer to an array of sources to be stopped.</param>
|
||||||
|
@ -928,10 +842,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourceStop
|
|
||||||
|
|
||||||
#region SourceRewind
|
|
||||||
|
|
||||||
/// <summary>This function stops a set of sources and sets all their states to ALSourceState.Initial.</summary>
|
/// <summary>This function stops a set of sources and sets all their states to ALSourceState.Initial.</summary>
|
||||||
/// <param name="ns">The number of sources to be rewound.</param>
|
/// <param name="ns">The number of sources to be rewound.</param>
|
||||||
/// <param name="sids">A pointer to an array of sources to be rewound.</param>
|
/// <param name="sids">A pointer to an array of sources to be rewound.</param>
|
||||||
|
@ -982,10 +892,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourceRewind
|
|
||||||
|
|
||||||
#region SourcePause
|
|
||||||
|
|
||||||
/// <summary>This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.</summary>
|
/// <summary>This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.</summary>
|
||||||
/// <param name="ns">The number of sources to be paused.</param>
|
/// <param name="ns">The number of sources to be paused.</param>
|
||||||
/// <param name="sids">A pointer to an array of sources to be paused.</param>
|
/// <param name="sids">A pointer to an array of sources to be paused.</param>
|
||||||
|
@ -1035,14 +941,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourcePause
|
|
||||||
|
|
||||||
#endregion Source vector based playback calls
|
|
||||||
|
|
||||||
#region Source based playback calls
|
|
||||||
|
|
||||||
#region SourcePlay
|
|
||||||
|
|
||||||
/// <summary>This function plays, replays or resumes a source. The playing source will have it's state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.</summary>
|
/// <summary>This function plays, replays or resumes a source. The playing source will have it's state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.</summary>
|
||||||
/// <param name="sid">The name of the source to be played.</param>
|
/// <param name="sid">The name of the source to be played.</param>
|
||||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcePlay", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcePlay", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
|
@ -1056,10 +954,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
SourcePlay((uint)sid);
|
SourcePlay((uint)sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourcePlay
|
|
||||||
|
|
||||||
#region SourceStop
|
|
||||||
|
|
||||||
/// <summary>This function stops a source. The stopped source will have it's state changed to ALSourceState.Stopped.</summary>
|
/// <summary>This function stops a source. The stopped source will have it's state changed to ALSourceState.Stopped.</summary>
|
||||||
/// <param name="sid">The name of the source to be stopped.</param>
|
/// <param name="sid">The name of the source to be stopped.</param>
|
||||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourceStop", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourceStop", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
|
@ -1073,10 +967,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
SourceStop((uint)sid);
|
SourceStop((uint)sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourceStop
|
|
||||||
|
|
||||||
#region SourceRewind
|
|
||||||
|
|
||||||
/// <summary>This function stops the source and sets its state to ALSourceState.Initial.</summary>
|
/// <summary>This function stops the source and sets its state to ALSourceState.Initial.</summary>
|
||||||
/// <param name="sid">The name of the source to be rewound.</param>
|
/// <param name="sid">The name of the source to be rewound.</param>
|
||||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourceRewind", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourceRewind", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
|
@ -1090,10 +980,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
SourceRewind((uint)sid);
|
SourceRewind((uint)sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourceRewind
|
|
||||||
|
|
||||||
#region SourcePause
|
|
||||||
|
|
||||||
/// <summary>This function pauses a source. The paused source will have its state changed to ALSourceState.Paused.</summary>
|
/// <summary>This function pauses a source. The paused source will have its state changed to ALSourceState.Paused.</summary>
|
||||||
/// <param name="sid">The name of the source to be paused.</param>
|
/// <param name="sid">The name of the source to be paused.</param>
|
||||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcePause", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcePause", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
|
@ -1107,14 +993,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
SourcePause((uint)sid);
|
SourcePause((uint)sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourcePause
|
|
||||||
|
|
||||||
#endregion Source based playback calls
|
|
||||||
|
|
||||||
#region Source Queuing
|
|
||||||
|
|
||||||
#region SourceQueueBuffers
|
|
||||||
|
|
||||||
/// <summary>This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.</summary>
|
/// <summary>This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.</summary>
|
||||||
/// <param name="sid">The name of the source to queue buffers onto.</param>
|
/// <param name="sid">The name of the source to queue buffers onto.</param>
|
||||||
/// <param name="numEntries">The number of buffers to be queued.</param>
|
/// <param name="numEntries">The number of buffers to be queued.</param>
|
||||||
|
@ -1177,10 +1055,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
unsafe { AL.SourceQueueBuffers((uint)source, 1, (uint*)&buffer); }
|
unsafe { AL.SourceQueueBuffers((uint)source, 1, (uint*)&buffer); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourceQueueBuffers
|
|
||||||
|
|
||||||
#region SourceUnqueueBuffers
|
|
||||||
|
|
||||||
/// <summary>This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.</summary>
|
/// <summary>This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.</summary>
|
||||||
/// <param name="sid">The name of the source to unqueue buffers from.</param>
|
/// <param name="sid">The name of the source to unqueue buffers from.</param>
|
||||||
/// <param name="numEntries">The number of buffers to be unqueued.</param>
|
/// <param name="numEntries">The number of buffers to be unqueued.</param>
|
||||||
|
@ -1239,10 +1113,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SourceUnqueueBuffers
|
|
||||||
|
|
||||||
#endregion Source Queuing
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Buffer
|
* Buffer
|
||||||
* Buffer objects are storage space for sample buffer.
|
* Buffer objects are storage space for sample buffer.
|
||||||
|
@ -1257,10 +1127,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
* Channels (Query only) AL_CHANNELS ALint
|
* Channels (Query only) AL_CHANNELS ALint
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#region Buffer objects
|
|
||||||
|
|
||||||
#region GenBuffers
|
|
||||||
|
|
||||||
/// <summary>This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).</summary>
|
/// <summary>This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).</summary>
|
||||||
/// <param name="n">The number of buffers to be generated.</param>
|
/// <param name="n">The number of buffers to be generated.</param>
|
||||||
/// <param name="buffers">Pointer to an array of uint values which will store the names of the new buffers.</param>
|
/// <param name="buffers">Pointer to an array of uint values which will store the names of the new buffers.</param>
|
||||||
|
@ -1332,10 +1198,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GenBuffers(1, out buffer);
|
GenBuffers(1, out buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion GenBuffers
|
|
||||||
|
|
||||||
#region DeleteBuffers
|
|
||||||
|
|
||||||
/// <summary>This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.</summary>
|
/// <summary>This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.</summary>
|
||||||
/// <param name="n">The number of buffers to be deleted.</param>
|
/// <param name="n">The number of buffers to be deleted.</param>
|
||||||
/// <param name="buffers">Pointer to an array of buffer names identifying the buffers to be deleted.</param>
|
/// <param name="buffers">Pointer to an array of buffer names identifying the buffers to be deleted.</param>
|
||||||
|
@ -1414,10 +1276,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
DeleteBuffers(1, ref buffer);
|
DeleteBuffers(1, ref buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion DeleteBuffers
|
|
||||||
|
|
||||||
#region IsBuffer
|
|
||||||
|
|
||||||
/// <summary>This function tests if a buffer name is valid, returning True if valid, False if not.</summary>
|
/// <summary>This function tests if a buffer name is valid, returning True if valid, False if not.</summary>
|
||||||
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
|
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
|
||||||
/// <returns>Success.</returns>
|
/// <returns>Success.</returns>
|
||||||
|
@ -1434,10 +1292,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
return IsBuffer(temp);
|
return IsBuffer(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion IsBuffer
|
|
||||||
|
|
||||||
#region BufferData
|
|
||||||
|
|
||||||
/// <summary>This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.</summary>
|
/// <summary>This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.</summary>
|
||||||
/// <param name="bid">buffer Handle/Name to be filled with buffer.</param>
|
/// <param name="bid">buffer Handle/Name to be filled with buffer.</param>
|
||||||
/// <param name="format">Format type from among the following: ALFormat.Mono8, ALFormat.Mono16, ALFormat.Stereo8, ALFormat.Stereo16.</param>
|
/// <param name="format">Format type from among the following: ALFormat.Mono8, ALFormat.Mono16, ALFormat.Stereo8, ALFormat.Stereo16.</param>
|
||||||
|
@ -1476,12 +1330,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
finally { handle.Free(); }
|
finally { handle.Free(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion BufferData
|
|
||||||
|
|
||||||
#endregion Buffer objects
|
|
||||||
|
|
||||||
#region Set Buffer parameters (currently parameters can only be read)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Remarks (from Manual)
|
Remarks (from Manual)
|
||||||
* There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call,
|
* There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call,
|
||||||
|
@ -1504,12 +1352,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Buffer3f( bid, param, values.X, values.Y, values.Z );
|
Buffer3f( bid, param, values.X, values.Y, values.Z );
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
#endregion Set Buffer parameters
|
|
||||||
|
|
||||||
#region Get Buffer parameters
|
|
||||||
|
|
||||||
#region GetBufferi
|
|
||||||
|
|
||||||
/// <summary>This function retrieves an integer property of a buffer.</summary>
|
/// <summary>This function retrieves an integer property of a buffer.</summary>
|
||||||
/// <param name="bid">Buffer name whose attribute is being retrieved</param>
|
/// <param name="bid">Buffer name whose attribute is being retrieved</param>
|
||||||
/// <param name="param">The name of the attribute to be retrieved: ALGetBufferi.Frequency, Bits, Channels, Size, and the currently hidden AL_DATA (dangerous).</param>
|
/// <param name="param">The name of the attribute to be retrieved: ALGetBufferi.Frequency, Bits, Channels, Size, and the currently hidden AL_DATA (dangerous).</param>
|
||||||
|
@ -1527,18 +1369,12 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetBuffer((uint)bid, param, out value);
|
GetBuffer((uint)bid, param, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion GetBufferi
|
|
||||||
|
|
||||||
// AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
|
// AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
|
||||||
// AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
// AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
||||||
// AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
|
// AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
|
||||||
// AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
// AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||||
// AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
|
// AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
|
||||||
|
|
||||||
#endregion Get Buffer parameters
|
|
||||||
|
|
||||||
#region Global Parameters
|
|
||||||
|
|
||||||
/// <summary>AL.DopplerFactor is a simple scaling of source and listener velocities to exaggerate or deemphasize the Doppler (pitch) shift resulting from the calculation.</summary>
|
/// <summary>AL.DopplerFactor is a simple scaling of source and listener velocities to exaggerate or deemphasize the Doppler (pitch) shift resulting from the calculation.</summary>
|
||||||
/// <param name="value">A negative value will result in an error, the command is then ignored. The default value is 1f. The current setting can be queried using AL.Get with parameter ALGetFloat.SpeedOfSound.</param>
|
/// <param name="value">A negative value will result in an error, the command is then ignored. The default value is 1f. The current setting can be queried using AL.Get with parameter ALGetFloat.SpeedOfSound.</param>
|
||||||
[DllImport(AL.Lib, EntryPoint = "alDopplerFactor", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[DllImport(AL.Lib, EntryPoint = "alDopplerFactor", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
|
@ -1592,10 +1428,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern void DistanceModel(ALDistanceModel distancemodel);
|
public static extern void DistanceModel(ALDistanceModel distancemodel);
|
||||||
// AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
|
// AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
|
||||||
|
|
||||||
#endregion Global Parameters
|
|
||||||
|
|
||||||
#region Helpers
|
|
||||||
|
|
||||||
/// <summary>(Helper) Returns Source state information.</summary>
|
/// <summary>(Helper) Returns Source state information.</summary>
|
||||||
/// <param name="sid">The source to be queried.</param>
|
/// <param name="sid">The source to be queried.</param>
|
||||||
/// <returns>state information from OpenAL.</returns>
|
/// <returns>state information from OpenAL.</returns>
|
||||||
|
@ -1646,7 +1478,5 @@ namespace OpenTK.Audio.OpenAL
|
||||||
{
|
{
|
||||||
return (ALDistanceModel)AL.Get(ALGetInteger.DistanceModel);
|
return (ALDistanceModel)AL.Get(ALGetInteger.DistanceModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Helpers
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* AlTokens.cs
|
||||||
/* AlTokens.cs
|
|
||||||
* C header: \OpenAL 1.1 SDK\include\Al.h
|
* C header: \OpenAL 1.1 SDK\include\Al.h
|
||||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* EfxFunctions.cs
|
||||||
/* EfxFunctions.cs
|
|
||||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -19,10 +17,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class EffectsExtension
|
public partial class EffectsExtension
|
||||||
{
|
{
|
||||||
#region Helpers
|
|
||||||
|
|
||||||
#region BindEffect
|
|
||||||
|
|
||||||
/// <summary>(Helper) Selects the Effect type used by this Effect handle.</summary>
|
/// <summary>(Helper) Selects the Effect type used by this Effect handle.</summary>
|
||||||
/// <param name="eid">Effect id returned from a successful call to GenEffects.</param>
|
/// <param name="eid">Effect id returned from a successful call to GenEffects.</param>
|
||||||
/// <param name="type">Effect type.</param>
|
/// <param name="type">Effect type.</param>
|
||||||
|
@ -41,10 +35,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alEffecti((uint)eid, EfxEffecti.EffectType, (int)type);
|
Imported_alEffecti((uint)eid, EfxEffecti.EffectType, (int)type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion BindEffect
|
|
||||||
|
|
||||||
#region BindFilterToSource
|
|
||||||
|
|
||||||
/// <summary>(Helper) reroutes the output of a Source through a Filter.</summary>
|
/// <summary>(Helper) reroutes the output of a Source through a Filter.</summary>
|
||||||
/// <param name="source">A valid Source handle.</param>
|
/// <param name="source">A valid Source handle.</param>
|
||||||
/// <param name="filter">A valid Filter handle.</param>
|
/// <param name="filter">A valid Filter handle.</param>
|
||||||
|
@ -63,10 +53,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
AL.Source((uint)source, ALSourcei.EfxDirectFilter, (int)filter);
|
AL.Source((uint)source, ALSourcei.EfxDirectFilter, (int)filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion BindFilterToSource
|
|
||||||
|
|
||||||
#region BindEffectToAuxiliarySlot
|
|
||||||
|
|
||||||
/// <summary>(Helper) Attaches an Effect to an Auxiliary Effect Slot.</summary>
|
/// <summary>(Helper) Attaches an Effect to an Auxiliary Effect Slot.</summary>
|
||||||
/// <param name="auxiliaryeffectslot">The slot handle to attach the Effect to.</param>
|
/// <param name="auxiliaryeffectslot">The slot handle to attach the Effect to.</param>
|
||||||
/// <param name="effect">The Effect handle that is being attached.</param>
|
/// <param name="effect">The Effect handle that is being attached.</param>
|
||||||
|
@ -85,10 +71,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
AuxiliaryEffectSlot((uint)auxiliaryeffectslot, EfxAuxiliaryi.EffectslotEffect, (int)effect);
|
AuxiliaryEffectSlot((uint)auxiliaryeffectslot, EfxAuxiliaryi.EffectslotEffect, (int)effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion BindEffectToAuxiliarySlot
|
|
||||||
|
|
||||||
#region BindSourceToAuxiliarySlot
|
|
||||||
|
|
||||||
/// <summary>(Helper) Reroutes a Source's output into an Auxiliary Effect Slot.</summary>
|
/// <summary>(Helper) Reroutes a Source's output into an Auxiliary Effect Slot.</summary>
|
||||||
/// <param name="source">The Source handle who's output is forwarded.</param>
|
/// <param name="source">The Source handle who's output is forwarded.</param>
|
||||||
/// <param name="slot">The Auxiliary Effect Slot handle that receives input from the Source.</param>
|
/// <param name="slot">The Auxiliary Effect Slot handle that receives input from the Source.</param>
|
||||||
|
@ -111,14 +93,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
AL.Source((uint)source, ALSource3i.EfxAuxiliarySendFilter, (int)slot, (int)slotnumber, (int)filter);
|
AL.Source((uint)source, ALSource3i.EfxAuxiliarySendFilter, (int)slot, (int)slotnumber, (int)filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion BindSourceToAuxiliarySlot
|
|
||||||
|
|
||||||
#endregion Helpers
|
|
||||||
|
|
||||||
#region Effect Object
|
|
||||||
|
|
||||||
#region alGenEffects
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGenEffects(int n, [Out] uint* effects);
|
unsafe private delegate void Delegate_alGenEffects(int n, [Out] uint* effects);
|
||||||
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
|
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
|
||||||
|
@ -202,10 +176,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGenEffects
|
|
||||||
|
|
||||||
#region alDeleteEffects
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alDeleteEffects(int n, [In] uint* effects);
|
unsafe private delegate void Delegate_alDeleteEffects(int n, [In] uint* effects);
|
||||||
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
|
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
|
||||||
|
@ -280,10 +250,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alDeleteEffects
|
|
||||||
|
|
||||||
#region alIsEffect
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate bool Delegate_alIsEffect(uint eid);
|
private delegate bool Delegate_alIsEffect(uint eid);
|
||||||
// typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
|
// typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
|
||||||
|
@ -309,10 +275,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
return Imported_alIsEffect((uint)eid);
|
return Imported_alIsEffect((uint)eid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alIsEffect
|
|
||||||
|
|
||||||
#region alEffecti
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate void Delegate_alEffecti(uint eid, EfxEffecti param, int value);
|
private delegate void Delegate_alEffecti(uint eid, EfxEffecti param, int value);
|
||||||
// typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value);
|
// typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value);
|
||||||
|
@ -340,10 +302,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alEffecti((uint)eid, param, value);
|
Imported_alEffecti((uint)eid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alEffecti
|
|
||||||
|
|
||||||
#region alEffectf
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate void Delegate_alEffectf(uint eid, EfxEffectf param, float value);
|
private delegate void Delegate_alEffectf(uint eid, EfxEffectf param, float value);
|
||||||
// typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
|
// typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
|
||||||
|
@ -371,10 +329,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alEffectf((uint)eid, param, value);
|
Imported_alEffectf((uint)eid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alEffectf
|
|
||||||
|
|
||||||
#region alEffectfv
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alEffectfv(uint eid, EfxEffect3f param, [In] float* values);
|
unsafe private delegate void Delegate_alEffectfv(uint eid, EfxEffect3f param, [In] float* values);
|
||||||
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
|
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
|
||||||
|
@ -408,10 +362,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Effect((uint)eid, param, ref values);
|
Effect((uint)eid, param, ref values);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alEffectfv
|
|
||||||
|
|
||||||
#region alGetEffecti
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetEffecti(uint eid, EfxEffecti pname, [Out] int* value);
|
unsafe private delegate void Delegate_alGetEffecti(uint eid, EfxEffecti pname, [Out] int* value);
|
||||||
// typedef void (__cdecl *LPALGETEFFECTI)( ALuint eid, ALenum pname, ALint* value );
|
// typedef void (__cdecl *LPALGETEFFECTI)( ALuint eid, ALenum pname, ALint* value );
|
||||||
|
@ -445,10 +395,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetEffect((uint)eid, pname, out value);
|
GetEffect((uint)eid, pname, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetEffecti
|
|
||||||
|
|
||||||
#region alGetEffectf
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetEffectf(uint eid, EfxEffectf pname, [Out]float* value);
|
unsafe private delegate void Delegate_alGetEffectf(uint eid, EfxEffectf pname, [Out]float* value);
|
||||||
// typedef void (__cdecl *LPALGETEFFECTF)( ALuint eid, ALenum pname, ALfloat* value );
|
// typedef void (__cdecl *LPALGETEFFECTF)( ALuint eid, ALenum pname, ALfloat* value );
|
||||||
|
@ -482,10 +428,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetEffect((uint)eid, pname, out value);
|
GetEffect((uint)eid, pname, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetEffectf
|
|
||||||
|
|
||||||
#region alGetEffectfv
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetEffectfv(uint eid, EfxEffect3f param, [Out] float* values);
|
unsafe private delegate void Delegate_alGetEffectfv(uint eid, EfxEffect3f param, [Out] float* values);
|
||||||
// typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
|
// typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
|
||||||
|
@ -522,18 +464,10 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetEffect((uint)eid, param, out values);
|
GetEffect((uint)eid, param, out values);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetEffectfv
|
|
||||||
|
|
||||||
// Not used:
|
// Not used:
|
||||||
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
|
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
|
||||||
// typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
|
// typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
|
||||||
|
|
||||||
#endregion Effect Object
|
|
||||||
|
|
||||||
#region Filter Object
|
|
||||||
|
|
||||||
#region alGenFilters
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGenFilters(int n, [Out] uint* filters);
|
unsafe private delegate void Delegate_alGenFilters(int n, [Out] uint* filters);
|
||||||
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
|
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
|
||||||
|
@ -612,10 +546,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGenFilters
|
|
||||||
|
|
||||||
#region alDeleteFilters
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alDeleteFilters(int n, [In] uint* filters);
|
unsafe private delegate void Delegate_alDeleteFilters(int n, [In] uint* filters);
|
||||||
// typedef void (__cdecl *LPALDELETEFILTERS)( ALsizei n, ALuint* filters );
|
// typedef void (__cdecl *LPALDELETEFILTERS)( ALsizei n, ALuint* filters );
|
||||||
|
@ -690,10 +620,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alDeleteFilters
|
|
||||||
|
|
||||||
#region alIsFilter
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate bool Delegate_alIsFilter(uint fid);
|
private delegate bool Delegate_alIsFilter(uint fid);
|
||||||
// typedef ALboolean (__cdecl *LPALISFILTER)( ALuint fid );
|
// typedef ALboolean (__cdecl *LPALISFILTER)( ALuint fid );
|
||||||
|
@ -719,10 +645,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
return Imported_alIsFilter((uint)fid);
|
return Imported_alIsFilter((uint)fid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alIsFilter
|
|
||||||
|
|
||||||
#region alFilteri
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate void Delegate_alFilteri(uint fid, EfxFilteri param, int value);
|
private delegate void Delegate_alFilteri(uint fid, EfxFilteri param, int value);
|
||||||
// typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value );
|
// typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value );
|
||||||
|
@ -750,10 +672,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alFilteri((uint)fid, param, value);
|
Imported_alFilteri((uint)fid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alFilteri
|
|
||||||
|
|
||||||
#region alFilterf
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate void Delegate_alFilterf(uint fid, EfxFilterf param, float value);
|
private delegate void Delegate_alFilterf(uint fid, EfxFilterf param, float value);
|
||||||
// typedef void (__cdecl *LPALFILTERF)( ALuint fid, ALenum param, ALfloat value);
|
// typedef void (__cdecl *LPALFILTERF)( ALuint fid, ALenum param, ALfloat value);
|
||||||
|
@ -781,10 +699,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alFilterf((uint)fid, param, value);
|
Imported_alFilterf((uint)fid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alFilterf
|
|
||||||
|
|
||||||
#region alGetFilteri
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetFilteri(uint fid, EfxFilteri pname, [Out] int* value);
|
unsafe private delegate void Delegate_alGetFilteri(uint fid, EfxFilteri pname, [Out] int* value);
|
||||||
// typedef void (__cdecl *LPALGETFILTERI)( ALuint fid, ALenum pname, ALint* value );
|
// typedef void (__cdecl *LPALGETFILTERI)( ALuint fid, ALenum pname, ALint* value );
|
||||||
|
@ -818,10 +732,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetFilter((uint)fid, pname, out value);
|
GetFilter((uint)fid, pname, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetFilteri
|
|
||||||
|
|
||||||
#region alGetFilterf
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetFilterf(uint fid, EfxFilterf pname, [Out] float* value);
|
unsafe private delegate void Delegate_alGetFilterf(uint fid, EfxFilterf pname, [Out] float* value);
|
||||||
// typedef void (__cdecl *LPALGETFILTERF)( ALuint fid, ALenum pname, ALfloat* value );
|
// typedef void (__cdecl *LPALGETFILTERF)( ALuint fid, ALenum pname, ALfloat* value );
|
||||||
|
@ -855,20 +765,12 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetFilter((uint)fid, pname, out value);
|
GetFilter((uint)fid, pname, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetFilterf
|
|
||||||
|
|
||||||
// Not used:
|
// Not used:
|
||||||
// typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values );
|
// typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values );
|
||||||
// typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values );
|
// typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values );
|
||||||
// typedef void (__cdecl *LPALGETFILTERIV)( ALuint fid, ALenum pname, ALint* values );
|
// typedef void (__cdecl *LPALGETFILTERIV)( ALuint fid, ALenum pname, ALint* values );
|
||||||
// typedef void (__cdecl *LPALGETFILTERFV)( ALuint fid, ALenum pname, ALfloat* values );
|
// typedef void (__cdecl *LPALGETFILTERFV)( ALuint fid, ALenum pname, ALfloat* values );
|
||||||
|
|
||||||
#endregion Filter Object
|
|
||||||
|
|
||||||
#region Auxiliary Effect Slot Object
|
|
||||||
|
|
||||||
#region alGenAuxiliaryEffectSlots
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGenAuxiliaryEffectSlots(int n, [Out] uint* slots);
|
unsafe private delegate void Delegate_alGenAuxiliaryEffectSlots(int n, [Out] uint* slots);
|
||||||
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
|
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
|
||||||
|
@ -945,10 +847,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGenAuxiliaryEffectSlots
|
|
||||||
|
|
||||||
#region DeleteAuxiliaryEffectSlots
|
|
||||||
|
|
||||||
unsafe private delegate void Delegate_alDeleteAuxiliaryEffectSlots(int n, [In] uint* slots);
|
unsafe private delegate void Delegate_alDeleteAuxiliaryEffectSlots(int n, [In] uint* slots);
|
||||||
// typedef void (__cdecl *LPALDELETEAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
|
// typedef void (__cdecl *LPALDELETEAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
|
||||||
|
|
||||||
|
@ -1021,10 +919,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alDeleteAuxiliaryEffectSlots
|
|
||||||
|
|
||||||
#region alIsAuxiliaryEffectSlot
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate bool Delegate_alIsAuxiliaryEffectSlot(uint slot);
|
private delegate bool Delegate_alIsAuxiliaryEffectSlot(uint slot);
|
||||||
// typedef ALboolean (__cdecl *LPALISAUXILIARYEFFECTSLOT)( ALuint slot );
|
// typedef ALboolean (__cdecl *LPALISAUXILIARYEFFECTSLOT)( ALuint slot );
|
||||||
|
@ -1050,10 +944,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
return Imported_alIsAuxiliaryEffectSlot((uint)slot);
|
return Imported_alIsAuxiliaryEffectSlot((uint)slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alIsAuxiliaryEffectSlot
|
|
||||||
|
|
||||||
#region alAuxiliaryEffectSloti
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate void Delegate_alAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi param, int value);
|
private delegate void Delegate_alAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi param, int value);
|
||||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value );
|
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value );
|
||||||
|
@ -1081,10 +971,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alAuxiliaryEffectSloti((uint)asid, param, value);
|
Imported_alAuxiliaryEffectSloti((uint)asid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alAuxiliaryEffectSloti
|
|
||||||
|
|
||||||
#region alAuxiliaryEffectSlotf
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private delegate void Delegate_alAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf param, float value);
|
private delegate void Delegate_alAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf param, float value);
|
||||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum param, ALfloat value );
|
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum param, ALfloat value );
|
||||||
|
@ -1112,10 +998,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
Imported_alAuxiliaryEffectSlotf((uint)asid, param, value);
|
Imported_alAuxiliaryEffectSlotf((uint)asid, param, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alAuxiliaryEffectSlotf
|
|
||||||
|
|
||||||
#region alGetAuxiliaryEffectSloti
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi pname, [Out] int* value);
|
unsafe private delegate void Delegate_alGetAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi pname, [Out] int* value);
|
||||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum pname, ALint* value );
|
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum pname, ALint* value );
|
||||||
|
@ -1149,10 +1031,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetAuxiliaryEffectSlot((uint)asid, pname, out value);
|
GetAuxiliaryEffectSlot((uint)asid, pname, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetAuxiliaryEffectSloti
|
|
||||||
|
|
||||||
#region alGetAuxiliaryEffectSlotf
|
|
||||||
|
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
unsafe private delegate void Delegate_alGetAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf pname, [Out] float* value);
|
unsafe private delegate void Delegate_alGetAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf pname, [Out] float* value);
|
||||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
|
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
|
||||||
|
@ -1186,18 +1064,12 @@ namespace OpenTK.Audio.OpenAL
|
||||||
GetAuxiliaryEffectSlot((uint)asid, pname, out value);
|
GetAuxiliaryEffectSlot((uint)asid, pname, out value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion alGetAuxiliaryEffectSlotf
|
|
||||||
|
|
||||||
// Not used:
|
// Not used:
|
||||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values );
|
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values );
|
||||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values );
|
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values );
|
||||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum pname, ALint* values );
|
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum pname, ALint* values );
|
||||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum pname, ALfloat* values );
|
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum pname, ALfloat* values );
|
||||||
|
|
||||||
#endregion Auxiliary Effect Slot Object
|
|
||||||
|
|
||||||
#region Constructor / Extension Loading
|
|
||||||
|
|
||||||
private bool _valid;
|
private bool _valid;
|
||||||
|
|
||||||
/// <summary>Returns True if the EFX Extension has been found and could be initialized.</summary>
|
/// <summary>Returns True if the EFX Extension has been found and could be initialized.</summary>
|
||||||
|
@ -1282,7 +1154,5 @@ namespace OpenTK.Audio.OpenAL
|
||||||
// didn't return so far, everything went fine.
|
// didn't return so far, everything went fine.
|
||||||
_valid = true;
|
_valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Constructor / Extension Loading
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,18 +1,14 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* EfxTokens.cs
|
||||||
/* EfxTokens.cs
|
|
||||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace OpenTK.Audio.OpenAL
|
namespace OpenTK.Audio.OpenAL
|
||||||
{
|
{
|
||||||
#region Effect
|
|
||||||
|
|
||||||
///<summary>A list of valid 32-bit Float Effect/GetEffect parameters</summary>
|
///<summary>A list of valid 32-bit Float Effect/GetEffect parameters</summary>
|
||||||
public enum EfxEffectf : int
|
public enum EfxEffectf : int
|
||||||
{
|
{
|
||||||
|
@ -410,10 +406,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
EaxReverb = 0x8000,
|
EaxReverb = 0x8000,
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Effect
|
|
||||||
|
|
||||||
#region Auxiliary Effect Slot
|
|
||||||
|
|
||||||
///<summary>A list of valid Int32 AuxiliaryEffectSlot/GetAuxiliaryEffectSlot parameters</summary>
|
///<summary>A list of valid Int32 AuxiliaryEffectSlot/GetAuxiliaryEffectSlot parameters</summary>
|
||||||
public enum EfxAuxiliaryi : int
|
public enum EfxAuxiliaryi : int
|
||||||
{
|
{
|
||||||
|
@ -431,10 +423,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
EffectslotGain = 0x0002,
|
EffectslotGain = 0x0002,
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Auxiliary Effect Slot
|
|
||||||
|
|
||||||
#region Filter Object
|
|
||||||
|
|
||||||
///<summary>A list of valid 32-bits Float Filter/GetFilter parameters</summary>
|
///<summary>A list of valid 32-bits Float Filter/GetFilter parameters</summary>
|
||||||
public enum EfxFilterf : int
|
public enum EfxFilterf : int
|
||||||
{
|
{
|
||||||
|
@ -475,6 +463,4 @@ namespace OpenTK.Audio.OpenAL
|
||||||
///<summary>Currently not implemented. A band-pass filter is used to remove high and low frequency content from a signal.</summary>
|
///<summary>Currently not implemented. A band-pass filter is used to remove high and low frequency content from a signal.</summary>
|
||||||
Bandpass = 0x0003,
|
Bandpass = 0x0003,
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Filter Object
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* EfxPresets.cs
|
||||||
/* EfxPresets.cs
|
|
||||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* XRamExtension.cs
|
||||||
/* XRamExtension.cs
|
|
||||||
* C header: \OpenAL 1.1 SDK\include\xram.h
|
* C header: \OpenAL 1.1 SDK\include\xram.h
|
||||||
* Spec: ?
|
* Spec: ?
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details (MIT)
|
* See license.txt for license details (MIT)
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -21,8 +19,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
[CLSCompliant(true)]
|
[CLSCompliant(true)]
|
||||||
public sealed class XRamExtension
|
public sealed class XRamExtension
|
||||||
{
|
{
|
||||||
#region Instance state
|
|
||||||
|
|
||||||
private bool _valid = false;
|
private bool _valid = false;
|
||||||
|
|
||||||
/// <summary>Returns True if the X-Ram Extension has been found and could be initialized.</summary>
|
/// <summary>Returns True if the X-Ram Extension has been found and could be initialized.</summary>
|
||||||
|
@ -31,10 +27,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
get { return _valid; }
|
get { return _valid; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Instance state
|
|
||||||
|
|
||||||
#region X-RAM Function pointer definitions
|
|
||||||
|
|
||||||
// [CLSCompliant(false)]
|
// [CLSCompliant(false)]
|
||||||
private delegate bool Delegate_SetBufferMode(int n, ref uint buffers, int value);
|
private delegate bool Delegate_SetBufferMode(int n, ref uint buffers, int value);
|
||||||
//typedef ALboolean (__cdecl *EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
|
//typedef ALboolean (__cdecl *EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
|
||||||
|
@ -48,17 +40,9 @@ namespace OpenTK.Audio.OpenAL
|
||||||
//[CLSCompliant(false)]
|
//[CLSCompliant(false)]
|
||||||
private Delegate_GetBufferMode Imported_GetBufferMode;
|
private Delegate_GetBufferMode Imported_GetBufferMode;
|
||||||
|
|
||||||
#endregion X-RAM Function pointer definitions
|
|
||||||
|
|
||||||
#region X-RAM Tokens
|
|
||||||
|
|
||||||
private int AL_EAX_RAM_SIZE, AL_EAX_RAM_FREE,
|
private int AL_EAX_RAM_SIZE, AL_EAX_RAM_FREE,
|
||||||
AL_STORAGE_AUTOMATIC, AL_STORAGE_HARDWARE, AL_STORAGE_ACCESSIBLE;
|
AL_STORAGE_AUTOMATIC, AL_STORAGE_HARDWARE, AL_STORAGE_ACCESSIBLE;
|
||||||
|
|
||||||
#endregion X-RAM Tokens
|
|
||||||
|
|
||||||
#region Constructor / Extension Loading
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new XRamExtension instance.
|
/// Constructs a new XRamExtension instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -102,10 +86,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
_valid = true;
|
_valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Constructor / Extension Loading
|
|
||||||
|
|
||||||
#region Public Methods
|
|
||||||
|
|
||||||
/// <summary>Query total amount of X-RAM in bytes.</summary>
|
/// <summary>Query total amount of X-RAM in bytes.</summary>
|
||||||
public int GetRamSize
|
public int GetRamSize
|
||||||
{
|
{
|
||||||
|
@ -191,8 +171,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
uint temp = (uint)buffer;
|
uint temp = (uint)buffer;
|
||||||
return GetBufferMode(ref temp);
|
return GetBufferMode(ref temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Public Methods
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* AlcFunctions.cs
|
||||||
/* AlcFunctions.cs
|
|
||||||
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
||||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -73,17 +71,9 @@ namespace OpenTK.Audio.OpenAL
|
||||||
/// <summary>Alc = Audio Library Context</summary>
|
/// <summary>Alc = Audio Library Context</summary>
|
||||||
public static class Alc
|
public static class Alc
|
||||||
{
|
{
|
||||||
#region Constants
|
|
||||||
|
|
||||||
private const string Lib = AL.Lib;
|
private const string Lib = AL.Lib;
|
||||||
private const CallingConvention Style = CallingConvention.Cdecl;
|
private const CallingConvention Style = CallingConvention.Cdecl;
|
||||||
|
|
||||||
#endregion Constants
|
|
||||||
|
|
||||||
#region Context Management
|
|
||||||
|
|
||||||
#region CreateContext
|
|
||||||
|
|
||||||
[DllImport(Alc.Lib, EntryPoint = "alcCreateContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity]
|
[DllImport(Alc.Lib, EntryPoint = "alcCreateContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity]
|
||||||
unsafe static extern IntPtr sys_CreateContext([In] IntPtr device, [In] int* attrlist);
|
unsafe static extern IntPtr sys_CreateContext([In] IntPtr device, [In] int* attrlist);
|
||||||
|
|
||||||
|
@ -115,8 +105,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
[DllImport(Alc.Lib, EntryPoint = "alcMakeContextCurrent", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
[DllImport(Alc.Lib, EntryPoint = "alcMakeContextCurrent", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
static extern bool MakeContextCurrent(IntPtr context);
|
static extern bool MakeContextCurrent(IntPtr context);
|
||||||
|
|
||||||
|
@ -185,10 +173,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
// ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
// ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
||||||
|
|
||||||
#endregion Context Management
|
|
||||||
|
|
||||||
#region Device Management
|
|
||||||
|
|
||||||
/// <summary>This function opens a device by name.</summary>
|
/// <summary>This function opens a device by name.</summary>
|
||||||
/// <param name="devicename">a null-terminated string describing a device.</param>
|
/// <param name="devicename">a null-terminated string describing a device.</param>
|
||||||
/// <returns>Returns a pointer to the opened device. The return value will be NULL if there is an error.</returns>
|
/// <returns>Returns a pointer to the opened device. The return value will be NULL if there is an error.</returns>
|
||||||
|
@ -203,10 +187,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern bool CloseDevice([In] IntPtr device);
|
public static extern bool CloseDevice([In] IntPtr device);
|
||||||
// ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
// ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
||||||
|
|
||||||
#endregion Device Management
|
|
||||||
|
|
||||||
#region Error support.
|
|
||||||
|
|
||||||
/// <summary>This function retrieves the current context error state.</summary>
|
/// <summary>This function retrieves the current context error state.</summary>
|
||||||
/// <param name="device">a pointer to the device to retrieve the error state from</param>
|
/// <param name="device">a pointer to the device to retrieve the error state from</param>
|
||||||
/// <returns>Errorcode Int32.</returns>
|
/// <returns>Errorcode Int32.</returns>
|
||||||
|
@ -214,10 +194,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern AlcError GetError([In] IntPtr device);
|
public static extern AlcError GetError([In] IntPtr device);
|
||||||
// ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
// ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
||||||
|
|
||||||
#endregion Error support.
|
|
||||||
|
|
||||||
#region Extension support.
|
|
||||||
|
|
||||||
/// <summary>This function queries if a specified context extension is available.</summary>
|
/// <summary>This function queries if a specified context extension is available.</summary>
|
||||||
/// <param name="device">a pointer to the device to be queried for an extension.</param>
|
/// <param name="device">a pointer to the device to be queried for an extension.</param>
|
||||||
/// <param name="extname">a null-terminated string describing the extension.</param>
|
/// <param name="extname">a null-terminated string describing the extension.</param>
|
||||||
|
@ -242,10 +218,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
public static extern int GetEnumValue([In] IntPtr device, [In] string enumname);
|
public static extern int GetEnumValue([In] IntPtr device, [In] string enumname);
|
||||||
// ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
// ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
||||||
|
|
||||||
#endregion Extension support.
|
|
||||||
|
|
||||||
#region Query functions
|
|
||||||
|
|
||||||
[DllImport(Alc.Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
[DllImport(Alc.Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||||
private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
|
private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
|
||||||
// ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
// ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
||||||
|
@ -370,10 +342,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Query functions
|
|
||||||
|
|
||||||
#region Capture functions
|
|
||||||
|
|
||||||
/// <summary>This function opens a capture device by name. </summary>
|
/// <summary>This function opens a capture device by name. </summary>
|
||||||
/// <param name="devicename">a pointer to a device name string.</param>
|
/// <param name="devicename">a pointer to a device name string.</param>
|
||||||
/// <param name="frequency">the frequency that the buffer should be captured at.</param>
|
/// <param name="frequency">the frequency that the buffer should be captured at.</param>
|
||||||
|
@ -473,8 +441,6 @@ namespace OpenTK.Audio.OpenAL
|
||||||
CaptureSamples(device, ref buffer[0, 0, 0], samples);
|
CaptureSamples(device, ref buffer[0, 0, 0], samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Capture functions
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,11 +1,9 @@
|
||||||
#region --- OpenTK.OpenAL License ---
|
/* AlcTokens.cs
|
||||||
/* AlcTokens.cs
|
|
||||||
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
||||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||||
* See license.txt for license details
|
* See license.txt for license details
|
||||||
* http://www.OpenTK.net */
|
* http://www.OpenTK.net */
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -39,14 +37,8 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class BindingsBase
|
public abstract class BindingsBase
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
bool rebuildExtensionList = true;
|
bool rebuildExtensionList = true;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new BindingsBase instance.
|
/// Constructs a new BindingsBase instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -54,10 +46,6 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Protected Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a <see cref="System.Boolean"/> that indicates whether the list of supported extensions may have changed.
|
/// Gets or sets a <see cref="System.Boolean"/> that indicates whether the list of supported extensions may have changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -222,12 +210,6 @@ namespace OpenTK
|
||||||
Marshal.FreeHGlobal(ptr);
|
Marshal.FreeHGlobal(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Internal Members
|
|
||||||
|
|
||||||
internal abstract void LoadEntryPoints();
|
internal abstract void LoadEntryPoints();
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -34,8 +32,6 @@ using System.Reflection;
|
||||||
|
|
||||||
namespace OpenTK
|
namespace OpenTK
|
||||||
{
|
{
|
||||||
#region BlittableValueType<T>
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether the specified type parameter is a blittable value type.
|
/// Checks whether the specified type parameter is a blittable value type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -45,15 +41,9 @@ namespace OpenTK
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static class BlittableValueType<T>
|
public static class BlittableValueType<T>
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
static readonly Type Type;
|
static readonly Type Type;
|
||||||
static readonly int stride;
|
static readonly int stride;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
static BlittableValueType()
|
static BlittableValueType()
|
||||||
{
|
{
|
||||||
Type = typeof(T);
|
Type = typeof(T);
|
||||||
|
@ -66,10 +56,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the size of the type in bytes or 0 for non-blittable types.
|
/// Gets the size of the type in bytes or 0 for non-blittable types.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -78,8 +64,6 @@ namespace OpenTK
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static int Stride { get { return stride; } }
|
public static int Stride { get { return stride; } }
|
||||||
|
|
||||||
#region Check
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether the current typename T is blittable.
|
/// Checks whether the current typename T is blittable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -102,12 +86,6 @@ namespace OpenTK
|
||||||
return CheckType(type);
|
return CheckType(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Private Members
|
|
||||||
|
|
||||||
// Checks whether the parameter is a primitive type or consists of primitive types recursively.
|
// Checks whether the parameter is a primitive type or consists of primitive types recursively.
|
||||||
// Throws a NotSupportedException if it is not.
|
// Throws a NotSupportedException if it is not.
|
||||||
static bool CheckType(Type type)
|
static bool CheckType(Type type)
|
||||||
|
@ -144,14 +122,8 @@ namespace OpenTK
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region BlittableValueType
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether the specified type parameter is a blittable value type.
|
/// Checks whether the specified type parameter is a blittable value type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -161,8 +133,6 @@ namespace OpenTK
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static class BlittableValueType
|
public static class BlittableValueType
|
||||||
{
|
{
|
||||||
#region Check
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks whether type is a blittable value type.
|
/// Checks whether type is a blittable value type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -217,10 +187,6 @@ namespace OpenTK
|
||||||
return BlittableValueType<T>.Check();
|
return BlittableValueType<T>.Check();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region StrideOf
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the size of the specified value type in bytes or 0 if the type is not blittable.
|
/// Returns the size of the specified value type in bytes or 0 if the type is not blittable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -283,9 +249,5 @@ namespace OpenTK
|
||||||
|
|
||||||
return BlittableValueType<T>.Stride;
|
return BlittableValueType<T>.Stride;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
@ -39,15 +37,9 @@ namespace OpenTK.Compute.CL10
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class CL : BindingsBase
|
public sealed partial class CL : BindingsBase
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
const string Library = "opencl.dll";
|
const string Library = "opencl.dll";
|
||||||
static readonly object sync_root = new object();
|
static readonly object sync_root = new object();
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
static CL()
|
static CL()
|
||||||
{
|
{
|
||||||
Type imports = typeof(CL).GetNestedType("Core", BindingFlags.Static | BindingFlags.NonPublic);
|
Type imports = typeof(CL).GetNestedType("Core", BindingFlags.Static | BindingFlags.NonPublic);
|
||||||
|
@ -63,10 +55,6 @@ namespace OpenTK.Compute.CL10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Protected Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a synchronization token unique for the GL class.
|
/// Returns a synchronization token unique for the GL class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -93,9 +81,6 @@ namespace OpenTK.Compute.CL10
|
||||||
//CL.GetExtensionFunctionAddress
|
//CL.GetExtensionFunctionAddress
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Helper Overrides
|
|
||||||
|
|
||||||
public static unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, IntPtr user_data, OpenTK.Compute.CL10.ErrorCode* errcode_ret)
|
public static unsafe IntPtr CreateContext(ContextProperties* properties, uint num_devices, IntPtr* devices, IntPtr pfn_notify, IntPtr user_data, OpenTK.Compute.CL10.ErrorCode* errcode_ret)
|
||||||
{
|
{
|
||||||
|
@ -178,8 +163,6 @@ namespace OpenTK.Compute.CL10
|
||||||
IntPtr properties_correct = new IntPtr((int)properties);
|
IntPtr properties_correct = new IntPtr((int)properties);
|
||||||
return CreateContextFromType(ref properties_correct, device_type, pfn_notify, ref user_data, out errcode_ret);
|
return CreateContextFromType(ref properties_correct, device_type, pfn_notify, ref user_data, out errcode_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
@ -35,22 +33,14 @@ namespace OpenTK.Compute.CL10
|
||||||
{
|
{
|
||||||
struct ErrorHelper : IDisposable
|
struct ErrorHelper : IDisposable
|
||||||
{
|
{
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public ErrorHelper(IntPtr context)
|
public ErrorHelper(IntPtr context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
|
|
||||||
|
@ -34,12 +32,8 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace OpenTK.Compute
|
namespace OpenTK.Compute
|
||||||
{
|
{
|
||||||
#region struct Handle<T>
|
|
||||||
|
|
||||||
struct Handle<T> : IEquatable<Handle<T>>, IComparable<Handle<T>>
|
struct Handle<T> : IEquatable<Handle<T>>, IComparable<Handle<T>>
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
IntPtr handle;
|
IntPtr handle;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -50,22 +44,12 @@ namespace OpenTK.Compute
|
||||||
/// <summary>A read-only field that represents a handle that has been initialized to zero.</summary>
|
/// <summary>A read-only field that represents a handle that has been initialized to zero.</summary>
|
||||||
public static readonly Handle<T> Zero = new Handle<T>(IntPtr.Zero);
|
public static readonly Handle<T> Zero = new Handle<T>(IntPtr.Zero);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance with the specified handle.
|
/// Constructs a new instance with the specified handle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="h">A System.IntPtr containing the value for this instance.</param>
|
/// <param name="h">A System.IntPtr containing the value for this instance.</param>
|
||||||
public Handle(IntPtr h) { handle = h; }
|
public Handle(IntPtr h) { handle = h; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
#region ToString
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts this instance to its equivalent string representation.
|
/// Converts this instance to its equivalent string representation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -75,10 +59,6 @@ namespace OpenTK.Compute
|
||||||
return Value.ToString();
|
return Value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Equals
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares this instance to the specified object.
|
/// Compares this instance to the specified object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -91,10 +71,6 @@ namespace OpenTK.Compute
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region GetHashCode
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the hash code for this instance.
|
/// Returns the hash code for this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -104,10 +80,6 @@ namespace OpenTK.Compute
|
||||||
return Value.GetHashCode();
|
return Value.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static explicit operator IntPtr(Handle<T> c)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the specified ContextHandle to the equivalent IntPtr.
|
/// Converts the specified ContextHandle to the equivalent IntPtr.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -118,10 +90,6 @@ namespace OpenTK.Compute
|
||||||
return c != Handle<T>.Zero ? c.Value : IntPtr.Zero;
|
return c != Handle<T>.Zero ? c.Value : IntPtr.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static explicit operator Handle<T>(IntPtr p)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the specified IntPtr to the equivalent ContextHandle.
|
/// Converts the specified IntPtr to the equivalent ContextHandle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -132,8 +100,6 @@ namespace OpenTK.Compute
|
||||||
return new Handle<T>(p);
|
return new Handle<T>(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares two instances for equality.
|
/// Compares two instances for equality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -156,10 +122,6 @@ namespace OpenTK.Compute
|
||||||
return !left.Equals(right);
|
return !left.Equals(right);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<Handle<T>> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the numerical value of this instance to other and returns a value indicating their relative order.
|
/// Compares the numerical value of this instance to other and returns a value indicating their relative order.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -173,10 +135,6 @@ namespace OpenTK.Compute
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<Handle<T>> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares this instance to the specified ContextHandle for equality.
|
/// Compares this instance to the specified ContextHandle for equality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -186,12 +144,8 @@ namespace OpenTK.Compute
|
||||||
{
|
{
|
||||||
return Value == other.Value;
|
return Value == other.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -47,23 +45,11 @@ namespace OpenTK
|
||||||
volatile static bool initialized;
|
volatile static bool initialized;
|
||||||
readonly static object InitLock = new object();
|
readonly static object InitLock = new object();
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
Configuration() { }
|
Configuration() { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Methods
|
|
||||||
|
|
||||||
#region public static bool RunningOnWindows
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on a Windows platform.</summary>
|
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on a Windows platform.</summary>
|
||||||
public static bool RunningOnWindows { get { return runningOnWindows; } }
|
public static bool RunningOnWindows { get { return runningOnWindows; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool RunningOnX11
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on an X11 platform.</summary>
|
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on an X11 platform.</summary>
|
||||||
public static bool RunningOnX11
|
public static bool RunningOnX11
|
||||||
{
|
{
|
||||||
|
@ -78,10 +64,6 @@ namespace OpenTK
|
||||||
get { return runningOnUnix; }
|
get { return runningOnUnix; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region RunningOnSDL2
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Boolean indicating whether OpenTK is running on the SDL2 backend.
|
/// Gets a System.Boolean indicating whether OpenTK is running on the SDL2 backend.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -91,33 +73,17 @@ namespace OpenTK
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool RunningOnLinux
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on the Linux kernel.</summary>
|
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on the Linux kernel.</summary>
|
||||||
public static bool RunningOnLinux { get { return runningOnLinux; } }
|
public static bool RunningOnLinux { get { return runningOnLinux; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool RunningOnMacOS
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on a MacOS platform.</summary>
|
/// <summary>Gets a System.Boolean indicating whether OpenTK is running on a MacOS platform.</summary>
|
||||||
public static bool RunningOnMacOS { get { return runningOnMacOS; } }
|
public static bool RunningOnMacOS { get { return runningOnMacOS; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool RunningOnMono
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Boolean indicating whether OpenTK is running on the Mono runtime.
|
/// Gets a System.Boolean indicating whether OpenTK is running on the Mono runtime.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool RunningOnMono { get { return runningOnMono; } }
|
public static bool RunningOnMono { get { return runningOnMono; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool RunningOnAndroid
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <c>System.Boolean</c> indicating whether
|
/// Gets a <c>System.Boolean</c> indicating whether
|
||||||
/// OpenTK is running on an Android device.
|
/// OpenTK is running on an Android device.
|
||||||
|
@ -134,10 +100,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool RunningOnIOS
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a <c>System.Boolean</c> indicating whether
|
/// Gets a <c>System.Boolean</c> indicating whether
|
||||||
/// OpenTK is running on an Android device.
|
/// OpenTK is running on an Android device.
|
||||||
|
@ -154,12 +116,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Private Methods ---
|
|
||||||
|
|
||||||
#region private static string DetectUnixKernel()
|
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||||
struct utsname
|
struct utsname
|
||||||
{
|
{
|
||||||
|
@ -321,14 +277,6 @@ namespace OpenTK
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Internal Methods
|
|
||||||
|
|
||||||
// Detects the underlying OS and runtime.
|
// Detects the underlying OS and runtime.
|
||||||
internal static void Init(ToolkitOptions options)
|
internal static void Init(ToolkitOptions options)
|
||||||
{
|
{
|
||||||
|
@ -365,7 +313,5 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
#region --- License ---
|
/* Licensed under the MIT/X11 license.
|
||||||
/* Licensed under the MIT/X11 license.
|
|
||||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||||
* This notice may not be removed from any source distribution.
|
* This notice may not be removed from any source distribution.
|
||||||
* See license.txt for licensing detailed licensing details.
|
* See license.txt for licensing detailed licensing details.
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -17,8 +15,6 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public struct ContextHandle : IComparable<ContextHandle>, IEquatable<ContextHandle>
|
public struct ContextHandle : IComparable<ContextHandle>, IEquatable<ContextHandle>
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
IntPtr handle;
|
IntPtr handle;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -29,22 +25,12 @@ namespace OpenTK
|
||||||
/// <summary>A read-only field that represents a handle that has been initialized to zero.</summary>
|
/// <summary>A read-only field that represents a handle that has been initialized to zero.</summary>
|
||||||
public static readonly ContextHandle Zero = new ContextHandle(IntPtr.Zero);
|
public static readonly ContextHandle Zero = new ContextHandle(IntPtr.Zero);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance with the specified handle.
|
/// Constructs a new instance with the specified handle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="h">A System.IntPtr containing the value for this instance.</param>
|
/// <param name="h">A System.IntPtr containing the value for this instance.</param>
|
||||||
public ContextHandle(IntPtr h) { handle = h; }
|
public ContextHandle(IntPtr h) { handle = h; }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
#region ToString
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts this instance to its equivalent string representation.
|
/// Converts this instance to its equivalent string representation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -54,10 +40,6 @@ namespace OpenTK
|
||||||
return Handle.ToString();
|
return Handle.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Equals
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares this instance to the specified object.
|
/// Compares this instance to the specified object.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -70,10 +52,6 @@ namespace OpenTK
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region GetHashCode
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the hash code for this instance.
|
/// Returns the hash code for this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -83,10 +61,6 @@ namespace OpenTK
|
||||||
return Handle.GetHashCode();
|
return Handle.GetHashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static explicit operator IntPtr(ContextHandle c)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the specified ContextHandle to the equivalent IntPtr.
|
/// Converts the specified ContextHandle to the equivalent IntPtr.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -97,10 +71,6 @@ namespace OpenTK
|
||||||
return c != ContextHandle.Zero ? c.handle : IntPtr.Zero;
|
return c != ContextHandle.Zero ? c.handle : IntPtr.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static explicit operator ContextHandle(IntPtr p)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the specified IntPtr to the equivalent ContextHandle.
|
/// Converts the specified IntPtr to the equivalent ContextHandle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -111,10 +81,6 @@ namespace OpenTK
|
||||||
return new ContextHandle(p);
|
return new ContextHandle(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool operator ==(ContextHandle left, ContextHandle right)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares two ContextHandles for equality.
|
/// Compares two ContextHandles for equality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -126,10 +92,6 @@ namespace OpenTK
|
||||||
return left.Equals(right);
|
return left.Equals(right);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static bool operator !=(ContextHandle left, ContextHandle right)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares two ContextHandles for inequality.
|
/// Compares two ContextHandles for inequality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -141,12 +103,6 @@ namespace OpenTK
|
||||||
return !left.Equals(right);
|
return !left.Equals(right);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<ContextHandle> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the numerical value of this instance to the specified ContextHandle and
|
/// Compares the numerical value of this instance to the specified ContextHandle and
|
||||||
/// returns a value indicating their relative order.
|
/// returns a value indicating their relative order.
|
||||||
|
@ -158,10 +114,6 @@ namespace OpenTK
|
||||||
unsafe { return (int)((int*)other.handle.ToPointer() - (int*)this.handle.ToPointer()); }
|
unsafe { return (int)((int*)other.handle.ToPointer() - (int*)this.handle.ToPointer()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<ContextHandle> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares this instance to the specified ContextHandle for equality.
|
/// Compares this instance to the specified ContextHandle for equality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -171,7 +123,5 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
return Handle == other.Handle;
|
return Handle == other.Handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -43,8 +41,6 @@ namespace OpenTK
|
||||||
// TODO: Add properties that describe the 'usable' size of the Display, i.e. the maximized size without the taskbar etc.
|
// TODO: Add properties that describe the 'usable' size of the Display, i.e. the maximized size without the taskbar etc.
|
||||||
// TODO: Does not detect changes to primary device.
|
// TODO: Does not detect changes to primary device.
|
||||||
|
|
||||||
#region Fields
|
|
||||||
|
|
||||||
bool primary;
|
bool primary;
|
||||||
Rectangle bounds;
|
Rectangle bounds;
|
||||||
DisplayResolution current_resolution = new DisplayResolution();
|
DisplayResolution current_resolution = new DisplayResolution();
|
||||||
|
@ -59,10 +55,6 @@ namespace OpenTK
|
||||||
|
|
||||||
static Platform.IDisplayDeviceDriver implementation;
|
static Platform.IDisplayDeviceDriver implementation;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
static DisplayDevice()
|
static DisplayDevice()
|
||||||
{
|
{
|
||||||
implementation = Platform.Factory.Default.CreateDisplayDeviceDriver();
|
implementation = Platform.Factory.Default.CreateDisplayDeviceDriver();
|
||||||
|
@ -88,12 +80,6 @@ namespace OpenTK
|
||||||
this.Id = id;
|
this.Id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Public Methods ---
|
|
||||||
|
|
||||||
#region public Rectangle Bounds
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bounds of this instance in pixel coordinates..
|
/// Gets the bounds of this instance in pixel coordinates..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -108,24 +94,12 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int Width
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Int32 that contains the width of this display in pixels.</summary>
|
/// <summary>Gets a System.Int32 that contains the width of this display in pixels.</summary>
|
||||||
public int Width { get { return current_resolution.Width; } }
|
public int Width { get { return current_resolution.Width; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int Height
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Int32 that contains the height of this display in pixels.</summary>
|
/// <summary>Gets a System.Int32 that contains the height of this display in pixels.</summary>
|
||||||
public int Height { get { return current_resolution.Height; } }
|
public int Height { get { return current_resolution.Height; } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int BitsPerPixel
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.</summary>
|
/// <summary>Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.</summary>
|
||||||
public int BitsPerPixel
|
public int BitsPerPixel
|
||||||
{
|
{
|
||||||
|
@ -133,10 +107,6 @@ namespace OpenTK
|
||||||
internal set { current_resolution.BitsPerPixel = value; }
|
internal set { current_resolution.BitsPerPixel = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public float RefreshRate
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Single representing the vertical refresh rate of this display.
|
/// Gets a System.Single representing the vertical refresh rate of this display.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -146,10 +116,6 @@ namespace OpenTK
|
||||||
internal set { current_resolution.RefreshRate = value; }
|
internal set { current_resolution.RefreshRate = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public bool IsPrimary
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Boolean that indicates whether this Display is the primary Display in systems with multiple Displays.</summary>
|
/// <summary>Gets a System.Boolean that indicates whether this Display is the primary Display in systems with multiple Displays.</summary>
|
||||||
public bool IsPrimary
|
public bool IsPrimary
|
||||||
{
|
{
|
||||||
|
@ -168,10 +134,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public DisplayResolution SelectResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects an available resolution that matches the specified parameters.
|
/// Selects an available resolution that matches the specified parameters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -200,10 +162,6 @@ namespace OpenTK
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public IList<DisplayResolution> AvailableResolutions
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the list of <see cref="DisplayResolution"/> objects available on this device.
|
/// Gets the list of <see cref="DisplayResolution"/> objects available on this device.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -217,10 +175,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void ChangeResolution(DisplayResolution resolution)
|
|
||||||
|
|
||||||
/// <summary>Changes the resolution of the DisplayDevice.</summary>
|
/// <summary>Changes the resolution of the DisplayDevice.</summary>
|
||||||
/// <param name="resolution">The resolution to set. <see cref="DisplayDevice.SelectResolution"/></param>
|
/// <param name="resolution">The resolution to set. <see cref="DisplayDevice.SelectResolution"/></param>
|
||||||
/// <exception cref="Graphics.GraphicsModeException">Thrown if the requested resolution could not be set.</exception>
|
/// <exception cref="Graphics.GraphicsModeException">Thrown if the requested resolution could not be set.</exception>
|
||||||
|
@ -247,10 +201,6 @@ namespace OpenTK
|
||||||
//effect.FadeIn();
|
//effect.FadeIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void ChangeResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
|
||||||
|
|
||||||
/// <summary>Changes the resolution of the DisplayDevice.</summary>
|
/// <summary>Changes the resolution of the DisplayDevice.</summary>
|
||||||
/// <param name="width">The new width of the DisplayDevice.</param>
|
/// <param name="width">The new width of the DisplayDevice.</param>
|
||||||
/// <param name="height">The new height of the DisplayDevice.</param>
|
/// <param name="height">The new height of the DisplayDevice.</param>
|
||||||
|
@ -262,10 +212,6 @@ namespace OpenTK
|
||||||
this.ChangeResolution(this.SelectResolution(width, height, bitsPerPixel, refreshRate));
|
this.ChangeResolution(this.SelectResolution(width, height, bitsPerPixel, refreshRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void RestoreResolution()
|
|
||||||
|
|
||||||
/// <summary>Restores the original resolution of the DisplayDevice.</summary>
|
/// <summary>Restores the original resolution of the DisplayDevice.</summary>
|
||||||
/// <exception cref="Graphics.GraphicsModeException">Thrown if the original resolution could not be restored.</exception>
|
/// <exception cref="Graphics.GraphicsModeException">Thrown if the original resolution could not be restored.</exception>
|
||||||
public void RestoreResolution()
|
public void RestoreResolution()
|
||||||
|
@ -285,20 +231,12 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static DisplayDevice Default
|
|
||||||
|
|
||||||
/// <summary>Gets the default (primary) display of this system.</summary>
|
/// <summary>Gets the default (primary) display of this system.</summary>
|
||||||
public static DisplayDevice Default
|
public static DisplayDevice Default
|
||||||
{
|
{
|
||||||
get { return implementation.GetDisplay(DisplayIndex.Primary); }
|
get { return implementation.GetDisplay(DisplayIndex.Primary); }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region GetDisplay
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the <see cref="DisplayDevice"/> for the specified <see cref="DisplayIndex"/>.
|
/// Gets the <see cref="DisplayDevice"/> for the specified <see cref="DisplayIndex"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -309,14 +247,6 @@ namespace OpenTK
|
||||||
return implementation.GetDisplay(index);
|
return implementation.GetDisplay(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Internal Methods ---
|
|
||||||
|
|
||||||
#region internal DisplayResolution OriginalResolution
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the original resolution of this instance.
|
/// Gets the original resolution of this instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -326,10 +256,6 @@ namespace OpenTK
|
||||||
set { original_resolution = value; }
|
set { original_resolution = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region FromPoint
|
|
||||||
|
|
||||||
internal static DisplayDevice FromPoint(int x, int y)
|
internal static DisplayDevice FromPoint(int x, int y)
|
||||||
{
|
{
|
||||||
for (DisplayIndex i = DisplayIndex.First; i < DisplayIndex.Sixth; i++)
|
for (DisplayIndex i = DisplayIndex.First; i < DisplayIndex.Sixth; i++)
|
||||||
|
@ -346,14 +272,6 @@ namespace OpenTK
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Private Methods ---
|
|
||||||
|
|
||||||
#region DisplayResolution FindResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
|
||||||
|
|
||||||
DisplayResolution FindResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
DisplayResolution FindResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
||||||
{
|
{
|
||||||
return available_resolutions.Find(delegate(DisplayResolution test)
|
return available_resolutions.Find(delegate(DisplayResolution test)
|
||||||
|
@ -366,14 +284,6 @@ namespace OpenTK
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Overrides ---
|
|
||||||
|
|
||||||
#region public override string ToString()
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a System.String representing this DisplayDevice.
|
/// Returns a System.String representing this DisplayDevice.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -384,10 +294,6 @@ namespace OpenTK
|
||||||
Bounds.ToString(), available_resolutions.Count);
|
Bounds.ToString(), available_resolutions.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public override bool Equals(object obj)
|
|
||||||
|
|
||||||
///// <summary>Determines whether the specified DisplayDevices are equal.</summary>
|
///// <summary>Determines whether the specified DisplayDevices are equal.</summary>
|
||||||
///// <param name="obj">The System.Object to check against.</param>
|
///// <param name="obj">The System.Object to check against.</param>
|
||||||
///// <returns>True if the System.Object is an equal DisplayDevice; false otherwise.</returns>
|
///// <returns>True if the System.Object is an equal DisplayDevice; false otherwise.</returns>
|
||||||
|
@ -405,23 +311,13 @@ namespace OpenTK
|
||||||
// return false;
|
// return false;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public override int GetHashCode()
|
|
||||||
|
|
||||||
///// <summary>Returns a unique hash representing this DisplayDevice.</summary>
|
///// <summary>Returns a unique hash representing this DisplayDevice.</summary>
|
||||||
///// <returns>A System.Int32 that may serve as a hash code for this DisplayDevice.</returns>
|
///// <returns>A System.Int32 that may serve as a hash code for this DisplayDevice.</returns>
|
||||||
////public override int GetHashCode()
|
////public override int GetHashCode()
|
||||||
//{
|
//{
|
||||||
// return current_resolution.GetHashCode() ^ IsPrimary.GetHashCode() ^ available_resolutions.Count;
|
// return current_resolution.GetHashCode() ^ IsPrimary.GetHashCode() ^ available_resolutions.Count;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region --- FadeEffect ---
|
|
||||||
#if false
|
#if false
|
||||||
class FadeEffect : IDisposable
|
class FadeEffect : IDisposable
|
||||||
{
|
{
|
||||||
|
@ -525,16 +421,11 @@ namespace OpenTK
|
||||||
form.Visible = false;
|
form.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
foreach (Form form in forms)
|
foreach (Form form in forms)
|
||||||
form.Dispose();
|
form.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
#region --- License ---
|
|
||||||
/* Licensed under the MIT/X11 license.
|
/* Licensed under the MIT/X11 license.
|
||||||
* Copyright (c) 2006-2008 the OpenTK team.
|
* Copyright (c) 2006-2008 the OpenTK team.
|
||||||
* This notice may not be removed.
|
* This notice may not be removed.
|
||||||
* See license.txt for licensing detailed licensing details.
|
* See license.txt for licensing detailed licensing details.
|
||||||
*/
|
*/
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -23,12 +21,8 @@ namespace OpenTK
|
||||||
int bits_per_pixel;
|
int bits_per_pixel;
|
||||||
float refresh_rate;
|
float refresh_rate;
|
||||||
|
|
||||||
#region --- Constructors ---
|
|
||||||
|
|
||||||
internal DisplayResolution() { }
|
internal DisplayResolution() { }
|
||||||
|
|
||||||
#region public DisplayResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
|
||||||
|
|
||||||
// Creates a new DisplayResolution object for the primary DisplayDevice.
|
// Creates a new DisplayResolution object for the primary DisplayDevice.
|
||||||
internal DisplayResolution(int x, int y, int width, int height, int bitsPerPixel, float refreshRate)
|
internal DisplayResolution(int x, int y, int width, int height, int bitsPerPixel, float refreshRate)
|
||||||
{
|
{
|
||||||
|
@ -43,10 +37,6 @@ namespace OpenTK
|
||||||
this.refresh_rate = refreshRate;
|
this.refresh_rate = refreshRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public DisplayResolution(int width, int height, int bitsPerPixel, float refreshRate, DisplayDevice device)
|
|
||||||
|
|
||||||
#if false
|
#if false
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -75,13 +65,6 @@ namespace OpenTK
|
||||||
this.refresh_rate = res.refresh_rate;
|
this.refresh_rate = res.refresh_rate;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Public Methods ---
|
|
||||||
|
|
||||||
#region Bounds
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Drawing.Rectangle that contains the bounds of this display device.
|
/// Gets a System.Drawing.Rectangle that contains the bounds of this display device.
|
||||||
|
@ -93,10 +76,6 @@ namespace OpenTK
|
||||||
get { return bounds; }
|
get { return bounds; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int Width
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Int32 that contains the width of this display in pixels.</summary>
|
/// <summary>Gets a System.Int32 that contains the width of this display in pixels.</summary>
|
||||||
public int Width
|
public int Width
|
||||||
{
|
{
|
||||||
|
@ -104,10 +83,6 @@ namespace OpenTK
|
||||||
internal set { bounds.Width = value; }
|
internal set { bounds.Width = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int Height
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Int32 that contains the height of this display in pixels.</summary>
|
/// <summary>Gets a System.Int32 that contains the height of this display in pixels.</summary>
|
||||||
public int Height
|
public int Height
|
||||||
{
|
{
|
||||||
|
@ -115,10 +90,6 @@ namespace OpenTK
|
||||||
internal set { bounds.Height = value; }
|
internal set { bounds.Height = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public int BitsPerPixel
|
|
||||||
|
|
||||||
/// <summary>Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.</summary>
|
/// <summary>Gets a System.Int32 that contains number of bits per pixel of this display. Typical values include 8, 16, 24 and 32.</summary>
|
||||||
public int BitsPerPixel
|
public int BitsPerPixel
|
||||||
{
|
{
|
||||||
|
@ -126,10 +97,6 @@ namespace OpenTK
|
||||||
internal set { bits_per_pixel = value; }
|
internal set { bits_per_pixel = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public float RefreshRate
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Single representing the vertical refresh rate of this display.
|
/// Gets a System.Single representing the vertical refresh rate of this display.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -139,14 +106,6 @@ namespace OpenTK
|
||||||
internal set { refresh_rate = value; }
|
internal set { refresh_rate = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Overrides ---
|
|
||||||
|
|
||||||
#region public override string ToString()
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a System.String representing this DisplayResolution.
|
/// Returns a System.String representing this DisplayResolution.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -158,10 +117,6 @@ namespace OpenTK
|
||||||
#pragma warning restore 612,618
|
#pragma warning restore 612,618
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public override bool Equals(object obj)
|
|
||||||
|
|
||||||
/// <summary>Determines whether the specified resolutions are equal.</summary>
|
/// <summary>Determines whether the specified resolutions are equal.</summary>
|
||||||
/// <param name="obj">The System.Object to check against.</param>
|
/// <param name="obj">The System.Object to check against.</param>
|
||||||
/// <returns>True if the System.Object is an equal DisplayResolution; false otherwise.</returns>
|
/// <returns>True if the System.Object is an equal DisplayResolution; false otherwise.</returns>
|
||||||
|
@ -181,10 +136,6 @@ namespace OpenTK
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public override int GetHashCode()
|
|
||||||
|
|
||||||
/// <summary>Returns a unique hash representing this resolution.</summary>
|
/// <summary>Returns a unique hash representing this resolution.</summary>
|
||||||
/// <returns>A System.Int32 that may serve as a hash code for this resolution.</returns>
|
/// <returns>A System.Int32 that may serve as a hash code for this resolution.</returns>
|
||||||
public override int GetHashCode()
|
public override int GetHashCode()
|
||||||
|
@ -194,12 +145,6 @@ namespace OpenTK
|
||||||
#pragma warning restore 612,618
|
#pragma warning restore 612,618
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Operator Overloads ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares two instances for equality.
|
/// Compares two instances for equality.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -226,7 +171,5 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
return !(left == right);
|
return !(left == right);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -73,8 +71,6 @@ namespace OpenTK
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class GameWindow : NativeWindow, IGameWindow, IDisposable
|
public class GameWindow : NativeWindow, IGameWindow, IDisposable
|
||||||
{
|
{
|
||||||
#region --- Fields ---
|
|
||||||
|
|
||||||
const double MaxFrequency = 500.0; // Frequency cap for Update/RenderFrame events
|
const double MaxFrequency = 500.0; // Frequency cap for Update/RenderFrame events
|
||||||
|
|
||||||
readonly Stopwatch watch = new Stopwatch();
|
readonly Stopwatch watch = new Stopwatch();
|
||||||
|
@ -99,30 +95,16 @@ namespace OpenTK
|
||||||
FrameEventArgs update_args = new FrameEventArgs();
|
FrameEventArgs update_args = new FrameEventArgs();
|
||||||
FrameEventArgs render_args = new FrameEventArgs();
|
FrameEventArgs render_args = new FrameEventArgs();
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Contructors ---
|
|
||||||
|
|
||||||
#region public GameWindow()
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with sensible default attributes.</summary>
|
/// <summary>Constructs a new GameWindow with sensible default attributes.</summary>
|
||||||
public GameWindow()
|
public GameWindow()
|
||||||
: this(640, 480, GraphicsMode.Default, "OpenTK Game Window", 0, DisplayDevice.Default) { }
|
: this(640, 480, GraphicsMode.Default, "OpenTK Game Window", 0, DisplayDevice.Default) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
public GameWindow(int width, int height)
|
public GameWindow(int width, int height)
|
||||||
: this(width, height, GraphicsMode.Default, "OpenTK Game Window", 0, DisplayDevice.Default) { }
|
: this(width, height, GraphicsMode.Default, "OpenTK Game Window", 0, DisplayDevice.Default) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height, GraphicsMode mode)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
|
@ -130,10 +112,6 @@ namespace OpenTK
|
||||||
public GameWindow(int width, int height, GraphicsMode mode)
|
public GameWindow(int width, int height, GraphicsMode mode)
|
||||||
: this(width, height, mode, "OpenTK Game Window", 0, DisplayDevice.Default) { }
|
: this(width, height, mode, "OpenTK Game Window", 0, DisplayDevice.Default) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height, GraphicsMode mode, string title)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
|
@ -142,10 +120,6 @@ namespace OpenTK
|
||||||
public GameWindow(int width, int height, GraphicsMode mode, string title)
|
public GameWindow(int width, int height, GraphicsMode mode, string title)
|
||||||
: this(width, height, mode, title, 0, DisplayDevice.Default) { }
|
: this(width, height, mode, title, 0, DisplayDevice.Default) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
|
@ -155,10 +129,6 @@ namespace OpenTK
|
||||||
public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options)
|
public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options)
|
||||||
: this(width, height, mode, title, options, DisplayDevice.Default) { }
|
: this(width, height, mode, title, options, DisplayDevice.Default) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
|
@ -170,10 +140,6 @@ namespace OpenTK
|
||||||
: this(width, height, mode, title, options, device, 1, 0, GraphicsContextFlags.Default)
|
: this(width, height, mode, title, options, device, 1, 0, GraphicsContextFlags.Default)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device, int major, int minor, GraphicsContextFlags flags)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
|
@ -189,10 +155,6 @@ namespace OpenTK
|
||||||
: this(width, height, mode, title, options, device, major, minor, flags, null)
|
: this(width, height, mode, title, options, device, major, minor, flags, null)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device, int major, int minor, GraphicsContextFlags flags, IGraphicsContext sharedContext)
|
|
||||||
|
|
||||||
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
/// <summary>Constructs a new GameWindow with the specified attributes.</summary>
|
||||||
/// <param name="width">The width of the GameWindow in pixels.</param>
|
/// <param name="width">The width of the GameWindow in pixels.</param>
|
||||||
/// <param name="height">The height of the GameWindow in pixels.</param>
|
/// <param name="height">The height of the GameWindow in pixels.</param>
|
||||||
|
@ -228,16 +190,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Public Members ---
|
|
||||||
|
|
||||||
#region Methods
|
|
||||||
|
|
||||||
#region Dispose
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes of the GameWindow, releasing all resources consumed by it.
|
/// Disposes of the GameWindow, releasing all resources consumed by it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -265,10 +217,6 @@ namespace OpenTK
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Exit
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Closes the GameWindow. Equivalent to <see cref="NativeWindow.Close"/> method.
|
/// Closes the GameWindow. Equivalent to <see cref="NativeWindow.Close"/> method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -281,10 +229,6 @@ namespace OpenTK
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region MakeCurrent
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Makes the GraphicsContext current on the calling thread.
|
/// Makes the GraphicsContext current on the calling thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -294,10 +238,6 @@ namespace OpenTK
|
||||||
Context.MakeCurrent(WindowInfo);
|
Context.MakeCurrent(WindowInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnClose
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the NativeWindow is about to close.
|
/// Called when the NativeWindow is about to close.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -315,10 +255,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnLoad
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called after an OpenGL context has been established, but before entering the main loop.
|
/// Called after an OpenGL context has been established, but before entering the main loop.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -328,10 +264,6 @@ namespace OpenTK
|
||||||
Load(this, e);
|
Load(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnUnload
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called after GameWindow.Exit was called, but before destroying the OpenGL context.
|
/// Called after GameWindow.Exit was called, but before destroying the OpenGL context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -341,10 +273,6 @@ namespace OpenTK
|
||||||
Unload(this, e);
|
Unload(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void Run()
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enters the game loop of the GameWindow using the maximum update rate.
|
/// Enters the game loop of the GameWindow using the maximum update rate.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -354,10 +282,6 @@ namespace OpenTK
|
||||||
Run(0.0, 0.0);
|
Run(0.0, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void Run(double updateFrequency)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enters the game loop of the GameWindow using the specified update rate.
|
/// Enters the game loop of the GameWindow using the specified update rate.
|
||||||
/// maximum possible render frequency.
|
/// maximum possible render frequency.
|
||||||
|
@ -367,10 +291,6 @@ namespace OpenTK
|
||||||
Run(updateRate, 0.0);
|
Run(updateRate, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public void Run(double updates_per_second, double frames_per_second)
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enters the game loop of the GameWindow updating and rendering at the specified frequency.
|
/// Enters the game loop of the GameWindow updating and rendering at the specified frequency.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -521,10 +441,6 @@ namespace OpenTK
|
||||||
render_time = timestamp - render_timestamp;
|
render_time = timestamp - render_timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region SwapBuffers
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swaps the front and back buffer, presenting the rendered scene to the user.
|
/// Swaps the front and back buffer, presenting the rendered scene to the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -534,14 +450,6 @@ namespace OpenTK
|
||||||
this.Context.SwapBuffers();
|
this.Context.SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Properties
|
|
||||||
|
|
||||||
#region Context
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the opengl IGraphicsContext associated with the current GameWindow.
|
/// Returns the opengl IGraphicsContext associated with the current GameWindow.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -554,10 +462,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IsExiting
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether the shutdown sequence has been initiated
|
/// Gets a value indicating whether the shutdown sequence has been initiated
|
||||||
/// for this window, by calling GameWindow.Exit() or hitting the 'close' button.
|
/// for this window, by calling GameWindow.Exit() or hitting the 'close' button.
|
||||||
|
@ -573,24 +477,14 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- GameWindow Timing ---
|
|
||||||
|
|
||||||
// TODO: Disabled because it is not reliable enough. Use vsync as a workaround.
|
// TODO: Disabled because it is not reliable enough. Use vsync as a workaround.
|
||||||
|
|
||||||
//#region public bool AllowSleep
|
|
||||||
|
|
||||||
//public bool AllowSleep
|
//public bool AllowSleep
|
||||||
//{
|
//{
|
||||||
// get { return allow_sleep; }
|
// get { return allow_sleep; }
|
||||||
// set { allow_sleep = value; }
|
// set { allow_sleep = value; }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
#region RenderFrequency
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a double representing the actual frequency of RenderFrame events, in hertz (i.e. fps or frames per second).
|
/// Gets a double representing the actual frequency of RenderFrame events, in hertz (i.e. fps or frames per second).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -605,10 +499,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region RenderPeriod
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a double representing the period of RenderFrame events, in seconds.
|
/// Gets a double representing the period of RenderFrame events, in seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -621,10 +511,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region RenderTime
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a double representing the time spent in the RenderFrame function, in seconds.
|
/// Gets a double representing the time spent in the RenderFrame function, in seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -642,10 +528,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region TargetRenderFrequency
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a double representing the target render frequency, in hertz.
|
/// Gets or sets a double representing the target render frequency, in hertz.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -677,10 +559,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region TargetRenderPeriod
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a double representing the target render period, in seconds.
|
/// Gets or sets a double representing the target render period, in seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -710,10 +588,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region TargetUpdateFrequency
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a double representing the target update frequency, in hertz.
|
/// Gets or sets a double representing the target update frequency, in hertz.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -745,10 +619,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region TargetUpdatePeriod
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a double representing the target update period, in seconds.
|
/// Gets or sets a double representing the target update period, in seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -778,10 +648,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region UpdateFrequency
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a double representing the frequency of UpdateFrame events, in hertz.
|
/// Gets a double representing the frequency of UpdateFrame events, in hertz.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -796,10 +662,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region UpdatePeriod
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a double representing the period of UpdateFrame events, in seconds.
|
/// Gets a double representing the period of UpdateFrame events, in seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -812,10 +674,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region UpdateTime
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a double representing the time spent in the UpdateFrame function, in seconds.
|
/// Gets a double representing the time spent in the UpdateFrame function, in seconds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -828,12 +686,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region VSync
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the VSyncMode.
|
/// Gets or sets the VSyncMode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -877,10 +729,6 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region WindowState
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or states the state of the NativeWindow.
|
/// Gets or states the state of the NativeWindow.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -899,12 +747,6 @@ namespace OpenTK
|
||||||
Context.Update(WindowInfo);
|
Context.Update(WindowInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Events
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs before the window is displayed for the first time.
|
/// Occurs before the window is displayed for the first time.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -925,24 +767,12 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler<FrameEventArgs> UpdateFrame = delegate { };
|
public event EventHandler<FrameEventArgs> UpdateFrame = delegate { };
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Protected Members ---
|
|
||||||
|
|
||||||
#region Dispose
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Override to add custom cleanup logic.
|
/// Override to add custom cleanup logic.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="manual">True, if this method was called by the application; false if this was called by the finalizer thread.</param>
|
/// <param name="manual">True, if this method was called by the application; false if this was called by the finalizer thread.</param>
|
||||||
protected virtual void Dispose(bool manual) { }
|
protected virtual void Dispose(bool manual) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnRenderFrame
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the frame is rendered.
|
/// Called when the frame is rendered.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -955,10 +785,6 @@ namespace OpenTK
|
||||||
RenderFrame(this, e);
|
RenderFrame(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnUpdateFrame
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the frame is updated.
|
/// Called when the frame is updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -971,20 +797,12 @@ namespace OpenTK
|
||||||
UpdateFrame(this, e);
|
UpdateFrame(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnWindowInfoChanged
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when the WindowInfo for this GameWindow has changed.
|
/// Called when the WindowInfo for this GameWindow has changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="e">Not used.</param>
|
/// <param name="e">Not used.</param>
|
||||||
protected virtual void OnWindowInfoChanged(EventArgs e) { }
|
protected virtual void OnWindowInfoChanged(EventArgs e) { }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnResize
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when this window is resized.
|
/// Called when this window is resized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1000,55 +818,25 @@ namespace OpenTK
|
||||||
glContext.Update(base.WindowInfo);
|
glContext.Update(base.WindowInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Private Members ---
|
|
||||||
|
|
||||||
#region OnLoadInternal
|
|
||||||
|
|
||||||
private void OnLoadInternal(EventArgs e)
|
private void OnLoadInternal(EventArgs e)
|
||||||
{
|
{
|
||||||
OnLoad(e);
|
OnLoad(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnRenderFrameInternal
|
|
||||||
|
|
||||||
private void OnRenderFrameInternal(FrameEventArgs e) { if (Exists && !isExiting) OnRenderFrame(e); }
|
private void OnRenderFrameInternal(FrameEventArgs e) { if (Exists && !isExiting) OnRenderFrame(e); }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnUnloadInternal
|
|
||||||
|
|
||||||
private void OnUnloadInternal(EventArgs e) { OnUnload(e); }
|
private void OnUnloadInternal(EventArgs e) { OnUnload(e); }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnUpdateFrameInternal
|
|
||||||
|
|
||||||
private void OnUpdateFrameInternal(FrameEventArgs e) { if (Exists && !isExiting) OnUpdateFrame(e); }
|
private void OnUpdateFrameInternal(FrameEventArgs e) { if (Exists && !isExiting) OnUpdateFrame(e); }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region OnWindowInfoChangedInternal
|
|
||||||
|
|
||||||
private void OnWindowInfoChangedInternal(EventArgs e)
|
private void OnWindowInfoChangedInternal(EventArgs e)
|
||||||
{
|
{
|
||||||
glContext.MakeCurrent(WindowInfo);
|
glContext.MakeCurrent(WindowInfo);
|
||||||
|
|
||||||
OnWindowInfoChanged(e);
|
OnWindowInfoChanged(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region public enum VSyncMode
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enumerates available VSync modes.
|
/// Enumerates available VSync modes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1068,6 +856,4 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Adaptive,
|
Adaptive,
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
// Copyright (c) 2006 - 2008 the Open Toolkit library, except where noted.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -41,8 +39,6 @@ namespace OpenTK.Graphics
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public struct Color4 : IEquatable<Color4>
|
public struct Color4 : IEquatable<Color4>
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The red component of this Color4 structure.
|
/// The red component of this Color4 structure.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -63,10 +59,6 @@ namespace OpenTK.Graphics
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float A;
|
public float A;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new Color4 structure from the specified components.
|
/// Constructs a new Color4 structure from the specified components.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -97,10 +89,6 @@ namespace OpenTK.Graphics
|
||||||
A = a / (float)Byte.MaxValue;
|
A = a / (float)Byte.MaxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts this color to an integer representation with 8 bits per channel.
|
/// Converts this color to an integer representation with 8 bits per channel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -194,8 +182,6 @@ namespace OpenTK.Graphics
|
||||||
return String.Format("{{(R, G, B, A) = ({0}, {1}, {2}, {3})}}", R.ToString(), G.ToString(), B.ToString(), A.ToString());
|
return String.Format("{{(R, G, B, A) = ({0}, {1}, {2}, {3})}}", R.ToString(), G.ToString(), B.ToString(), A.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
#region System colors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the system color with (R, G, B, A) = (255, 255, 255, 0).
|
/// Gets the system color with (R, G, B, A) = (255, 255, 255, 0).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -901,14 +887,6 @@ namespace OpenTK.Graphics
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static Color4 YellowGreen { get { return new Color4(154, 205, 50, 255); } }
|
public static Color4 YellowGreen { get { return new Color4(154, 205, 50, 255); } }
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Color conversions
|
|
||||||
|
|
||||||
#region sRGB
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts sRGB color values to RGB color values.
|
/// Converts sRGB color values to RGB color values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -993,10 +971,6 @@ namespace OpenTK.Graphics
|
||||||
return new Color4(r, g, b, rgb.A);
|
return new Color4(r, g, b, rgb.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region HSL
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts HSL color values to RGB color values.
|
/// Converts HSL color values to RGB color values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1113,10 +1087,6 @@ namespace OpenTK.Graphics
|
||||||
return new Vector4(hue, saturation, lightness, rgb.A);
|
return new Vector4(hue, saturation, lightness, rgb.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region HSV
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts HSV color values to RGB color values.
|
/// Converts HSV color values to RGB color values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1227,10 +1197,6 @@ namespace OpenTK.Graphics
|
||||||
return new Vector4(hue, saturation, M, rgb.A);
|
return new Vector4(hue, saturation, M, rgb.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region XYZ
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts XYZ color values to RGB color values.
|
/// Converts XYZ color values to RGB color values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1267,10 +1233,6 @@ namespace OpenTK.Graphics
|
||||||
return new Vector4(x, y, z, rgb.A);
|
return new Vector4(x, y, z, rgb.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region YUV
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts YCbCr color values to RGB color values.
|
/// Converts YCbCr color values to RGB color values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1308,10 +1270,6 @@ namespace OpenTK.Graphics
|
||||||
return new Vector4(y, u, v, rgb.A);
|
return new Vector4(y, u, v, rgb.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region HCY
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts HCY color values to RGB color values.
|
/// Converts HCY color values to RGB color values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1416,12 +1374,6 @@ namespace OpenTK.Graphics
|
||||||
return new Vector4(hue, C, luminance, rgb.A);
|
return new Vector4(hue, C, luminance, rgb.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<Color4> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares whether this Color4 structure is equal to the specified Color4.
|
/// Compares whether this Color4 structure is equal to the specified Color4.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1435,7 +1387,5 @@ namespace OpenTK.Graphics
|
||||||
this.B == other.B &&
|
this.B == other.B &&
|
||||||
this.A == other.A;
|
this.A == other.A;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -42,8 +40,6 @@ namespace OpenTK.Graphics
|
||||||
bool isIndexed;
|
bool isIndexed;
|
||||||
int bitsPerPixel;
|
int bitsPerPixel;
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new ColorFormat with the specified aggregate bits per pixel.
|
/// Constructs a new ColorFormat with the specified aggregate bits per pixel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -113,10 +109,6 @@ namespace OpenTK.Graphics
|
||||||
this.isIndexed = true;
|
this.isIndexed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
/// <summary>Gets the bits per pixel for the Red channel.</summary>
|
/// <summary>Gets the bits per pixel for the Red channel.</summary>
|
||||||
public int Red { get { return red; } private set { red = (byte)value; } }
|
public int Red { get { return red; } private set { red = (byte)value; } }
|
||||||
/// <summary>Gets the bits per pixel for the Green channel.</summary>
|
/// <summary>Gets the bits per pixel for the Green channel.</summary>
|
||||||
|
@ -135,10 +127,6 @@ namespace OpenTK.Graphics
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly ColorFormat Empty = new ColorFormat(0);
|
public static readonly ColorFormat Empty = new ColorFormat(0);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Operator Overloads
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Converts the specified bpp into a new ColorFormat.
|
/// Converts the specified bpp into a new ColorFormat.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -154,10 +142,6 @@ namespace OpenTK.Graphics
|
||||||
// return mode.BitsPerPixel;
|
// return mode.BitsPerPixel;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IComparable<ColorFormat> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares two instances.
|
/// Compares two instances.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -179,10 +163,6 @@ namespace OpenTK.Graphics
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IEquatable<ColorFormat> Members
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares whether this ColorFormat structure is equal to the specified ColorFormat.
|
/// Compares whether this ColorFormat structure is equal to the specified ColorFormat.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -197,10 +177,6 @@ namespace OpenTK.Graphics
|
||||||
Alpha == other.Alpha;
|
Alpha == other.Alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Overrides
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates whether this instance and a specified object are equal.
|
/// Indicates whether this instance and a specified object are equal.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -294,7 +270,5 @@ namespace OpenTK.Graphics
|
||||||
{
|
{
|
||||||
return string.Format("{0} ({1})", BitsPerPixel, (IsIndexed ? " indexed" : Red.ToString() + Green.ToString() + Blue.ToString() + Alpha.ToString()));
|
return string.Format("{0} ({1})", BitsPerPixel, (IsIndexed ? " indexed" : Red.ToString() + Green.ToString() + Blue.ToString() + Alpha.ToString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace OpenTK.Graphics.ES10
|
namespace OpenTK.Graphics.ES10
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace OpenTK.Graphics.ES10
|
namespace OpenTK.Graphics.ES10
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -44,17 +42,11 @@ namespace OpenTK.Graphics.ES10
|
||||||
// as that would cause infinite recursion!
|
// as that would cause infinite recursion!
|
||||||
struct ErrorHelper : IDisposable
|
struct ErrorHelper : IDisposable
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
static readonly object SyncRoot = new object();
|
static readonly object SyncRoot = new object();
|
||||||
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
||||||
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
||||||
readonly GraphicsContext Context;
|
readonly GraphicsContext Context;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public ErrorHelper(IGraphicsContext context)
|
public ErrorHelper(IGraphicsContext context)
|
||||||
{
|
{
|
||||||
if (context == null)
|
if (context == null)
|
||||||
|
@ -69,10 +61,6 @@ namespace OpenTK.Graphics.ES10
|
||||||
ResetErrors();
|
ResetErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
// Retrieve all OpenGL errors to clear the error list.
|
// Retrieve all OpenGL errors to clear the error list.
|
||||||
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
||||||
[Conditional("DEBUG")]
|
[Conditional("DEBUG")]
|
||||||
|
@ -120,15 +108,9 @@ namespace OpenTK.Graphics.ES10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
CheckErrors();
|
CheckErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// ES11Obsolete.cs
|
// ES11Obsolete.cs
|
||||||
//
|
//
|
||||||
// Author:
|
// Author:
|
||||||
|
@ -25,7 +24,6 @@
|
||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
// THE SOFTWARE.
|
// THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -44,17 +42,11 @@ namespace OpenTK.Graphics.ES11
|
||||||
// as that would cause infinite recursion!
|
// as that would cause infinite recursion!
|
||||||
struct ErrorHelper : IDisposable
|
struct ErrorHelper : IDisposable
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
static readonly object SyncRoot = new object();
|
static readonly object SyncRoot = new object();
|
||||||
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
||||||
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
||||||
readonly GraphicsContext Context;
|
readonly GraphicsContext Context;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public ErrorHelper(IGraphicsContext context)
|
public ErrorHelper(IGraphicsContext context)
|
||||||
{
|
{
|
||||||
if (context == null)
|
if (context == null)
|
||||||
|
@ -69,10 +61,6 @@ namespace OpenTK.Graphics.ES11
|
||||||
ResetErrors();
|
ResetErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
// Retrieve all OpenGL errors to clear the error list.
|
// Retrieve all OpenGL errors to clear the error list.
|
||||||
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
||||||
[Conditional("DEBUG")]
|
[Conditional("DEBUG")]
|
||||||
|
@ -120,15 +108,9 @@ namespace OpenTK.Graphics.ES11
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
CheckErrors();
|
CheckErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,6 @@ namespace OpenTK.Graphics.ES11
|
||||||
static byte[] EntryPointNames;
|
static byte[] EntryPointNames;
|
||||||
static int[] EntryPointNameOffsets;
|
static int[] EntryPointNameOffsets;
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance.
|
/// Constructs a new instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -35,10 +33,6 @@ namespace OpenTK.Graphics.ES11
|
||||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Protected Members ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a synchronization token unique for the GL class.
|
/// Returns a synchronization token unique for the GL class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -47,7 +41,5 @@ namespace OpenTK.Graphics.ES11
|
||||||
get { return sync_root; }
|
get { return sync_root; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -44,17 +42,11 @@ namespace OpenTK.Graphics.ES20
|
||||||
// as that would cause infinite recursion!
|
// as that would cause infinite recursion!
|
||||||
struct ErrorHelper : IDisposable
|
struct ErrorHelper : IDisposable
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
static readonly object SyncRoot = new object();
|
static readonly object SyncRoot = new object();
|
||||||
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
||||||
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
||||||
readonly GraphicsContext Context;
|
readonly GraphicsContext Context;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public ErrorHelper(IGraphicsContext context)
|
public ErrorHelper(IGraphicsContext context)
|
||||||
{
|
{
|
||||||
if (context == null)
|
if (context == null)
|
||||||
|
@ -69,10 +61,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
ResetErrors();
|
ResetErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
// Retrieve all OpenGL errors to clear the error list.
|
// Retrieve all OpenGL errors to clear the error list.
|
||||||
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
||||||
[Conditional("DEBUG")]
|
[Conditional("DEBUG")]
|
||||||
|
@ -120,15 +108,9 @@ namespace OpenTK.Graphics.ES20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
CheckErrors();
|
CheckErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -51,8 +49,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
static byte[] EntryPointNames;
|
static byte[] EntryPointNames;
|
||||||
static int[] EntryPointNameOffsets;
|
static int[] EntryPointNameOffsets;
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance.
|
/// Constructs a new instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -63,10 +59,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Protected Members ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a synchronization token unique for the GL class.
|
/// Returns a synchronization token unique for the GL class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -75,10 +67,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
get { return sync_root; }
|
get { return sync_root; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Helper Overloads
|
|
||||||
|
|
||||||
#pragma warning disable 3019
|
#pragma warning disable 3019
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
#pragma warning disable 1572
|
#pragma warning disable 1572
|
||||||
|
@ -87,8 +75,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
|
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
|
||||||
// We work around this issue by doubling the StringBuilder capacity.
|
// We work around this issue by doubling the StringBuilder capacity.
|
||||||
|
|
||||||
#region public static void ClearColor() overloads
|
|
||||||
|
|
||||||
public static void ClearColor(Color color)
|
public static void ClearColor(Color color)
|
||||||
{
|
{
|
||||||
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||||
|
@ -99,10 +85,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
GL.ClearColor(color.R, color.G, color.B, color.A);
|
GL.ClearColor(color.R, color.G, color.B, color.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void BlendColor() overloads
|
|
||||||
|
|
||||||
public static void BlendColor(Color color)
|
public static void BlendColor(Color color)
|
||||||
{
|
{
|
||||||
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||||
|
@ -113,10 +95,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
GL.BlendColor(color.R, color.G, color.B, color.A);
|
GL.BlendColor(color.R, color.G, color.B, color.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Uniform
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void Uniform2(int location, ref Vector2 vector)
|
public static void Uniform2(int location, ref Vector2 vector)
|
||||||
{
|
{
|
||||||
|
@ -194,12 +172,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Shaders
|
|
||||||
|
|
||||||
#region GetActiveAttrib
|
|
||||||
|
|
||||||
public static string GetActiveAttrib(int program, int index, out int size, out ActiveAttribType type)
|
public static string GetActiveAttrib(int program, int index, out int size, out ActiveAttribType type)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
|
@ -210,10 +182,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region GetActiveUniform
|
|
||||||
|
|
||||||
public static string GetActiveUniform(int program, int uniformIndex, out int size, out ActiveUniformType type)
|
public static string GetActiveUniform(int program, int uniformIndex, out int size, out ActiveUniformType type)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
|
@ -224,10 +192,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void ShaderSource(Int32 shader, System.String @string)
|
|
||||||
|
|
||||||
public static void ShaderSource(Int32 shader, System.String @string)
|
public static void ShaderSource(Int32 shader, System.String @string)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -237,10 +201,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static string GetShaderInfoLog(Int32 shader)
|
|
||||||
|
|
||||||
public static string GetShaderInfoLog(Int32 shader)
|
public static string GetShaderInfoLog(Int32 shader)
|
||||||
{
|
{
|
||||||
string info;
|
string info;
|
||||||
|
@ -248,10 +208,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void GetShaderInfoLog(Int32 shader, out string info)
|
|
||||||
|
|
||||||
public static void GetShaderInfoLog(Int32 shader, out string info)
|
public static void GetShaderInfoLog(Int32 shader, out string info)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -269,10 +225,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static string GetProgramInfoLog(Int32 program)
|
|
||||||
|
|
||||||
public static string GetProgramInfoLog(Int32 program)
|
public static string GetProgramInfoLog(Int32 program)
|
||||||
{
|
{
|
||||||
string info;
|
string info;
|
||||||
|
@ -280,10 +232,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void GetProgramInfoLog(Int32 program, out string info)
|
|
||||||
|
|
||||||
public static void GetProgramInfoLog(Int32 program, out string info)
|
public static void GetProgramInfoLog(Int32 program, out string info)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -300,69 +248,39 @@ namespace OpenTK.Graphics.ES20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib2(index, v.X, v.Y);
|
GL.VertexAttrib2(index, v.X, v.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib2(Int32 index, Vector2 v)
|
|
||||||
|
|
||||||
public static void VertexAttrib2(Int32 index, Vector2 v)
|
public static void VertexAttrib2(Int32 index, Vector2 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib2(index, v.X, v.Y);
|
GL.VertexAttrib2(index, v.X, v.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib3(Int32 index, Vector3 v)
|
|
||||||
|
|
||||||
public static void VertexAttrib3(Int32 index, Vector3 v)
|
public static void VertexAttrib3(Int32 index, Vector3 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib4(Int32 index, Vector4 v)
|
|
||||||
|
|
||||||
public static void VertexAttrib4(Int32 index, Vector4 v)
|
public static void VertexAttrib4(Int32 index, Vector4 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region VertexAttribPointer
|
|
||||||
|
|
||||||
public static void VertexAttribPointer(int index, int size, VertexAttribPointerType type, bool normalized, int stride, int offset)
|
public static void VertexAttribPointer(int index, int size, VertexAttribPointerType type, bool normalized, int stride, int offset)
|
||||||
{
|
{
|
||||||
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
||||||
|
@ -374,19 +292,11 @@ namespace OpenTK.Graphics.ES20
|
||||||
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region DrawElements
|
|
||||||
|
|
||||||
public static void DrawElements(BeginMode mode, int count, DrawElementsType type, int offset)
|
public static void DrawElements(BeginMode mode, int count, DrawElementsType type, int offset)
|
||||||
{
|
{
|
||||||
DrawElements((PrimitiveType)mode, count, type, new IntPtr(offset));
|
DrawElements((PrimitiveType)mode, count, type, new IntPtr(offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Get[Float|Double]
|
|
||||||
|
|
||||||
public static void GetFloat(GetPName pname, out Vector2 vector)
|
public static void GetFloat(GetPName pname, out Vector2 vector)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -423,10 +333,6 @@ namespace OpenTK.Graphics.ES20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Viewport
|
|
||||||
|
|
||||||
public static void Viewport(Size size)
|
public static void Viewport(Size size)
|
||||||
{
|
{
|
||||||
GL.Viewport(0, 0, size.Width, size.Height);
|
GL.Viewport(0, 0, size.Width, size.Height);
|
||||||
|
@ -452,14 +358,11 @@ namespace OpenTK.Graphics.ES20
|
||||||
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
|
||||||
|
|
||||||
#pragma warning restore 3019
|
#pragma warning restore 3019
|
||||||
#pragma warning restore 1591
|
#pragma warning restore 1591
|
||||||
#pragma warning restore 1572
|
#pragma warning restore 1572
|
||||||
#pragma warning restore 1573
|
#pragma warning restore 1573
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -44,17 +42,11 @@ namespace OpenTK.Graphics.ES30
|
||||||
// as that would cause infinite recursion!
|
// as that would cause infinite recursion!
|
||||||
struct ErrorHelper : IDisposable
|
struct ErrorHelper : IDisposable
|
||||||
{
|
{
|
||||||
#region Fields
|
|
||||||
|
|
||||||
static readonly object SyncRoot = new object();
|
static readonly object SyncRoot = new object();
|
||||||
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
static readonly Dictionary<GraphicsContext, List<ErrorCode>> ContextErrors =
|
||||||
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
new Dictionary<GraphicsContext, List<ErrorCode>>();
|
||||||
readonly GraphicsContext Context;
|
readonly GraphicsContext Context;
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
public ErrorHelper(IGraphicsContext context)
|
public ErrorHelper(IGraphicsContext context)
|
||||||
{
|
{
|
||||||
if (context == null)
|
if (context == null)
|
||||||
|
@ -69,10 +61,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
ResetErrors();
|
ResetErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Public Members
|
|
||||||
|
|
||||||
// Retrieve all OpenGL errors to clear the error list.
|
// Retrieve all OpenGL errors to clear the error list.
|
||||||
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
// See http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/geterror.html
|
||||||
[Conditional("DEBUG")]
|
[Conditional("DEBUG")]
|
||||||
|
@ -120,15 +108,9 @@ namespace OpenTK.Graphics.ES30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IDisposable Members
|
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
CheckErrors();
|
CheckErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#region License
|
//
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
// Copyright (c) 2006 - 2013 the Open Toolkit library.
|
// Copyright (c) 2006 - 2013 the Open Toolkit library.
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -51,8 +49,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
static byte[] EntryPointNames;
|
static byte[] EntryPointNames;
|
||||||
static int[] EntryPointNameOffsets;
|
static int[] EntryPointNameOffsets;
|
||||||
|
|
||||||
#region Constructors
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new instance.
|
/// Constructs a new instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -63,10 +59,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
_EntryPointNameOffsetsInstance = EntryPointNameOffsets;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region --- Protected Members ---
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a synchronization token unique for the GL class.
|
/// Returns a synchronization token unique for the GL class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -75,10 +67,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
get { return sync_root; }
|
get { return sync_root; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Helper Overloads
|
|
||||||
|
|
||||||
#pragma warning disable 3019
|
#pragma warning disable 3019
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
#pragma warning disable 1572
|
#pragma warning disable 1572
|
||||||
|
@ -87,8 +75,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
|
// Note: Mono 1.9.1 truncates StringBuilder results (for 'out string' parameters).
|
||||||
// We work around this issue by doubling the StringBuilder capacity.
|
// We work around this issue by doubling the StringBuilder capacity.
|
||||||
|
|
||||||
#region public static void ClearColor() overloads
|
|
||||||
|
|
||||||
public static void ClearColor(Color color)
|
public static void ClearColor(Color color)
|
||||||
{
|
{
|
||||||
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
GL.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||||
|
@ -99,10 +85,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
GL.ClearColor(color.R, color.G, color.B, color.A);
|
GL.ClearColor(color.R, color.G, color.B, color.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void BlendColor() overloads
|
|
||||||
|
|
||||||
public static void BlendColor(Color color)
|
public static void BlendColor(Color color)
|
||||||
{
|
{
|
||||||
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
GL.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
|
||||||
|
@ -113,10 +95,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
GL.BlendColor(color.R, color.G, color.B, color.A);
|
GL.BlendColor(color.R, color.G, color.B, color.A);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Uniform
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void Uniform2(int location, ref Vector2 vector)
|
public static void Uniform2(int location, ref Vector2 vector)
|
||||||
{
|
{
|
||||||
|
@ -194,12 +172,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Shaders
|
|
||||||
|
|
||||||
#region GetActiveAttrib
|
|
||||||
|
|
||||||
public static string GetActiveAttrib(int program, int index, out int size, out ActiveAttribType type)
|
public static string GetActiveAttrib(int program, int index, out int size, out ActiveAttribType type)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
|
@ -210,10 +182,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region GetActiveUniform
|
|
||||||
|
|
||||||
public static string GetActiveUniform(int program, int uniformIndex, out int size, out ActiveUniformType type)
|
public static string GetActiveUniform(int program, int uniformIndex, out int size, out ActiveUniformType type)
|
||||||
{
|
{
|
||||||
int length;
|
int length;
|
||||||
|
@ -224,10 +192,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void ShaderSource(Int32 shader, System.String @string)
|
|
||||||
|
|
||||||
public static void ShaderSource(Int32 shader, System.String @string)
|
public static void ShaderSource(Int32 shader, System.String @string)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -237,10 +201,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static string GetShaderInfoLog(Int32 shader)
|
|
||||||
|
|
||||||
public static string GetShaderInfoLog(Int32 shader)
|
public static string GetShaderInfoLog(Int32 shader)
|
||||||
{
|
{
|
||||||
string info;
|
string info;
|
||||||
|
@ -248,10 +208,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void GetShaderInfoLog(Int32 shader, out string info)
|
|
||||||
|
|
||||||
public static void GetShaderInfoLog(Int32 shader, out string info)
|
public static void GetShaderInfoLog(Int32 shader, out string info)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -269,10 +225,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static string GetProgramInfoLog(Int32 program)
|
|
||||||
|
|
||||||
public static string GetProgramInfoLog(Int32 program)
|
public static string GetProgramInfoLog(Int32 program)
|
||||||
{
|
{
|
||||||
string info;
|
string info;
|
||||||
|
@ -280,10 +232,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void GetProgramInfoLog(Int32 program, out string info)
|
|
||||||
|
|
||||||
public static void GetProgramInfoLog(Int32 program, out string info)
|
public static void GetProgramInfoLog(Int32 program, out string info)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -300,69 +248,39 @@ namespace OpenTK.Graphics.ES30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
public static void VertexAttrib2(Int32 index, ref Vector2 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib2(index, v.X, v.Y);
|
GL.VertexAttrib2(index, v.X, v.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
public static void VertexAttrib3(Int32 index, ref Vector3 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
public static void VertexAttrib4(Int32 index, ref Vector4 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib2(Int32 index, Vector2 v)
|
|
||||||
|
|
||||||
public static void VertexAttrib2(Int32 index, Vector2 v)
|
public static void VertexAttrib2(Int32 index, Vector2 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib2(index, v.X, v.Y);
|
GL.VertexAttrib2(index, v.X, v.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib3(Int32 index, Vector3 v)
|
|
||||||
|
|
||||||
public static void VertexAttrib3(Int32 index, Vector3 v)
|
public static void VertexAttrib3(Int32 index, Vector3 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
GL.VertexAttrib3(index, v.X, v.Y, v.Z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region public static void VertexAttrib4(Int32 index, Vector4 v)
|
|
||||||
|
|
||||||
public static void VertexAttrib4(Int32 index, Vector4 v)
|
public static void VertexAttrib4(Int32 index, Vector4 v)
|
||||||
{
|
{
|
||||||
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
GL.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region VertexAttribPointer
|
|
||||||
|
|
||||||
public static void VertexAttribPointer(int index, int size, VertexAttribPointerType type, bool normalized, int stride, int offset)
|
public static void VertexAttribPointer(int index, int size, VertexAttribPointerType type, bool normalized, int stride, int offset)
|
||||||
{
|
{
|
||||||
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
||||||
|
@ -374,10 +292,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Get[Float|Double]
|
|
||||||
|
|
||||||
public static void GetFloat(GetPName pname, out Vector2 vector)
|
public static void GetFloat(GetPName pname, out Vector2 vector)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
@ -414,10 +328,6 @@ namespace OpenTK.Graphics.ES30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Viewport
|
|
||||||
|
|
||||||
public static void Viewport(Size size)
|
public static void Viewport(Size size)
|
||||||
{
|
{
|
||||||
GL.Viewport(0, 0, size.Width, size.Height);
|
GL.Viewport(0, 0, size.Width, size.Height);
|
||||||
|
@ -443,14 +353,11 @@ namespace OpenTK.Graphics.ES30
|
||||||
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
GL.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
|
||||||
|
|
||||||
#pragma warning restore 3019
|
#pragma warning restore 3019
|
||||||
#pragma warning restore 1591
|
#pragma warning restore 1591
|
||||||
#pragma warning restore 1572
|
#pragma warning restore 1572
|
||||||
#pragma warning restore 1573
|
#pragma warning restore 1573
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#region License
|
|
||||||
//
|
//
|
||||||
// The Open Toolkit Library License
|
// The Open Toolkit Library License
|
||||||
//
|
//
|
||||||
|
@ -23,7 +22,6 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
// OTHER DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue