Documentation updates. Getting rid of all remaining warnings in debug build.

This commit is contained in:
the_fiddler 2008-01-20 19:29:42 +00:00
Родитель 5a66d44f19
Коммит 878af03601
14 изменённых файлов: 97 добавлений и 106 удалений

Просмотреть файл

@ -27,7 +27,7 @@ namespace Bind
// TODO: This code is too fragile.
// Old enums code:
public static string normalEnumsClassOverride;
public static string normalEnumsClassOverride = null;
public static string NestedEnumsClass = "Enums";
public static string NormalEnumsClass
{

Просмотреть файл

@ -386,7 +386,7 @@ namespace OpenTK.Build
//DirectoryInfo dir;
//FileInfo[] files;
//DirectoryInfo[] dirs;
string tmppath;
//string tmppath;
//determine if the destination directory exists, if not create it
if (!Directory.Exists(destdir))

Просмотреть файл

@ -160,7 +160,7 @@ namespace Examples
Debug.Print(expt.ToString());
#if DEBUG
throw;
//throw;
#endif
}
catch (NullReferenceException expt)

Просмотреть файл

@ -64,7 +64,7 @@ namespace OpenTK
double update_period, render_period;
double target_update_period, target_render_period, target_render_period_doubled;
// TODO: Implement these:
double update_time, render_time, event_time;
double update_time, render_time;//, event_time;
//bool allow_sleep = true; // If true, GameWindow will call Timer.Sleep() if there is enough time.
int width, height;
VSyncMode vsync;

Просмотреть файл

@ -220,7 +220,7 @@ namespace OpenTK.Input
#endregion
}
//public delegate void MouseMoveEvent(MouseDevice sender, MouseMoveData key);
public delegate void MouseMoveEvent(MouseDevice sender);
public delegate void MouseButtonDownEvent(MouseDevice sender, MouseButton button);
public delegate void MouseButtonUpEvent(MouseDevice sender, MouseButton button);
@ -247,65 +247,4 @@ namespace OpenTK.Input
}
#endregion
#region internal class MouseMoveData
/// <summary>
/// Not used yet.
/// </summary>
internal class MouseMoveData
{
private int x;
private int y;
private int deltaX;
private int deltaY;
private int wheel, deltaWheel;
/// <summary>
/// Gets the absolute X position of the mouse in screen pixel coordinates.
/// </summary>
public int X
{
get { return x; }
internal set { x = value; }
}
/// <summary>
/// Gets the absolute Y position of the mouse in screen pixel coordinates.
/// </summary>
public int Y
{
get { return y; }
internal set { y = value; }
}
/// <summary>
/// Gets the relative movement of the mouse in the X direction, in pixels.
/// </summary>
public int DeltaX
{
get { return deltaX; }
internal set { deltaX = value; }
}
/// <summary>
/// Gets the relative movement of the mouse in the Y direction, in pixels.
/// </summary>
public int DeltaY
{
get { return deltaY; }
internal set { deltaY = value; }
}
/// <summary>
/// Gets data relevant to the mouse wheel.
/// </summary>
//public MouseWheel Wheel
//{
// get { return wheel; }
// internal set { wheel = value; }
//}
}
#endregion
}

Просмотреть файл

@ -63,21 +63,21 @@ namespace OpenTK.Math
/// <summary>Converts the vector into left double-precision floating point number pointer.</summary>
/// <param name="vector">The vector being converted.</param>
/// <returns>A double-precision floating point number pointer to the vector coordinates.</returns>
unsafe public static explicit operator double*(Vector2d vector)
{
return &vector.X;
}
//unsafe public static explicit operator double*(Vector2d vector)
//{
// return &vector.X;
//}
/// <summary>Converts the vector into an IntPtr.</summary>
/// <param name="vector">The vector being converted.</param>
/// <returns>An IntPtr to the vector coordinates.</returns>
public static explicit operator IntPtr(Vector2d vector)
{
unsafe
{
return (IntPtr)(&vector.X);
}
}
//public static explicit operator IntPtr(Vector2d vector)
//{
// unsafe
// {
// return (IntPtr)(&vector.X);
// }
//}
#endregion
@ -119,6 +119,7 @@ namespace OpenTK.Math
/// <summary>Indicates whether the current vector is equal to another vector.</summary>
/// <param name="vector">An vector to compare with this vector.</param>
/// <returns>true if the current vector is equal to the vector parameter; otherwise, false.</returns>
[CLSCompliant(false)]
public bool Equals(Vector2d vector)
{
return

Просмотреть файл

@ -391,7 +391,7 @@ namespace OpenTK.OpenAL
#region Create Source objects
[CLSCompliant(false),DllImport(AL.Lib,EntryPoint = "alGenSources",ExactSpelling = true,CallingConvention = AL.Style),SuppressUnmanagedCodeSecurity( )]
[DllImport(AL.Lib,EntryPoint = "alGenSources",ExactSpelling = true,CallingConvention = AL.Style),SuppressUnmanagedCodeSecurity( )]
unsafe private static extern void GenSourcesPrivate( int n,[Out] uint* sources );
// AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* Sources );

Просмотреть файл

@ -21,7 +21,7 @@ namespace OpenTK.OpenAL
#region alGenEffects
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
[CLSCompliant(false)]
//[CLSCompliant(false)]
unsafe private delegate void Delegate_alGenEffects( int n,[Out] uint* effects );
//[CLSCompliant(false)]
@ -63,7 +63,7 @@ namespace OpenTK.OpenAL
#region alDeleteEffects
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
[CLSCompliant(false)]
//[CLSCompliant(false)]
unsafe private delegate void Delegate_alDeleteEffects( int n,[In] uint* effects );
//[CLSCompliant(false)]
@ -173,11 +173,11 @@ namespace OpenTK.OpenAL
#region alEffectfv
[CLSCompliant(false)]
//[CLSCompliant(false)]
unsafe private delegate void Delegate_alEffectfv(uint eid, Enums.EfxEffect3f param, [In] float* values);
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
[CLSCompliant(false)]
//[CLSCompliant(false)]
private Delegate_alEffectfv Imported_alEffectfv;
[CLSCompliant(false)]
@ -665,10 +665,10 @@ namespace OpenTK.OpenAL
#region alGetAuxiliaryEffectSlotf
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
[CLSCompliant(false)]
//[CLSCompliant(false)]
unsafe private delegate void Delegate_alGetAuxiliaryEffectSlotf( uint asid,Enums.EfxAuxiliaryf pname,[Out] float* value );
[CLSCompliant(false)]
//[CLSCompliant(false)]
private Delegate_alGetAuxiliaryEffectSlotf Imported_alGetAuxiliaryEffectSlotf;
/// <summary>This function is used to retrieve floating properties on Auxiliary Effect Slot objects.</summary>

Просмотреть файл

@ -16,21 +16,23 @@ namespace OpenTK.OpenAL
public partial class EfxExtension
{
// TODO: CLS compliance.
[CLSCompliant(false)]
public struct EaxReverb
{
public uint _Environment;
public float _EnvironmentSize;
public float _EnvironmentDiffusion;
public int _Room;
public int _RoomHF;
public int _RoomLF;
public uint Environment; // TODO: EAX-EFX conversion
public float EnvironmentSize; // TODO: EAX-EFX conversion
public float EnvironmentDiffusion; // TODO: EAX-EFX conversion
public int Room; // TODO: EAX-EFX conversion
public int RoomHF; // TODO: EAX-EFX conversion
public int RoomLF; // TODO: EAX-EFX conversion
public float DecayTime;
public float DecayHFRatio;
public float DecayLFRatio;
public int _Reflections;
public int Reflections; // TODO: EAX-EFX conversion
public float ReflectionsDelay;
public Vector3 ReflectionsPan;
public int _Reverb;
public int Reverb; // TODO: EAX-EFX conversion
public float ReverbDelay;
public Vector3 ReverbPan;
public float EchoTime;
@ -41,7 +43,7 @@ namespace OpenTK.OpenAL
public float HFReference;
public float LFReference;
public float RoomRolloffFactor;
public uint _Flags;
public uint Flags; // TODO: EAX-EFX conversion
public EaxReverb( uint environment,
float environmentSize,
@ -72,19 +74,19 @@ namespace OpenTK.OpenAL
float roomRolloffFactor,
uint flags )
{
_Environment = environment;
_EnvironmentSize = environmentSize;
_EnvironmentDiffusion = environmentDiffusion;
_Room = room;
_RoomHF = roomHF;
_RoomLF = roomLF;
Environment = environment;
EnvironmentSize = environmentSize;
EnvironmentDiffusion = environmentDiffusion;
Room = room;
RoomHF = roomHF;
RoomLF = roomLF;
DecayTime = decayTime;
DecayHFRatio = decayHFRatio;
DecayLFRatio = decayLFRatio;
_Reflections = reflections;
Reflections = reflections;
ReflectionsDelay = reflectionsDelay;
ReflectionsPan = new Vector3(reflectionsPanX,reflectionsPanY,reflectionsPanZ);
_Reverb = reverb;
Reverb = reverb;
ReverbDelay = reverbDelay;
ReverbPan = new Vector3(reverbPanX,reverbPanY,reverbPanZ);
EchoTime = echoTime;
@ -95,11 +97,13 @@ namespace OpenTK.OpenAL
HFReference = hfReference;
LFReference = lfReference;
RoomRolloffFactor = roomRolloffFactor;
_Flags = flags;
Flags = flags;
}
}
// TODO: CLS compliance.
[CLSCompliant(false)]
public static void GetEaxFromEfxEax( ref EaxReverb input,out EfxEaxReverb output )
{
output.AirAbsorptionGainHF = 0.995f; // input.AirAbsorptionHF * somegain?
@ -200,8 +204,9 @@ namespace OpenTK.OpenAL
void ConvertOcclusionParameters(EAXOCCLUSIONPROPERTIES *pOcProp, EFXLOWPASSFILTER *pDirectLowPassFilter, EFXLOWPASSFILTER *pSendLowPassFilter);
*/
// TODO: CLS compliance.
///<summary>EAX Reverb Presets in legacy format - use ConvertReverbParameters() to convert to EFX EAX Reverb Presets for use with the OpenAL Effects Extension.</summary>
[CLSCompliant(false)]
public static class ReverbPresets
{
// CASTLE PRESETS

Просмотреть файл

@ -42,6 +42,7 @@ namespace OpenTK.Platform
public IntPtr GetCurrentContext() { return IntPtr.Zero; }
public event DestroyEvent<IGLContext> Destroy;
void OnDestroy() { if (Destroy != null) Destroy(this, EventArgs.Empty); }
public void RegisterForDisposal(IDisposable resource)
{

Просмотреть файл

@ -186,6 +186,7 @@ namespace OpenTK.Platform.Windows
#endif
#endregion
/// <summary>Contains ARB extensions for WGL.</summary>
public static partial class Arb
{
private static string[] extensions;
@ -211,5 +212,32 @@ namespace OpenTK.Platform.Windows
return false;
}
}
/// <summary>Contains EXT extensions for WGL.</summary>
public static partial class Ext
{
private static string[] extensions;
/// <summary>
/// Checks if a Wgl extension is supported by the given context.
/// </summary>
/// <param name="deviceContext">The device context.</param>
/// <param name="ext">The extension to check.</param>
/// <returns>True if the extension is supported by the given context, false otherwise</returns>
public static bool SupportsExtension(IntPtr deviceContext, string ext)
{
if (Wgl.Delegates.wglGetExtensionsStringEXT != null)
{
if (extensions == null || reload_ext_extension_strings)
{
extensions = Wgl.Ext.GetExtensionsString().Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
Array.Sort(extensions);
reload_ext_extension_strings = false;
}
return Array.BinarySearch(extensions, ext) != -1;
}
return false;
}
}
}
}

Просмотреть файл

@ -254,16 +254,23 @@ namespace OpenTK.Platform.Windows
#endregion
#region void IGLContextInternal.RegisterForDisposal(IDisposable resource)
void IGLContextInternal.RegisterForDisposal(IDisposable resource)
{
throw new NotImplementedException("Use the general GLContext class instead.");
throw new NotSupportedException("Use OpenTK.GLContext instead.");
}
#endregion
#region void IGLContextInternal.DisposeResources()
void IGLContextInternal.DisposeResources()
{
throw new NotImplementedException("Use the general GLContext class instead.");
throw new NotSupportedException("Use OpenTK.GLContext instead.");
}
#endregion
#endregion

Просмотреть файл

@ -308,6 +308,16 @@ namespace OpenTK.Platform.X11
#endregion
#region --- Public Methods ---
void OnDestroy()
{
if (Destroy != null)
Destroy(this, EventArgs.Empty);
}
#endregion
#region --- IDisposable Members ---
public void Dispose()

Просмотреть файл

@ -400,7 +400,7 @@ namespace OpenTK.Platform.X11
// Register for window destroy notification
IntPtr wm_destroy_atom = Functions.XInternAtom(window.Display,
"WM_DELETE_WINDOW", true);
XWMHints hint = new XWMHints();
//XWMHints hint = new XWMHints();
Functions.XSetWMProtocols(window.Display, window.Handle, new IntPtr[] { wm_destroy_atom }, 1);
Top = Left = 0;