mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-29 00:01:11 +00:00
Fixed all known build warnings, apart from missing xml comments.
This commit is contained in:
parent
3d90312109
commit
9265747541
|
@ -23,7 +23,7 @@ namespace OpenTK.Audio
|
||||||
#region --- Fields ---
|
#region --- Fields ---
|
||||||
|
|
||||||
bool disposed;
|
bool disposed;
|
||||||
bool is_processing;
|
bool is_processing, is_synchronized;
|
||||||
IntPtr device_handle;
|
IntPtr device_handle;
|
||||||
ContextHandle context_handle;
|
ContextHandle context_handle;
|
||||||
bool context_exists;
|
bool context_exists;
|
||||||
|
@ -62,7 +62,6 @@ namespace OpenTK.Audio
|
||||||
#region public 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>
|
||||||
/// <exception cref="NotSupportedException">Occurs when no audio devices are available.</exception>
|
|
||||||
public AudioContext()
|
public AudioContext()
|
||||||
: this(null, 0, 0, false, true) { }
|
: this(null, 0, 0, false, true) { }
|
||||||
|
|
||||||
|
@ -89,7 +88,6 @@ namespace OpenTK.Audio
|
||||||
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
|
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
|
||||||
/// devices.
|
/// devices.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="AudioContext(string device, int freq, int refresh, bool sync, int maxEfxSends)"/>
|
|
||||||
public AudioContext(string device, int freq) : this(device, freq, 0, false, true) { }
|
public AudioContext(string device, int freq) : this(device, freq, 0, false, true) { }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -104,7 +102,6 @@ namespace OpenTK.Audio
|
||||||
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
|
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
|
||||||
/// devices.
|
/// devices.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="AudioContext(string device, int freq, int refresh, bool sync, int maxEfxSends)"/>
|
|
||||||
public AudioContext(string device, int freq, int refresh)
|
public AudioContext(string device, int freq, int refresh)
|
||||||
: this(device, freq, refresh, false, true) { }
|
: this(device, freq, refresh, false, true) { }
|
||||||
|
|
||||||
|
@ -121,13 +118,12 @@ namespace OpenTK.Audio
|
||||||
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
|
/// Use AudioContext.AvailableDevices to obtain a list of all available audio devices.
|
||||||
/// devices.
|
/// devices.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="AudioContext(string device, int freq, int refresh, bool sync, int maxEfxSends)"/>
|
|
||||||
public AudioContext(string device, int freq, int refresh, bool sync)
|
public AudioContext(string device, int freq, int refresh, bool sync)
|
||||||
: this(available_devices[0], freq, refresh, sync, true) { }
|
: this(available_devices[0], freq, refresh, sync, true) { }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region public AudioContext(string device, int freq, int refresh, bool sync, int maxSends)
|
#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>
|
||||||
|
@ -137,10 +133,10 @@ namespace OpenTK.Audio
|
||||||
/// <param name="enableEfx">Indicates whether the EFX extension should be initialized, if present.</param>
|
/// <param name="enableEfx">Indicates whether the EFX extension should be initialized, if present.</param>
|
||||||
/// <exception cref="ArgumentNullException">Occurs when the device string is invalid.</exception>
|
/// <exception cref="ArgumentNullException">Occurs when the device string is invalid.</exception>
|
||||||
/// <exception cref="ArgumentOutOfRangeException">Occurs when a specified parameter is invalid.</exception>
|
/// <exception cref="ArgumentOutOfRangeException">Occurs when a specified parameter is invalid.</exception>
|
||||||
/// <exception cref="InvalidAudioDeviceException">
|
/// <exception cref="AudioDeviceException">
|
||||||
/// Occurs when the specified device is not available, or is in use by another program.
|
/// Occurs when the specified device is not available, or is in use by another program.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <exception cref="InvalidAudioContextException">
|
/// <exception cref="AudioContextException">
|
||||||
/// Occurs when an audio context could not be created with the specified parameters.
|
/// Occurs when an audio context could not be created with the specified parameters.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <exception cref="NotSupportedException">
|
/// <exception cref="NotSupportedException">
|
||||||
|
@ -228,7 +224,7 @@ namespace OpenTK.Audio
|
||||||
/// <exception cref="AudioDeviceException">
|
/// <exception cref="AudioDeviceException">
|
||||||
/// Occurs when the specified device is not available, or is in use by another program.
|
/// Occurs when the specified device is not available, or is in use by another program.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <exception cref="AudioDeviceException">
|
/// <exception cref="AudioContextException">
|
||||||
/// Occurs when an audio context could not be created with the specified parameters.
|
/// Occurs when an audio context could not be created with the specified parameters.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <exception cref="NotSupportedException">
|
/// <exception cref="NotSupportedException">
|
||||||
|
@ -267,8 +263,6 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
CheckForAlcErrors();
|
CheckForAlcErrors();
|
||||||
|
|
||||||
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
|
|
||||||
|
|
||||||
// Build the attribute list
|
// Build the attribute list
|
||||||
List<int> attributes = new List<int>();
|
List<int> attributes = new List<int>();
|
||||||
|
|
||||||
|
@ -314,8 +308,22 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
CheckForAlcErrors();
|
CheckForAlcErrors();
|
||||||
|
|
||||||
//device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
|
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
|
||||||
//Debug.Print(device_name);
|
int attribute_count;
|
||||||
|
Alc.GetInteger(device_handle, AlcGetInteger.AttributesSize, sizeof(int), out attribute_count);
|
||||||
|
if (attribute_count > 0)
|
||||||
|
{
|
||||||
|
int[] device_attributes = new int[attribute_count];
|
||||||
|
Alc.GetInteger(device_handle, AlcGetInteger.AllAttributes, device_attributes.Length * sizeof(int), out device_attributes[0]);
|
||||||
|
foreach (int attr in device_attributes)
|
||||||
|
{
|
||||||
|
switch ((AlcContextAttributes)attr)
|
||||||
|
{
|
||||||
|
case AlcContextAttributes.Sync: IsSynchronized = true; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lock (audio_context_lock)
|
lock (audio_context_lock)
|
||||||
{
|
{
|
||||||
available_contexts.Add(this.context_handle, this);
|
available_contexts.Add(this.context_handle, this);
|
||||||
|
@ -439,6 +447,21 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region public bool IsProcessing
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a System.Boolean indicating whether the AudioContext is
|
||||||
|
/// synchronized.
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="Process"/>
|
||||||
|
public bool IsSynchronized
|
||||||
|
{
|
||||||
|
get { return is_synchronized; }
|
||||||
|
private set { is_synchronized = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region public void Process
|
#region public void Process
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -457,7 +480,7 @@ namespace OpenTK.Audio
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception>
|
/// <exception cref="ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception>
|
||||||
/// <seealso cref="Suspend"/>
|
/// <seealso cref="Suspend"/>
|
||||||
/// <seealso cref="IsSuspended"/>
|
/// <seealso cref="IsProcessing"/>
|
||||||
/// <seealso cref="IsSynchronized"/>
|
/// <seealso cref="IsSynchronized"/>
|
||||||
public void Process()
|
public void Process()
|
||||||
{
|
{
|
||||||
|
@ -488,7 +511,7 @@ namespace OpenTK.Audio
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <exception cref="ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception>
|
/// <exception cref="ObjectDisposedException">Occurs when this function is called after the AudioContext had been disposed.</exception>
|
||||||
/// <seealso cref="Process"/>
|
/// <seealso cref="Process"/>
|
||||||
/// <seealso cref="IsSuspended"/>
|
/// <seealso cref="IsProcessing"/>
|
||||||
/// <seealso cref="IsSynchronized"/>
|
/// <seealso cref="IsSynchronized"/>
|
||||||
public void Suspend()
|
public void Suspend()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1180,7 +1180,7 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <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="source">The name of the source to queue buffers onto.</param>
|
||||||
/// <param name="buffer">The name of the buffer to be queued.</param>
|
/// <param name="buffer">The name of the buffer to be queued.</param>
|
||||||
public static void SourceQueueBuffer(int source, int buffer)
|
public static void SourceQueueBuffer(int source, int buffer)
|
||||||
{
|
{
|
||||||
|
@ -1315,7 +1315,7 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>This function generates one buffer only, which contain audio data (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 buffer only, which contain audio data (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="buffers">Pointer to an uint value which will store the names of the new buffer.</param>
|
/// <param name="buffer">Pointer to an uint value which will store the names of the new buffer.</param>
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void GenBuffer(out uint buffer)
|
public static void GenBuffer(out uint buffer)
|
||||||
{
|
{
|
||||||
|
@ -1349,7 +1349,7 @@ namespace OpenTK.Audio
|
||||||
public static extern void DeleteBuffers(int n, [In] ref int buffers);
|
public static extern void DeleteBuffers(int n, [In] ref int buffers);
|
||||||
|
|
||||||
/// <summary>This function deletes one buffer only, 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 buffer only, 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="buffer">Pointer to a buffer name identifying the buffer to be deleted.</param>
|
/// <param name="buffers">Pointer to a buffer name identifying the buffer to be deleted.</param>
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void DeleteBuffers(uint[] buffers)
|
public static void DeleteBuffers(uint[] buffers)
|
||||||
{
|
{
|
||||||
|
@ -1359,7 +1359,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <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="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>
|
||||||
[CLSCompliant(true)]
|
[CLSCompliant(true)]
|
||||||
public static void DeleteBuffers(int[] buffers)
|
public static void DeleteBuffers(int[] buffers)
|
||||||
|
@ -1390,14 +1389,14 @@ namespace OpenTK.Audio
|
||||||
#region IsBuffer
|
#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="AL.GenBuffers"/>.</param>
|
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
|
||||||
/// <returns>Success.</returns>
|
/// <returns>Success.</returns>
|
||||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alIsBuffer", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alIsBuffer", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
public static extern bool IsBuffer(uint bid);
|
public static extern bool IsBuffer(uint bid);
|
||||||
// AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
|
// AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid );
|
||||||
|
|
||||||
/// <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="AL.GenBuffers"/>.</param>
|
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
|
||||||
/// <returns>Success.</returns>
|
/// <returns>Success.</returns>
|
||||||
[CLSCompliant(true)]
|
[CLSCompliant(true)]
|
||||||
public static bool IsBuffer(int bid)
|
public static bool IsBuffer(int bid)
|
||||||
|
@ -1417,7 +1416,7 @@ namespace OpenTK.Audio
|
||||||
/// <param name="size">The size of the audio buffer in bytes.</param>
|
/// <param name="size">The size of the audio buffer in bytes.</param>
|
||||||
/// <param name="freq">The frequency of the audio buffer.</param>
|
/// <param name="freq">The frequency of the audio buffer.</param>
|
||||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alBufferData", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alBufferData", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
public static extern void BufferData(uint bid, ALFormat format, IntPtr data, int size, int freq);
|
public static extern void BufferData(uint bid, ALFormat format, IntPtr buffer, int size, int freq);
|
||||||
// AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* buffer, ALsizei size, ALsizei freq );
|
// AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* buffer, ALsizei size, ALsizei freq );
|
||||||
|
|
||||||
/// <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>
|
||||||
|
@ -1427,28 +1426,28 @@ namespace OpenTK.Audio
|
||||||
/// <param name="size">The size of the audio buffer in bytes.</param>
|
/// <param name="size">The size of the audio buffer in bytes.</param>
|
||||||
/// <param name="freq">The frequency of the audio buffer.</param>
|
/// <param name="freq">The frequency of the audio buffer.</param>
|
||||||
[CLSCompliant(true)]
|
[CLSCompliant(true)]
|
||||||
public static void BufferData(int bid, ALFormat format, IntPtr data, int size, int freq)
|
public static void BufferData(int bid, ALFormat format, IntPtr buffer, int size, int freq)
|
||||||
{
|
{
|
||||||
BufferData((uint)bid, format, data, size, freq);
|
BufferData((uint)bid, format, buffer, size, freq);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>This function fills a buffer with audio buffer (PCM format).</summary>
|
/// <summary>This function fills a buffer with audio buffer (PCM format).</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="buffer">A SoundData object containing the buffer to upload.</param>
|
/// <param name="buffer">A SoundData object containing the buffer to upload.</param>
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public static void BufferData(uint bid, SoundData data)
|
public static void BufferData(uint bid, SoundData buffer)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
fixed (byte* data_ptr = &data.Data[0])
|
fixed (byte* data_ptr = &buffer.Data[0])
|
||||||
BufferData(bid, data.SoundFormat.SampleFormatAsOpenALFormat, (IntPtr)data_ptr, data.Data.Length,
|
BufferData(bid, buffer.SoundFormat.SampleFormatAsOpenALFormat, (IntPtr)data_ptr, buffer.Data.Length,
|
||||||
data.SoundFormat.SampleRate);
|
buffer.SoundFormat.SampleRate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>This function fills a buffer with audio buffer (PCM format).</summary>
|
/// <summary>This function fills a buffer with audio buffer (PCM format).</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="buffer">A SoundData object containing the buffer to upload.</param>
|
/// <param name="data">A SoundData object containing the buffer to upload.</param>
|
||||||
public static void BufferData(int bid, SoundData data)
|
public static void BufferData(int bid, SoundData data)
|
||||||
{
|
{
|
||||||
unsafe
|
unsafe
|
||||||
|
|
|
@ -494,8 +494,8 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
|
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
|
||||||
/// <param name="eid">Effect object identifier.</param>
|
/// <param name="eid">Effect object identifier.</param>
|
||||||
/// <param name="pname">Effect property to retrieve.</param>
|
/// <param name="param">Effect property to retrieve.</param>
|
||||||
/// <param name="value">A Math.Vector3 to hold the values.</param>
|
/// <param name="values">A Math.Vector3 to hold the values.</param>
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public void GetEffect(uint eid, EfxEffect3f param, out Vector3 values)
|
public void GetEffect(uint eid, EfxEffect3f param, out Vector3 values)
|
||||||
{
|
{
|
||||||
|
@ -513,8 +513,8 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
|
/// <summary>This function is used to retrieve 3 floating point properties from Effect objects.</summary>
|
||||||
/// <param name="eid">Effect object identifier.</param>
|
/// <param name="eid">Effect object identifier.</param>
|
||||||
/// <param name="pname">Effect property to retrieve.</param>
|
/// <param name="param">Effect property to retrieve.</param>
|
||||||
/// <param name="value">A Math.Vector3 to hold the values.</param>
|
/// <param name="values">A Math.Vector3 to hold the values.</param>
|
||||||
|
|
||||||
public void GetEffect(int eid, EfxEffect3f param, out Vector3 values)
|
public void GetEffect(int eid, EfxEffect3f param, out Vector3 values)
|
||||||
{
|
{
|
||||||
|
@ -652,7 +652,7 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>This function deletes one Filter only.</summary>
|
/// <summary>This function deletes one Filter only.</summary>
|
||||||
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
|
/// <param name="filters">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public void DeleteFilters(uint[] filters)
|
public void DeleteFilters(uint[] filters)
|
||||||
{
|
{
|
||||||
|
@ -661,7 +661,7 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>This function deletes one Filter only.</summary>
|
/// <summary>This function deletes one Filter only.</summary>
|
||||||
/// <param name="filter">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
|
/// <param name="filters">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
|
||||||
public void DeleteFilters(int[] filters)
|
public void DeleteFilters(int[] filters)
|
||||||
{
|
{
|
||||||
if (filters == null) throw new ArgumentNullException("filters");
|
if (filters == null) throw new ArgumentNullException("filters");
|
||||||
|
@ -983,7 +983,6 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>The DeleteAuxiliaryEffectSlots function is used to delete and free resources for Auxiliary Effect Slots previously created with GenAuxiliaryEffectSlots.</summary>
|
/// <summary>The DeleteAuxiliaryEffectSlots function is used to delete and free resources for Auxiliary Effect Slots previously created with GenAuxiliaryEffectSlots.</summary>
|
||||||
/// <param name="n">Number of Auxiliary Effect Slots to be deleted.</param>
|
|
||||||
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
|
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
|
||||||
public void DeleteAuxiliaryEffectSlots(int[] slots)
|
public void DeleteAuxiliaryEffectSlots(int[] slots)
|
||||||
{
|
{
|
||||||
|
@ -992,7 +991,7 @@ namespace OpenTK.Audio
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>This function deletes one AuxiliaryEffectSlot only.</summary>
|
/// <summary>This function deletes one AuxiliaryEffectSlot only.</summary>
|
||||||
/// <param name="slot">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
|
/// <param name="slots">Pointer to an auxiliary effect slot name/handle identifying the Auxiliary Effect Slot Object to be deleted.</param>
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
public void DeleteAuxiliaryEffectSlots(uint[] slots)
|
public void DeleteAuxiliaryEffectSlots(uint[] slots)
|
||||||
{
|
{
|
||||||
|
|
|
@ -94,7 +94,7 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
/// <summary>This function creates a context using a specified device.</summary>
|
/// <summary>This function creates a context using a specified device.</summary>
|
||||||
/// <param name="device">a pointer to a device</param>
|
/// <param name="device">a pointer to a device</param>
|
||||||
/// <param name="attrlist">an array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
|
/// <param name="attriblist">an array of a set of attributes: ALC_FREQUENCY, ALC_MONO_SOURCES, ALC_REFRESH, ALC_STEREO_SOURCES, ALC_SYNC</param>
|
||||||
/// <returns>Returns a pointer to the new context (NULL on failure).</returns>
|
/// <returns>Returns a pointer to the new context (NULL on failure).</returns>
|
||||||
/// <remarks>The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</remarks>
|
/// <remarks>The attribute list can be NULL, or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values.</remarks>
|
||||||
public static ContextHandle CreateContext(IntPtr device, int[] attriblist)
|
public static ContextHandle CreateContext(IntPtr device, int[] attriblist)
|
||||||
|
@ -267,7 +267,7 @@ namespace OpenTK.Audio
|
||||||
/// <param name="device">a pointer to the device to be queried.</param>
|
/// <param name="device">a pointer to the device to be queried.</param>
|
||||||
/// <param name="param">an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES</param>
|
/// <param name="param">an attribute to be retrieved: ALC_MAJOR_VERSION, ALC_MINOR_VERSION, ALC_ATTRIBUTES_SIZE, ALC_ALL_ATTRIBUTES</param>
|
||||||
/// <param name="size">the size of the destination buffer provided. In bytes.</param>
|
/// <param name="size">the size of the destination buffer provided. In bytes.</param>
|
||||||
/// <param name="buffer">a pointer to the buffer to be returned</param>
|
/// <param name="data">a pointer to the buffer to be returned</param>
|
||||||
[DllImport(Alc.Lib, EntryPoint = "alcGetIntegerv", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
[DllImport(Alc.Lib, EntryPoint = "alcGetIntegerv", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||||
public static extern void GetInteger([In] IntPtr device, AlcGetInteger param, int size, [Out] out int data);
|
public static extern void GetInteger([In] IntPtr device, AlcGetInteger param, int size, [Out] out int data);
|
||||||
// ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *buffer );
|
// ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *buffer );
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace OpenTK.Audio
|
||||||
/// <param name="length">Size in Bytes of the sound buffer.</param>
|
/// <param name="length">Size in Bytes of the sound buffer.</param>
|
||||||
/// <returns>OpenAL Buffer, 0 on failure.</returns>
|
/// <returns>OpenAL Buffer, 0 on failure.</returns>
|
||||||
[CLSCompliant(false), DllImport(Alut.Lib, EntryPoint = "alutCreateBufferFromFileImage", ExactSpelling = true, CallingConvention = Alut.Style), SuppressUnmanagedCodeSecurity()]
|
[CLSCompliant(false), DllImport(Alut.Lib, EntryPoint = "alutCreateBufferFromFileImage", ExactSpelling = true, CallingConvention = Alut.Style), SuppressUnmanagedCodeSecurity()]
|
||||||
public static extern uint CreateBufferFromFileImage([In] IntPtr data, int length);
|
public static extern uint CreateBufferFromFileImage([In] IntPtr buffer, int length);
|
||||||
// ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFileImage (const ALvoid *buffer, ALsizei length);
|
// ALUT_API ALuint ALUT_APIENTRY alutCreateBufferFromFileImage (const ALvoid *buffer, ALsizei length);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,8 @@ namespace OpenTK.Audio
|
||||||
|
|
||||||
/// <internal />
|
/// <internal />
|
||||||
/// <summary>Constructs a new SoundData object.</summary>
|
/// <summary>Constructs a new SoundData object.</summary>
|
||||||
/// <param name="buffer">An array of PCM buffer.</param>
|
/// <param name="format">The SoundFormat of these SoundData.</param>
|
||||||
|
/// <param name="data">An array of PCM buffer.</param>
|
||||||
internal SoundData(SoundFormat format, byte[] data)
|
internal SoundData(SoundFormat format, byte[] data)
|
||||||
{
|
{
|
||||||
if (data == null) throw new ArgumentNullException("buffer", "Must be a valid array of samples.");
|
if (data == null) throw new ArgumentNullException("buffer", "Must be a valid array of samples.");
|
||||||
|
|
|
@ -55,8 +55,8 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the control.</param>
|
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the control.</param>
|
||||||
/// <param name="major">The major version for the OpenGL GraphicsContext.</param>
|
/// <param name="major">The major version for the OpenGL GraphicsContext.</param>
|
||||||
/// <param name="major">The minor version for the OpenGL GraphicsContext.</param>
|
/// <param name="minor">The minor version for the OpenGL GraphicsContext.</param>
|
||||||
/// <param name="major">The GraphicsContextFlags for the OpenGL GraphicsContext.</param>
|
/// <param name="flags">The GraphicsContextFlags for the OpenGL GraphicsContext.</param>
|
||||||
public GLControl(GraphicsMode mode, int major, int minor, GraphicsContextFlags flags)
|
public GLControl(GraphicsMode mode, int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
SetStyle(ControlStyles.Opaque, true);
|
SetStyle(ControlStyles.Opaque, true);
|
||||||
|
|
|
@ -164,7 +164,7 @@ namespace OpenTK
|
||||||
/// <param name="options">GameWindow options regarding window appearance and behavior.</param>
|
/// <param name="options">GameWindow options regarding window appearance and behavior.</param>
|
||||||
/// <param name="device">The OpenTK.Graphics.DisplayDevice to construct the GameWindow in.</param>
|
/// <param name="device">The OpenTK.Graphics.DisplayDevice to construct the GameWindow in.</param>
|
||||||
/// <param name="major">The major version for the OpenGL GraphicsContext.</param>
|
/// <param name="major">The major version for the OpenGL GraphicsContext.</param>
|
||||||
/// <param name="major">The minor version for the OpenGL GraphicsContext.</param>
|
/// <param name="minor">The minor version for the OpenGL GraphicsContext.</param>
|
||||||
/// <param name="flags">The GraphicsContextFlags version for the OpenGL GraphicsContext.</param>
|
/// <param name="flags">The GraphicsContextFlags version for the OpenGL GraphicsContext.</param>
|
||||||
public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device,
|
public GameWindow(int width, int height, GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device,
|
||||||
int major, int minor, GraphicsContextFlags flags)
|
int major, int minor, GraphicsContextFlags flags)
|
||||||
|
@ -351,10 +351,10 @@ namespace OpenTK
|
||||||
|
|
||||||
#region public bool Fullscreen
|
#region public bool Fullscreen
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// TODO: This property is not implemented.
|
///// TODO: This property is not implemented.
|
||||||
/// Gets or sets a value indicating whether the GameWindow is in fullscrren mode.
|
///// Gets or sets a value indicating whether the GameWindow is in fullscrren mode.
|
||||||
/// </summary>
|
///// </summary>
|
||||||
//public bool Fullscreen
|
//public bool Fullscreen
|
||||||
//{
|
//{
|
||||||
// get { if (disposed) throw new ObjectDisposedException("GameWindow"); return glWindow.Fullscreen; }
|
// get { if (disposed) throw new ObjectDisposedException("GameWindow"); return glWindow.Fullscreen; }
|
||||||
|
@ -448,7 +448,7 @@ namespace OpenTK
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enters the game loop of the GameWindow updating and rendering at the maximum possible frequency.
|
/// Enters the game loop of the GameWindow updating and rendering at the maximum possible frequency.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="public virtual void Run(double update_frequency, double render_frequency)"/>
|
/// <see cref="Run(double, double)"/>
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
if (disposed) throw new ObjectDisposedException("GameWindow");
|
if (disposed) throw new ObjectDisposedException("GameWindow");
|
||||||
|
@ -463,7 +463,7 @@ namespace OpenTK
|
||||||
/// Enters the game loop of the GameWindow updating the specified update frequency, while maintaining the
|
/// Enters the game loop of the GameWindow updating the specified update frequency, while maintaining the
|
||||||
/// maximum possible render frequency.
|
/// maximum possible render frequency.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="public virtual void Run(double updateFrequency, double renderFrequency)"/>
|
/// <see cref="Run(double, double)"/>
|
||||||
public void Run(double updateFrequency)
|
public void Run(double updateFrequency)
|
||||||
{
|
{
|
||||||
if (disposed) throw new ObjectDisposedException("GameWindow");
|
if (disposed) throw new ObjectDisposedException("GameWindow");
|
||||||
|
@ -990,6 +990,7 @@ namespace OpenTK
|
||||||
/// <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>
|
||||||
|
/// <remarks>
|
||||||
/// <para>A value of 0.0 indicates that RenderFrame events are generated at the maximum possible frequency (i.e. only limited by the hardware's capabilities).</para>
|
/// <para>A value of 0.0 indicates that RenderFrame events are generated at the maximum possible frequency (i.e. only limited by the hardware's capabilities).</para>
|
||||||
/// <para>Values lower than 0.005 seconds (200Hz) are clamped to 0.0. Values higher than 1.0 seconds (1Hz) are clamped to 1.0.</para>
|
/// <para>Values lower than 0.005 seconds (200Hz) are clamped to 0.0. Values higher than 1.0 seconds (1Hz) are clamped to 1.0.</para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|
|
@ -308,9 +308,9 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#region public override bool Equals(object obj)
|
#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>
|
||||||
//public override bool Equals(object obj)
|
//public override bool Equals(object obj)
|
||||||
//{
|
//{
|
||||||
// if (obj is DisplayDevice)
|
// if (obj is DisplayDevice)
|
||||||
|
@ -329,9 +329,9 @@ namespace OpenTK.Graphics
|
||||||
|
|
||||||
#region public override int GetHashCode()
|
#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;
|
||||||
//}
|
//}
|
||||||
|
|
|
@ -31,6 +31,8 @@ namespace OpenTK.Graphics
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
#pragma warning disable 3019
|
#pragma warning disable 3019
|
||||||
#pragma warning disable 1591
|
#pragma warning disable 1591
|
||||||
|
#pragma warning disable 1572
|
||||||
|
#pragma warning disable 1573
|
||||||
|
|
||||||
static partial class GL
|
static partial class GL
|
||||||
{
|
{
|
||||||
|
|
|
@ -144,7 +144,6 @@ namespace OpenTK.Graphics
|
||||||
/// base OpenGL name of the function (e.g. "glVertex3fv" instead of "Vertex3").
|
/// base OpenGL name of the function (e.g. "glVertex3fv" instead of "Vertex3").
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of the OpenGL function (eg. "glNewList")</param>
|
/// <param name="name">The name of the OpenGL function (eg. "glNewList")</param>
|
||||||
/// <param name="signature">The signature of the OpenGL function.</param>
|
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// A System.Delegate that can be used to call this OpenGL function or null, if the specified
|
/// A System.Delegate that can be used to call this OpenGL function or null, if the specified
|
||||||
/// function name does not correspond to an OpenGL function or if the function is not
|
/// function name does not correspond to an OpenGL function or if the function is not
|
||||||
|
@ -212,7 +211,7 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tries to reload the given OpenGL function (core or extension).
|
/// Tries to reload the given OpenGL function (core or extension).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of the OpenGL function (i.e. glShaderSource)</param>
|
/// <param name="function">The name of the OpenGL function (i.e. glShaderSource)</param>
|
||||||
/// <returns>True if the function was found and reloaded, false otherwise.</returns>
|
/// <returns>True if the function was found and reloaded, false otherwise.</returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>
|
/// <para>
|
||||||
|
@ -339,7 +338,7 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a given OpenGL function is supported by the current context.
|
/// Checks if a given OpenGL function is supported by the current context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="method">The System.Reflection.MethodInfo for the OpenGL function.</param>
|
/// <param name="function">The System.Reflection.MethodInfo for the OpenGL function.</param>
|
||||||
/// <returns>True if the function is supported, false otherwise.</returns>
|
/// <returns>True if the function is supported, false otherwise.</returns>
|
||||||
static bool SupportsFunction(MethodInfo function)
|
static bool SupportsFunction(MethodInfo function)
|
||||||
{
|
{
|
||||||
|
@ -532,7 +531,7 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the entry point for a dynamically exported OpenGL function.
|
/// Retrieves the entry point for a dynamically exported OpenGL function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The function string for the OpenGL function (eg. "glNewList")</param>
|
/// <param name="function">The function string for the OpenGL function (eg. "glNewList")</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// An IntPtr contaning the address for the entry point, or IntPtr.Zero if the specified
|
/// An IntPtr contaning the address for the entry point, or IntPtr.Zero if the specified
|
||||||
/// OpenGL function is not dynamically exported.
|
/// OpenGL function is not dynamically exported.
|
||||||
|
@ -546,8 +545,6 @@ namespace OpenTK.Graphics
|
||||||
/// This function is cross-platform. It determines the underlying platform and uses the
|
/// This function is cross-platform. It determines the underlying platform and uses the
|
||||||
/// correct wgl, glx or agl GetAddress function to retrieve the function pointer.
|
/// correct wgl, glx or agl GetAddress function to retrieve the function pointer.
|
||||||
/// </para>
|
/// </para>
|
||||||
/// <see cref="Marshal.GetDelegateForFunctionPointer"/>
|
|
||||||
/// <seealso cref="Gl.GetDelegateForExtensionMethod"/>
|
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
private static IntPtr GetAddress(string function)
|
private static IntPtr GetAddress(string function)
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tries to reload the given GLU function (core or extension).
|
/// Tries to reload the given GLU function (core or extension).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of the GLU function.</param>
|
/// <param name="function">The name of the GLU function.</param>
|
||||||
/// <returns>True if the function was found and reloaded, false otherwise.</returns>
|
/// <returns>True if the function was found and reloaded, false otherwise.</returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>
|
/// <para>
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new GraphicsContext with the specified GraphicsMode and attaches it to the specified window.
|
/// Constructs a new GraphicsContext with the specified GraphicsMode and attaches it to the specified window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="format">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
|
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
|
||||||
/// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
|
/// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
|
||||||
public GraphicsContext(GraphicsMode mode, IWindowInfo window)
|
public GraphicsContext(GraphicsMode mode, IWindowInfo window)
|
||||||
: this(mode, window, 1, 0, GraphicsContextFlags.Default)
|
: this(mode, window, 1, 0, GraphicsContextFlags.Default)
|
||||||
|
@ -55,7 +55,7 @@ namespace OpenTK.Graphics
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a new GraphicsContext with the specified GraphicsMode, version and flags, and attaches it to the specified window.
|
/// Constructs a new GraphicsContext with the specified GraphicsMode, version and flags, and attaches it to the specified window.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="format">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
|
/// <param name="mode">The OpenTK.Graphics.GraphicsMode of the GraphicsContext.</param>
|
||||||
/// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
|
/// <param name="window">The OpenTK.Platform.IWindowInfo to attach the GraphicsContext to.</param>
|
||||||
/// <param name="major">The major version of the new GraphicsContext.</param>
|
/// <param name="major">The major version of the new GraphicsContext.</param>
|
||||||
/// <param name="minor">The minor version of the new GraphicsContext.</param>
|
/// <param name="minor">The minor version of the new GraphicsContext.</param>
|
||||||
|
@ -457,7 +457,6 @@ namespace OpenTK.Graphics
|
||||||
/// A pointer to the specified function or IntPtr.Zero if the function isn't
|
/// A pointer to the specified function or IntPtr.Zero if the function isn't
|
||||||
/// available in the current opengl context.
|
/// available in the current opengl context.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
/// <see cref="Marshal.GetDelegateForFunctionPointer"/>
|
|
||||||
IntPtr IGraphicsContextInternal.GetAddress(string function)
|
IntPtr IGraphicsContextInternal.GetAddress(string function)
|
||||||
{
|
{
|
||||||
return (implementation as IGraphicsContextInternal).GetAddress(function);
|
return (implementation as IGraphicsContextInternal).GetAddress(function);
|
||||||
|
|
|
@ -237,7 +237,7 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="JoystickMoveEventArgs"/> class.
|
/// Initializes a new instance of the <see cref="JoystickMoveEventArgs"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="index">The index of the joystick axis that was moved.</param>
|
/// <param name="axis">The index of the joystick axis that was moved.</param>
|
||||||
/// <param name="value">The absolute value of the joystick axis.</param>
|
/// <param name="value">The absolute value of the joystick axis.</param>
|
||||||
/// <param name="delta">The relative change in value of the joystick axis.</param>
|
/// <param name="delta">The relative change in value of the joystick axis.</param>
|
||||||
public JoystickMoveEventArgs(JoystickAxis axis, float value, float delta)
|
public JoystickMoveEventArgs(JoystickAxis axis, float value, float delta)
|
||||||
|
@ -355,7 +355,7 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Boolean indicating whether the specified JoystickButton is pressed.
|
/// Gets a System.Boolean indicating whether the specified JoystickButton is pressed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="index">The JoystickButton to check.</param>
|
/// <param name="button">The JoystickButton to check.</param>
|
||||||
/// <returns>True if the JoystickButton is pressed; false otherwise.</returns>
|
/// <returns>True if the JoystickButton is pressed; false otherwise.</returns>
|
||||||
public bool this[JoystickButton button]
|
public bool this[JoystickButton button]
|
||||||
{
|
{
|
||||||
|
@ -448,7 +448,7 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Single indicating the absolute position of the JoystickAxis.
|
/// Gets a System.Single indicating the absolute position of the JoystickAxis.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="index">The JoystickAxis to check.</param>
|
/// <param name="axis">The JoystickAxis to check.</param>
|
||||||
/// <returns>A System.Single in the range [-1, 1].</returns>
|
/// <returns>A System.Single in the range [-1, 1].</returns>
|
||||||
public float this[JoystickAxis axis]
|
public float this[JoystickAxis axis]
|
||||||
{
|
{
|
||||||
|
|
|
@ -160,7 +160,7 @@ namespace OpenTK.Input
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a System.Boolean indicating the state of the specified MouseButton.
|
/// Gets a System.Boolean indicating the state of the specified MouseButton.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key">The MouseButton to check.</param>
|
/// <param name="button">The MouseButton to check.</param>
|
||||||
/// <returns>True if the MouseButton is pressed, false otherwise.</returns>
|
/// <returns>True if the MouseButton is pressed, false otherwise.</returns>
|
||||||
public bool this[MouseButton button]
|
public bool this[MouseButton button]
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,7 +130,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert radians to degrees
|
/// Convert radians to degrees
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="degrees">An angle in radians</param>
|
/// <param name="radians">An angle in radians</param>
|
||||||
/// <returns>The angle expressed in degrees</returns>
|
/// <returns>The angle expressed in degrees</returns>
|
||||||
public static float RadiansToDegrees(float radians)
|
public static float RadiansToDegrees(float radians)
|
||||||
{
|
{
|
||||||
|
|
|
@ -391,8 +391,9 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Post multiply this matrix by another matrix
|
/// Post multiply this matrix by another matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="right">The matrix to multiply</param>
|
/// <param name="left">The left operand of the multiplication.</param>
|
||||||
/// <returns>A new Matrix44 that is the result of the multiplication</returns>
|
/// <param name="right">The right operand of the multiplication.</param>
|
||||||
|
/// <returns>A new instance that is the result of the multiplication</returns>
|
||||||
public static Matrix4 Mult(Matrix4 left, Matrix4 right)
|
public static Matrix4 Mult(Matrix4 left, Matrix4 right)
|
||||||
{
|
{
|
||||||
Vector4 col0 = right.Column0;
|
Vector4 col0 = right.Column0;
|
||||||
|
@ -553,6 +554,7 @@ namespace OpenTK.Math
|
||||||
/// Calculate the transpose of the given matrix
|
/// Calculate the transpose of the given matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mat">The matrix to transpose</param>
|
/// <param name="mat">The matrix to transpose</param>
|
||||||
|
/// <param name="result">The result of the calculation</param>
|
||||||
public static void Transpose(ref Matrix4 mat, out Matrix4 result)
|
public static void Transpose(ref Matrix4 mat, out Matrix4 result)
|
||||||
{
|
{
|
||||||
result.Row0 = mat.Column0;
|
result.Row0 = mat.Column0;
|
||||||
|
@ -642,7 +644,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Matrix4> Members
|
#region IEquatable<Matrix4> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
|
/// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
|
||||||
/// <param name="matrix">An matrix to compare with this matrix.</param>
|
/// <param name="other">An matrix to compare with this matrix.</param>
|
||||||
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
|
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Matrix4 other)
|
public bool Equals(Matrix4 other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -423,8 +423,9 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Post multiply this matrix by another matrix
|
/// Post multiply this matrix by another matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="right">The matrix to multiply</param>
|
/// <param name="left">The left operand of the multiplication.</param>
|
||||||
/// <returns>A new Matrix44 that is the result of the multiplication</returns>
|
/// <param name="right">The right operand of the multiplication.</param>
|
||||||
|
/// <returns>A new instance that is the result of the multiplication</returns>
|
||||||
public static Matrix4d Mult(Matrix4d left, Matrix4d right)
|
public static Matrix4d Mult(Matrix4d left, Matrix4d right)
|
||||||
{
|
{
|
||||||
Vector4d col0 = right.Column0;
|
Vector4d col0 = right.Column0;
|
||||||
|
@ -585,6 +586,7 @@ namespace OpenTK.Math
|
||||||
/// Calculate the transpose of the given matrix
|
/// Calculate the transpose of the given matrix
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mat">The matrix to transpose</param>
|
/// <param name="mat">The matrix to transpose</param>
|
||||||
|
/// <param name="result">The result of the calculation</param>
|
||||||
public static void Transpose(ref Matrix4d mat, out Matrix4d result)
|
public static void Transpose(ref Matrix4d mat, out Matrix4d result)
|
||||||
{
|
{
|
||||||
result.Row0 = mat.Column0;
|
result.Row0 = mat.Column0;
|
||||||
|
@ -674,7 +676,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Matrix4d> Members
|
#region IEquatable<Matrix4d> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
|
/// <summary>Indicates whether the current matrix is equal to another matrix.</summary>
|
||||||
/// <param name="matrix">An matrix to compare with this matrix.</param>
|
/// <param name="other">An matrix to compare with this matrix.</param>
|
||||||
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
|
/// <returns>true if the current matrix is equal to the matrix parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Matrix4d other)
|
public bool Equals(Matrix4d other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -532,10 +532,10 @@ namespace OpenTK.Math
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="other">The other object to be used in the comparison.</param>
|
/// <param name="other">The other object to be used in the comparison.</param>
|
||||||
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
|
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
|
||||||
public override bool Equals(object o)
|
public override bool Equals(object other)
|
||||||
{
|
{
|
||||||
if (o is Quaternion == false) return false;
|
if (other is Quaternion == false) return false;
|
||||||
return this == (Quaternion)o;
|
return this == (Quaternion)other;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -532,10 +532,10 @@ namespace OpenTK.Math
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="other">The other object to be used in the comparison.</param>
|
/// <param name="other">The other object to be used in the comparison.</param>
|
||||||
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
|
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
|
||||||
public override bool Equals(object o)
|
public override bool Equals(object other)
|
||||||
{
|
{
|
||||||
if (o is Quaterniond == false) return false;
|
if (other is Quaterniond == false) return false;
|
||||||
return this == (Quaterniond)o;
|
return this == (Quaterniond)other;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -173,7 +173,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the length (magnitude) of the vector.
|
/// Gets the length (magnitude) of the vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="FastLength"/>
|
/// <see cref="LengthFast"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
public float Length
|
public float Length
|
||||||
{
|
{
|
||||||
|
@ -196,7 +196,6 @@ namespace OpenTK.Math
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
/// <seealso cref="OpenTK.Math.FastSqrt"/>
|
|
||||||
public float LengthFast
|
public float LengthFast
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -217,7 +216,7 @@ namespace OpenTK.Math
|
||||||
/// for comparisons.
|
/// for comparisons.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="FastLength"/>
|
/// <seealso cref="LengthFast"/>
|
||||||
public float LengthSquared
|
public float LengthSquared
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -849,7 +848,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Vector2> Members
|
#region IEquatable<Vector2> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
||||||
/// <param name="vector">A vector to compare with this vector.</param>
|
/// <param name="other">A vector to compare with this vector.</param>
|
||||||
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Vector2 other)
|
public bool Equals(Vector2 other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -172,7 +172,6 @@ namespace OpenTK.Math
|
||||||
/// for comparisons.
|
/// for comparisons.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="FastLength"/>
|
|
||||||
public double LengthSquared
|
public double LengthSquared
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -327,7 +326,7 @@ namespace OpenTK.Math
|
||||||
/// Multiply a vector and a scalar
|
/// Multiply a vector and a scalar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="a">Vector operand</param>
|
/// <param name="a">Vector operand</param>
|
||||||
/// <param name="f">Scalar operand</param>
|
/// <param name="d">Scalar operand</param>
|
||||||
/// <returns>Result of the multiplication</returns>
|
/// <returns>Result of the multiplication</returns>
|
||||||
public static Vector2d Mult(Vector2d a, double d)
|
public static Vector2d Mult(Vector2d a, double d)
|
||||||
{
|
{
|
||||||
|
@ -340,7 +339,7 @@ namespace OpenTK.Math
|
||||||
/// Multiply a vector and a scalar
|
/// Multiply a vector and a scalar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="a">Vector operand</param>
|
/// <param name="a">Vector operand</param>
|
||||||
/// <param name="f">Scalar operand</param>
|
/// <param name="d">Scalar operand</param>
|
||||||
/// <param name="result">Result of the multiplication</param>
|
/// <param name="result">Result of the multiplication</param>
|
||||||
public static void Mult(ref Vector2d a, double d, out Vector2d result)
|
public static void Mult(ref Vector2d a, double d, out Vector2d result)
|
||||||
{
|
{
|
||||||
|
@ -356,7 +355,7 @@ namespace OpenTK.Math
|
||||||
/// Divide a vector by a scalar
|
/// Divide a vector by a scalar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="a">Vector operand</param>
|
/// <param name="a">Vector operand</param>
|
||||||
/// <param name="f">Scalar operand</param>
|
/// <param name="d">Scalar operand</param>
|
||||||
/// <returns>Result of the division</returns>
|
/// <returns>Result of the division</returns>
|
||||||
public static Vector2d Div(Vector2d a, double d)
|
public static Vector2d Div(Vector2d a, double d)
|
||||||
{
|
{
|
||||||
|
@ -370,7 +369,7 @@ namespace OpenTK.Math
|
||||||
/// Divide a vector by a scalar
|
/// Divide a vector by a scalar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="a">Vector operand</param>
|
/// <param name="a">Vector operand</param>
|
||||||
/// <param name="f">Scalar operand</param>
|
/// <param name="d">Scalar operand</param>
|
||||||
/// <param name="result">Result of the division</param>
|
/// <param name="result">Result of the division</param>
|
||||||
public static void Div(ref Vector2d a, double d, out Vector2d result)
|
public static void Div(ref Vector2d a, double d, out Vector2d result)
|
||||||
{
|
{
|
||||||
|
@ -752,7 +751,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Vector2d> Members
|
#region IEquatable<Vector2d> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
||||||
/// <param name="vector">A vector to compare with this vector.</param>
|
/// <param name="other">A vector to compare with this vector.</param>
|
||||||
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Vector2d other)
|
public bool Equals(Vector2d other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -186,7 +186,6 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns this Half2 instance's contents as Vector2d.
|
/// Returns this Half2 instance's contents as Vector2d.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v">OpenTK.Math.Vector2d</param>
|
|
||||||
public Vector2d ToVector2d()
|
public Vector2d ToVector2d()
|
||||||
{
|
{
|
||||||
return new Vector2d(X, Y);
|
return new Vector2d(X, Y);
|
||||||
|
@ -197,7 +196,7 @@ namespace OpenTK.Math
|
||||||
#region Conversions
|
#region Conversions
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Vector2 to OpenTK.Math.Half2.</summary>
|
/// <summary>Converts OpenTK.Math.Vector2 to OpenTK.Math.Half2.</summary>
|
||||||
/// <param name="v4f">The Vector2 to convert.</param>
|
/// <param name="v">The Vector2 to convert.</param>
|
||||||
/// <returns>The resulting Half vector.</returns>
|
/// <returns>The resulting Half vector.</returns>
|
||||||
public static explicit operator Vector2h(Vector2 v)
|
public static explicit operator Vector2h(Vector2 v)
|
||||||
{
|
{
|
||||||
|
@ -205,7 +204,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Vector2d to OpenTK.Math.Half2.</summary>
|
/// <summary>Converts OpenTK.Math.Vector2d to OpenTK.Math.Half2.</summary>
|
||||||
/// <param name="v4d">The Vector2d to convert.</param>
|
/// <param name="v">The Vector2d to convert.</param>
|
||||||
/// <returns>The resulting Half vector.</returns>
|
/// <returns>The resulting Half vector.</returns>
|
||||||
public static explicit operator Vector2h(Vector2d v)
|
public static explicit operator Vector2h(Vector2d v)
|
||||||
{
|
{
|
||||||
|
@ -213,7 +212,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Half2 to OpenTK.Math.Vector2.</summary>
|
/// <summary>Converts OpenTK.Math.Half2 to OpenTK.Math.Vector2.</summary>
|
||||||
/// <param name="h4">The Half2 to convert.</param>
|
/// <param name="h">The Half2 to convert.</param>
|
||||||
/// <returns>The resulting Vector2.</returns>
|
/// <returns>The resulting Vector2.</returns>
|
||||||
public static explicit operator Vector2(Vector2h h)
|
public static explicit operator Vector2(Vector2h h)
|
||||||
{
|
{
|
||||||
|
@ -221,7 +220,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Half2 to OpenTK.Math.Vector2d.</summary>
|
/// <summary>Converts OpenTK.Math.Half2 to OpenTK.Math.Vector2d.</summary>
|
||||||
/// <param name="h4">The Half2 to convert.</param>
|
/// <param name="h">The Half2 to convert.</param>
|
||||||
/// <returns>The resulting Vector2d.</returns>
|
/// <returns>The resulting Vector2d.</returns>
|
||||||
public static explicit operator Vector2d(Vector2h h)
|
public static explicit operator Vector2d(Vector2h h)
|
||||||
{
|
{
|
||||||
|
|
|
@ -189,7 +189,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the length (magnitude) of the vector.
|
/// Gets the length (magnitude) of the vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="FastLength"/>
|
/// <see cref="LengthFast"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
public float Length
|
public float Length
|
||||||
{
|
{
|
||||||
|
@ -212,7 +212,6 @@ namespace OpenTK.Math
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
/// <seealso cref="OpenTK.Math.FastSqrt"/>
|
|
||||||
public float LengthFast
|
public float LengthFast
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -233,7 +232,7 @@ namespace OpenTK.Math
|
||||||
/// for comparisons.
|
/// for comparisons.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="FastLength"/>
|
/// <seealso cref="LengthFast"/>
|
||||||
public float LengthSquared
|
public float LengthSquared
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -858,7 +857,7 @@ namespace OpenTK.Math
|
||||||
/// Use this version if you already have the inverse of the desired transform to hand
|
/// Use this version if you already have the inverse of the desired transform to hand
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="norm">The normal to transform</param>
|
/// <param name="norm">The normal to transform</param>
|
||||||
/// <param name="mat">The inverse of the desired transformation</param>
|
/// <param name="invMat">The inverse of the desired transformation</param>
|
||||||
/// <returns>The transformed normal</returns>
|
/// <returns>The transformed normal</returns>
|
||||||
public static Vector3 TransformNormalInverse(Vector3 norm, Matrix4 invMat)
|
public static Vector3 TransformNormalInverse(Vector3 norm, Matrix4 invMat)
|
||||||
{
|
{
|
||||||
|
@ -875,7 +874,7 @@ namespace OpenTK.Math
|
||||||
/// Use this version if you already have the inverse of the desired transform to hand
|
/// Use this version if you already have the inverse of the desired transform to hand
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="norm">The normal to transform</param>
|
/// <param name="norm">The normal to transform</param>
|
||||||
/// <param name="mat">The inverse of the desired transformation</param>
|
/// <param name="invMat">The inverse of the desired transformation</param>
|
||||||
/// <param name="result">The transformed normal</param>
|
/// <param name="result">The transformed normal</param>
|
||||||
public static void TransformNormalInverse(ref Vector3 norm, ref Matrix4 invMat, out Vector3 result)
|
public static void TransformNormalInverse(ref Vector3 norm, ref Matrix4 invMat, out Vector3 result)
|
||||||
{
|
{
|
||||||
|
@ -928,7 +927,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <returns>The transformed vector</returns>
|
/// <returns>The transformed vector</returns>
|
||||||
public static Vector4 Transform(Vector3 vec, Matrix4 mat)
|
public static Vector4 Transform(Vector3 vec, Matrix4 mat)
|
||||||
|
@ -943,7 +942,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <param name="result">The transformed vector</param>
|
/// <param name="result">The transformed vector</param>
|
||||||
public static void Transform(ref Vector3 vec, ref Matrix4 mat, out Vector4 result)
|
public static void Transform(ref Vector3 vec, ref Matrix4 mat, out Vector4 result)
|
||||||
|
@ -953,7 +952,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3</summary>
|
/// <summary>Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <returns>The transformed vector</returns>
|
/// <returns>The transformed vector</returns>
|
||||||
public static Vector3 TransformPerspective(Vector3 vec, Matrix4 mat)
|
public static Vector3 TransformPerspective(Vector3 vec, Matrix4 mat)
|
||||||
|
@ -963,7 +962,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3</summary>
|
/// <summary>Transform a Vector3 by the given Matrix, and project the resulting Vector4 back to a Vector3</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <param name="result">The transformed vector</param>
|
/// <param name="result">The transformed vector</param>
|
||||||
public static void TransformPerspective(ref Vector3 vec, ref Matrix4 mat, out Vector3 result)
|
public static void TransformPerspective(ref Vector3 vec, ref Matrix4 mat, out Vector3 result)
|
||||||
|
@ -1132,7 +1131,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Vector3> Members
|
#region IEquatable<Vector3> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
||||||
/// <param name="vector">A vector to compare with this vector.</param>
|
/// <param name="other">A vector to compare with this vector.</param>
|
||||||
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Vector3 other)
|
public bool Equals(Vector3 other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -187,7 +187,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the length (magnitude) of the vector.
|
/// Gets the length (magnitude) of the vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="FastLength"/>
|
/// <see cref="LengthFast"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
public double Length
|
public double Length
|
||||||
{
|
{
|
||||||
|
@ -210,7 +210,6 @@ namespace OpenTK.Math
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
/// <seealso cref="OpenTK.Math.FastSqrt"/>
|
|
||||||
public double LengthFast
|
public double LengthFast
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -231,7 +230,7 @@ namespace OpenTK.Math
|
||||||
/// for comparisons.
|
/// for comparisons.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="FastLength"/>
|
/// <seealso cref="LengthFast"/>
|
||||||
public double LengthSquared
|
public double LengthSquared
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -855,7 +854,7 @@ namespace OpenTK.Math
|
||||||
/// Use this version if you already have the inverse of the desired transform to hand
|
/// Use this version if you already have the inverse of the desired transform to hand
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="norm">The normal to transform</param>
|
/// <param name="norm">The normal to transform</param>
|
||||||
/// <param name="mat">The inverse of the desired transformation</param>
|
/// <param name="invMat">The inverse of the desired transformation</param>
|
||||||
/// <returns>The transformed normal</returns>
|
/// <returns>The transformed normal</returns>
|
||||||
public static Vector3d TransformNormalInverse(Vector3d norm, Matrix4d invMat)
|
public static Vector3d TransformNormalInverse(Vector3d norm, Matrix4d invMat)
|
||||||
{
|
{
|
||||||
|
@ -871,7 +870,7 @@ namespace OpenTK.Math
|
||||||
/// Use this version if you already have the inverse of the desired transform to hand
|
/// Use this version if you already have the inverse of the desired transform to hand
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="norm">The normal to transform</param>
|
/// <param name="norm">The normal to transform</param>
|
||||||
/// <param name="mat">The inverse of the desired transformation</param>
|
/// <param name="invMat">The inverse of the desired transformation</param>
|
||||||
/// <param name="result">The transformed normal</param>
|
/// <param name="result">The transformed normal</param>
|
||||||
public static void TransformNormalInverse(ref Vector3d norm, ref Matrix4d invMat, out Vector3d result)
|
public static void TransformNormalInverse(ref Vector3d norm, ref Matrix4d invMat, out Vector3d result)
|
||||||
{
|
{
|
||||||
|
@ -923,7 +922,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <returns>The transformed vector</returns>
|
/// <returns>The transformed vector</returns>
|
||||||
public static Vector4d Transform(Vector3d vec, Matrix4d mat)
|
public static Vector4d Transform(Vector3d vec, Matrix4d mat)
|
||||||
|
@ -937,7 +936,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <param name="result">The transformed vector</param>
|
/// <param name="result">The transformed vector</param>
|
||||||
public static void Transform(ref Vector3d vec, ref Matrix4d mat, out Vector4d result)
|
public static void Transform(ref Vector3d vec, ref Matrix4d mat, out Vector4d result)
|
||||||
|
@ -949,7 +948,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Transform a Vector3d by the given Matrix, and project the resulting Vector4 back to a Vector3
|
/// Transform a Vector3d by the given Matrix, and project the resulting Vector4 back to a Vector3
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <returns>The transformed vector</returns>
|
/// <returns>The transformed vector</returns>
|
||||||
public static Vector3d TransformPerspective(Vector3d vec, Matrix4d mat)
|
public static Vector3d TransformPerspective(Vector3d vec, Matrix4d mat)
|
||||||
|
@ -959,7 +958,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d</summary>
|
/// <summary>Transform a Vector3d by the given Matrix, and project the resulting Vector4d back to a Vector3d</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <param name="result">The transformed vector</param>
|
/// <param name="result">The transformed vector</param>
|
||||||
public static void TransformPerspective(ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
|
public static void TransformPerspective(ref Vector3d vec, ref Matrix4d mat, out Vector3d result)
|
||||||
|
@ -1144,7 +1143,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Vector3> Members
|
#region IEquatable<Vector3> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
||||||
/// <param name="vector">A vector to compare with this vector.</param>
|
/// <param name="other">A vector to compare with this vector.</param>
|
||||||
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Vector3d other)
|
public bool Equals(Vector3d other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -215,7 +215,6 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns this Half3 instance's contents as Vector3d.
|
/// Returns this Half3 instance's contents as Vector3d.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v">OpenTK.Math.Vector3d</param>
|
|
||||||
public Vector3d ToVector3d()
|
public Vector3d ToVector3d()
|
||||||
{
|
{
|
||||||
return new Vector3d(X, Y, Z);
|
return new Vector3d(X, Y, Z);
|
||||||
|
@ -226,7 +225,7 @@ namespace OpenTK.Math
|
||||||
#region Conversions
|
#region Conversions
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Vector3 to OpenTK.Math.Half3.</summary>
|
/// <summary>Converts OpenTK.Math.Vector3 to OpenTK.Math.Half3.</summary>
|
||||||
/// <param name="v4f">The Vector3 to convert.</param>
|
/// <param name="v3f">The Vector3 to convert.</param>
|
||||||
/// <returns>The resulting Half vector.</returns>
|
/// <returns>The resulting Half vector.</returns>
|
||||||
public static explicit operator Vector3h(Vector3 v3f)
|
public static explicit operator Vector3h(Vector3 v3f)
|
||||||
{
|
{
|
||||||
|
@ -234,7 +233,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Vector3d to OpenTK.Math.Half3.</summary>
|
/// <summary>Converts OpenTK.Math.Vector3d to OpenTK.Math.Half3.</summary>
|
||||||
/// <param name="v4d">The Vector3d to convert.</param>
|
/// <param name="v3d">The Vector3d to convert.</param>
|
||||||
/// <returns>The resulting Half vector.</returns>
|
/// <returns>The resulting Half vector.</returns>
|
||||||
public static explicit operator Vector3h(Vector3d v3d)
|
public static explicit operator Vector3h(Vector3d v3d)
|
||||||
{
|
{
|
||||||
|
@ -242,7 +241,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Half3 to OpenTK.Math.Vector3.</summary>
|
/// <summary>Converts OpenTK.Math.Half3 to OpenTK.Math.Vector3.</summary>
|
||||||
/// <param name="h4">The Half3 to convert.</param>
|
/// <param name="h3">The Half3 to convert.</param>
|
||||||
/// <returns>The resulting Vector3.</returns>
|
/// <returns>The resulting Vector3.</returns>
|
||||||
public static explicit operator Vector3(Vector3h h3)
|
public static explicit operator Vector3(Vector3h h3)
|
||||||
{
|
{
|
||||||
|
@ -254,7 +253,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Converts OpenTK.Math.Half3 to OpenTK.Math.Vector3d.</summary>
|
/// <summary>Converts OpenTK.Math.Half3 to OpenTK.Math.Vector3d.</summary>
|
||||||
/// <param name="h4">The Half3 to convert.</param>
|
/// <param name="h3">The Half3 to convert.</param>
|
||||||
/// <returns>The resulting Vector3d.</returns>
|
/// <returns>The resulting Vector3d.</returns>
|
||||||
public static explicit operator Vector3d(Vector3h h3)
|
public static explicit operator Vector3d(Vector3h h3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -246,7 +246,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the length (magnitude) of the vector.
|
/// Gets the length (magnitude) of the vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="FastLength"/>
|
/// <see cref="LengthFast"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
public float Length
|
public float Length
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,6 @@ namespace OpenTK.Math
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
/// <seealso cref="OpenTK.Math.FastSqrt"/>
|
|
||||||
public float LengthFast
|
public float LengthFast
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -290,7 +289,7 @@ namespace OpenTK.Math
|
||||||
/// for comparisons.
|
/// for comparisons.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="FastLength"/>
|
/// <seealso cref="LengthFast"/>
|
||||||
public float LengthSquared
|
public float LengthSquared
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -782,7 +781,7 @@ namespace OpenTK.Math
|
||||||
#region Transform
|
#region Transform
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <returns>The transformed vector</returns>
|
/// <returns>The transformed vector</returns>
|
||||||
public static Vector4 Transform(Vector4 vec, Matrix4 mat)
|
public static Vector4 Transform(Vector4 vec, Matrix4 mat)
|
||||||
|
@ -796,7 +795,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <param name="result">The transformed vector</param>
|
/// <param name="result">The transformed vector</param>
|
||||||
public static void Transform( ref Vector4 vec, ref Matrix4 mat, out Vector4 result )
|
public static void Transform( ref Vector4 vec, ref Matrix4 mat, out Vector4 result )
|
||||||
|
@ -977,7 +976,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Vector4> Members
|
#region IEquatable<Vector4> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
||||||
/// <param name="vector">A vector to compare with this vector.</param>
|
/// <param name="other">A vector to compare with this vector.</param>
|
||||||
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Vector4 other)
|
public bool Equals(Vector4 other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,7 +243,7 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the length (magnitude) of the vector.
|
/// Gets the length (magnitude) of the vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <see cref="FastLength"/>
|
/// <see cref="LengthFast"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
public double Length
|
public double Length
|
||||||
{
|
{
|
||||||
|
@ -266,7 +266,6 @@ namespace OpenTK.Math
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="LengthSquared"/>
|
/// <seealso cref="LengthSquared"/>
|
||||||
/// <seealso cref="OpenTK.Math.FastSqrt"/>
|
|
||||||
public double LengthFast
|
public double LengthFast
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -287,7 +286,6 @@ namespace OpenTK.Math
|
||||||
/// for comparisons.
|
/// for comparisons.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <see cref="Length"/>
|
/// <see cref="Length"/>
|
||||||
/// <seealso cref="FastLength"/>
|
|
||||||
public double LengthSquared
|
public double LengthSquared
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -779,7 +777,7 @@ namespace OpenTK.Math
|
||||||
#region Transform
|
#region Transform
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <returns>The transformed vector</returns>
|
/// <returns>The transformed vector</returns>
|
||||||
public static Vector4d Transform(Vector4d vec, Matrix4d mat)
|
public static Vector4d Transform(Vector4d vec, Matrix4d mat)
|
||||||
|
@ -793,7 +791,7 @@ namespace OpenTK.Math
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Transform a Vector by the given Matrix</summary>
|
/// <summary>Transform a Vector by the given Matrix</summary>
|
||||||
/// <param name="pos">The vector to transform</param>
|
/// <param name="vec">The vector to transform</param>
|
||||||
/// <param name="mat">The desired transformation</param>
|
/// <param name="mat">The desired transformation</param>
|
||||||
/// <param name="result">The transformed vector</param>
|
/// <param name="result">The transformed vector</param>
|
||||||
public static void Transform(ref Vector4d vec, ref Matrix4d mat, out Vector4d result)
|
public static void Transform(ref Vector4d vec, ref Matrix4d mat, out Vector4d result)
|
||||||
|
@ -990,7 +988,7 @@ namespace OpenTK.Math
|
||||||
#region IEquatable<Vector4d> Members
|
#region IEquatable<Vector4d> Members
|
||||||
|
|
||||||
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
|
||||||
/// <param name="vector">A vector to compare with this vector.</param>
|
/// <param name="other">A vector to compare with this vector.</param>
|
||||||
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
|
||||||
public bool Equals(Vector4d other)
|
public bool Equals(Vector4d other)
|
||||||
{
|
{
|
||||||
|
|
|
@ -238,7 +238,6 @@ namespace OpenTK.Math
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns this Half4 instance's contents as Vector4d.
|
/// Returns this Half4 instance's contents as Vector4d.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="v">OpenTK.Math.Vector4d</param>
|
|
||||||
public Vector4d ToVector4d()
|
public Vector4d ToVector4d()
|
||||||
{
|
{
|
||||||
return new Vector4d(X, Y, Z, W);
|
return new Vector4d(X, Y, Z, W);
|
||||||
|
|
|
@ -29,7 +29,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
IntPtr contextRef;
|
IntPtr contextRef;
|
||||||
|
|
||||||
bool mVSync = false;
|
bool mVSync = false;
|
||||||
IntPtr displayID;
|
// Todo: keep track of which display adapter was specified when the context was created.
|
||||||
|
// IntPtr displayID;
|
||||||
|
|
||||||
GraphicsMode graphics_mode;
|
GraphicsMode graphics_mode;
|
||||||
CarbonWindowInfo carbonWindow;
|
CarbonWindowInfo carbonWindow;
|
||||||
|
|
|
@ -585,7 +585,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
this.context.MakeCurrent(window);
|
this.context.MakeCurrent(window);
|
||||||
|
|
||||||
context = this.context;
|
context = this.context;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DestroyWindow()
|
public void DestroyWindow()
|
||||||
|
@ -641,8 +640,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public event CreateEvent Create;
|
public event CreateEvent Create = delegate(object sender, EventArgs e) { };
|
||||||
public event DestroyEvent Destroy;
|
public event DestroyEvent Destroy = delegate(object sender, EventArgs e) { };
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -654,7 +653,6 @@ namespace OpenTK.Platform.MacOS
|
||||||
|
|
||||||
#region INativeGLWindow Members
|
#region INativeGLWindow Members
|
||||||
|
|
||||||
|
|
||||||
public WindowState WindowState
|
public WindowState WindowState
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -249,7 +249,8 @@ namespace OpenTK.Platform
|
||||||
/// currently running on. This will create a handle for the control, so it is not
|
/// currently running on. This will create a handle for the control, so it is not
|
||||||
/// recommended that this be called in the constructor of a custom control.
|
/// recommended that this be called in the constructor of a custom control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="cntrl"></param>
|
/// <param name="mode">The desired GraphicsMode for this window.</param>
|
||||||
|
/// <param name="cntrl">A <see cref="System.Windows.Forms.Control"/> to get the IWindowInfo from.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IWindowInfo CreateWindowInfo(Graphics.GraphicsMode mode, Control cntrl)
|
public static IWindowInfo CreateWindowInfo(Graphics.GraphicsMode mode, Control cntrl)
|
||||||
{
|
{
|
||||||
|
@ -259,6 +260,7 @@ namespace OpenTK.Platform
|
||||||
/// Creates an object which implements the IWindowInfo interface for the platform
|
/// Creates an object which implements the IWindowInfo interface for the platform
|
||||||
/// currently running on.
|
/// currently running on.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="mode">The desired GraphicsMode for this window.</param>
|
||||||
/// <param name="controlHandle">The handle to the control, obtained from Control.Handle.</param>
|
/// <param name="controlHandle">The handle to the control, obtained from Control.Handle.</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IWindowInfo CreateWindowInfo(Graphics.GraphicsMode mode, IntPtr controlHandle)
|
public static IWindowInfo CreateWindowInfo(Graphics.GraphicsMode mode, IntPtr controlHandle)
|
||||||
|
|
|
@ -289,10 +289,9 @@ namespace OpenTK.Platform.Windows
|
||||||
/// Low-level WINAPI function that retriives the next message in the queue.
|
/// Low-level WINAPI function that retriives the next message in the queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="msg">The pending message (if any) is stored here.</param>
|
/// <param name="msg">The pending message (if any) is stored here.</param>
|
||||||
/// <param name="hWnd">Not used</param>
|
/// <param name="windowHandle">Not used</param>
|
||||||
/// <param name="messageFilterMin">Not used</param>
|
/// <param name="messageFilterMin">Not used</param>
|
||||||
/// <param name="messageFilterMax">Not used</param>
|
/// <param name="messageFilterMax">Not used</param>
|
||||||
/// <param name="flags">Not used</param>
|
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// Nonzero indicates that the function retrieves a message other than WM_QUIT.
|
/// Nonzero indicates that the function retrieves a message other than WM_QUIT.
|
||||||
/// Zero indicates that the function retrieves the WM_QUIT message, or that lpMsg is an invalid pointer.
|
/// Zero indicates that the function retrieves the WM_QUIT message, or that lpMsg is an invalid pointer.
|
||||||
|
@ -435,7 +434,7 @@ namespace OpenTK.Platform.Windows
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hwnd"></param>
|
/// <param name="hwnd"></param>
|
||||||
/// <param name="hDC"></param>
|
/// <param name="DC"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
[return: MarshalAs(UnmanagedType.Bool)]
|
[return: MarshalAs(UnmanagedType.Bool)]
|
||||||
|
@ -506,7 +505,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="funcname"></param>
|
/// <param name="dllName"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[DllImport("kernel32.dll", SetLastError = true)]
|
[DllImport("kernel32.dll", SetLastError = true)]
|
||||||
internal static extern IntPtr LoadLibrary(string dllName);
|
internal static extern IntPtr LoadLibrary(string dllName);
|
||||||
|
@ -629,7 +628,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// Converts the screen coordinates of a specified point on the screen to client-area coordinates.
|
/// Converts the screen coordinates of a specified point on the screen to client-area coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hWnd">Handle to the window whose client area will be used for the conversion.</param>
|
/// <param name="hWnd">Handle to the window whose client area will be used for the conversion.</param>
|
||||||
/// <param name="lpPoint">Pointer to a POINT structure that specifies the screen coordinates to be converted.</param>
|
/// <param name="point">Pointer to a POINT structure that specifies the screen coordinates to be converted.</param>
|
||||||
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.</returns>
|
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.</returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>The function uses the window identified by the hWnd parameter and the screen coordinates given in the POINT structure to compute client coordinates. It then replaces the screen coordinates with the client coordinates. The new coordinates are relative to the upper-left corner of the specified window's client area. </para>
|
/// <para>The function uses the window identified by the hWnd parameter and the screen coordinates given in the POINT structure to compute client coordinates. It then replaces the screen coordinates with the client coordinates. The new coordinates are relative to the upper-left corner of the specified window's client area. </para>
|
||||||
|
@ -649,7 +648,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// Converts the client-area coordinates of a specified point to screen coordinates.
|
/// Converts the client-area coordinates of a specified point to screen coordinates.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="hWnd">Handle to the window whose client area will be used for the conversion.</param>
|
/// <param name="hWnd">Handle to the window whose client area will be used for the conversion.</param>
|
||||||
/// <param name="lpPoint">Pointer to a POINT structure that contains the client coordinates to be converted. The new screen coordinates are copied into this structure if the function succeeds.</param>
|
/// <param name="point">Pointer to a POINT structure that contains the client coordinates to be converted. The new screen coordinates are copied into this structure if the function succeeds.</param>
|
||||||
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.</returns>
|
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.</returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>The ClientToScreen function replaces the client-area coordinates in the POINT structure with the screen coordinates. The screen coordinates are relative to the upper-left corner of the screen. Note, a screen-coordinate point that is above the window's client area has a negative y-coordinate. Similarly, a screen coordinate to the left of a client area has a negative x-coordinate.</para>
|
/// <para>The ClientToScreen function replaces the client-area coordinates in the POINT structure with the screen coordinates. The screen coordinates are relative to the upper-left corner of the screen. Note, a screen-coordinate point that is above the window's client area has a negative y-coordinate. Similarly, a screen coordinate to the left of a client area has a negative x-coordinate.</para>
|
||||||
|
@ -1511,8 +1510,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// character cell.
|
/// character cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>The values of <b>GlyphMetricsFloat</b> are specified as notional units.</remarks>
|
/// <remarks>The values of <b>GlyphMetricsFloat</b> are specified as notional units.</remarks>
|
||||||
/// <seealso cref="POINTFLOAT" />
|
/// <seealso cref="PointFloat" />
|
||||||
/// <seealso cref="Wgl.wglUseFontOutlines" />
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct GlyphMetricsFloat
|
internal struct GlyphMetricsFloat
|
||||||
{
|
{
|
||||||
|
@ -1543,9 +1541,9 @@ namespace OpenTK.Platform.Windows
|
||||||
#region PointFloat
|
#region PointFloat
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The <b>POINTFLOAT</b> structure contains the x and y coordinates of a point.
|
/// The <b>PointFloat</b> structure contains the x and y coordinates of a point.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <seealso cref="GLYPHMETRICSFLOAT" />
|
/// <seealso cref="GlyphMetricsFloat" />
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct PointFloat
|
internal struct PointFloat
|
||||||
{
|
{
|
||||||
|
@ -3159,10 +3157,10 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#region QueueStatusFlags
|
#region QueueStatusFlags
|
||||||
|
|
||||||
[Flags]
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
|
/// Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Flags]
|
||||||
internal enum QueueStatusFlags
|
internal enum QueueStatusFlags
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3513,7 +3511,7 @@ namespace OpenTK.Platform.Windows
|
||||||
#region ShowWindowCommand
|
#region ShowWindowCommand
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
// ShowWindow() Commands
|
/// ShowWindow() Commands
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal enum ShowWindowCommand
|
internal enum ShowWindowCommand
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a Wgl extension is supported by the given context.
|
/// Checks if a Wgl extension is supported by the given context.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="deviceContext">The device context.</param>
|
/// <param name="context">The device context.</param>
|
||||||
/// <param name="ext">The extension to check.</param>
|
/// <param name="ext">The extension to check.</param>
|
||||||
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
|
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
|
||||||
public static bool SupportsExtension(WinGLContext context, string ext)
|
public static bool SupportsExtension(WinGLContext context, string ext)
|
||||||
|
|
|
@ -43,9 +43,10 @@ namespace OpenTK.Platform.Windows
|
||||||
List<JoystickDevice> sticks = new List<JoystickDevice>();
|
List<JoystickDevice> sticks = new List<JoystickDevice>();
|
||||||
IList<JoystickDevice> sticks_readonly;
|
IList<JoystickDevice> sticks_readonly;
|
||||||
|
|
||||||
static readonly string RegistryJoyConfig = @"Joystick%dConfiguration";
|
// Todo: Read the joystick name from the registry.
|
||||||
static readonly string RegistryJoyName = @"Joystick%dOEMName";
|
//static readonly string RegistryJoyConfig = @"Joystick%dConfiguration";
|
||||||
static readonly string RegstryJoyCurrent = @"CurrentJoystickSettings";
|
//static readonly string RegistryJoyName = @"Joystick%dOEMName";
|
||||||
|
//static readonly string RegstryJoyCurrent = @"CurrentJoystickSettings";
|
||||||
|
|
||||||
bool disposed;
|
bool disposed;
|
||||||
|
|
||||||
|
@ -113,17 +114,17 @@ namespace OpenTK.Platform.Windows
|
||||||
stick.Details.PovType |= PovType.Continuous;
|
stick.Details.PovType |= PovType.Continuous;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to get the device name from the registry. Oh joy!
|
// Todo: Try to get the device name from the registry. Oh joy!
|
||||||
string key_path = String.Format("{0}\\{1}\\{2}", RegistryJoyConfig, caps.RegKey, RegstryJoyCurrent);
|
//string key_path = String.Format("{0}\\{1}\\{2}", RegistryJoyConfig, caps.RegKey, RegstryJoyCurrent);
|
||||||
RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path, false);
|
//RegistryKey key = Registry.LocalMachine.OpenSubKey(key_path, false);
|
||||||
if (key == null)
|
//if (key == null)
|
||||||
key = Registry.CurrentUser.OpenSubKey(key_path, false);
|
// key = Registry.CurrentUser.OpenSubKey(key_path, false);
|
||||||
if (key == null)
|
//if (key == null)
|
||||||
stick.Description = String.Format("USB Joystick {0} ({1} axes, {2} buttons)", number, stick.Axis.Count, stick.Button.Count);
|
// stick.Description = String.Format("USB Joystick {0} ({1} axes, {2} buttons)", number, stick.Axis.Count, stick.Button.Count);
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
key.Close();
|
// key.Close();
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (stick != null)
|
if (stick != null)
|
||||||
Debug.Print("Found joystick on device number {0}", number);
|
Debug.Print("Found joystick on device number {0}", number);
|
||||||
|
|
|
@ -170,7 +170,7 @@ namespace OpenTK.Platform.X11
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="buffer">A pointer to the structure that will be freed.</param>
|
/// <param name="buffer">A pointer to the structure that will be freed.</param>
|
||||||
[DllImport(_dll_name, EntryPoint = "XFree")]
|
[DllImport(_dll_name, EntryPoint = "XFree")]
|
||||||
extern public static void Free(IntPtr data);
|
extern public static void Free(IntPtr buffer);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ using System.Drawing;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
/// X11 Version
|
// X11 Version
|
||||||
namespace OpenTK.Platform.X11
|
namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue