mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 00:25:29 +00:00
Fixed a large amount of documentation warnings.
Marked several APIs as obsolete.
This commit is contained in:
parent
83bcde95f9
commit
5c40ce638d
|
@ -15,9 +15,11 @@ using OpenTK.Math;
|
|||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to the OpenAL effects extension.
|
||||
/// </summary>
|
||||
public partial class EffectsExtension
|
||||
{
|
||||
|
||||
#region Helpers
|
||||
|
||||
#region BindEffect
|
||||
|
|
|
@ -15,7 +15,11 @@ namespace OpenTK.Audio
|
|||
{
|
||||
public partial class EffectsExtension
|
||||
{
|
||||
// TODO: CLS compliance.
|
||||
// Todo: Add documentation
|
||||
// Todo: CLS compliance.
|
||||
|
||||
#pragma warning disable 1591
|
||||
|
||||
[CLSCompliant(false)]
|
||||
public struct EaxReverb
|
||||
{
|
||||
|
@ -360,6 +364,7 @@ namespace OpenTK.Audio
|
|||
public static EaxReverb Chapel = new EaxReverb(26, 19.6f, 0.840f, -1000, -500, 0, 4.62f, 0.64f, 1.23f, -700, 0.032f, 0f, 0f, 0f, -200, 0.049f, 0f, 0f, 0f, 0.250f, 0f, 0.250f, 0.110f, -5f, 5000f, 250f, 0f, 0x3f);
|
||||
public static EaxReverb Smallwaterroom = new EaxReverb(26, 36.2f, 0.700f, -1000, -698, 0, 1.51f, 1.25f, 1.14f, -100, 0.020f, 0f, 0f, 0f, 300, 0.030f, 0f, 0f, 0f, 0.179f, 0.150f, 0.895f, 0.190f, -7f, 5000f, 250f, 0f, 0x0);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore 1591
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,28 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do
|
||||
// so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
@ -9,8 +30,6 @@ using System;
|
|||
namespace OpenTK
|
||||
{
|
||||
|
||||
#region public class ContextExistsException : ApplicationException
|
||||
|
||||
/// <summary>
|
||||
/// This exception is thrown when a GraphicsContext property cannot be changed after creation.
|
||||
/// </summary>
|
||||
|
@ -18,11 +37,18 @@ namespace OpenTK
|
|||
{
|
||||
string msg;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new ContextExistsException instance.
|
||||
/// </summary>
|
||||
/// <param name="message">A System.String explaining the cause of this exception.</param>
|
||||
public ContextExistsException(string message)
|
||||
{
|
||||
msg = message;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a System.String explaining the cause of this exception.
|
||||
/// </summary>
|
||||
public override string Message
|
||||
{
|
||||
get
|
||||
|
@ -31,6 +57,4 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
|
@ -25,14 +25,7 @@ namespace OpenTK.Graphics
|
|||
|
||||
#region public DisplayResolution(int width, int height, int bitsPerPixel, float refreshRate)
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new DisplayResolution object for the primary DisplayDevice.
|
||||
/// </summary>
|
||||
/// <param name="width">The requested width in pixels.</param>
|
||||
/// <param name="height">The requested height in pixels.</param>
|
||||
/// <param name="bitsPerPixel">The requested bits per pixel in bits.</param>
|
||||
/// <param name="refreshRate">The requested refresh rate in Herz.</param>
|
||||
/// <remarks>OpenTK will select the closest match between all available resolutions on the primary DisplayDevice.</remarks>
|
||||
// Creates a new DisplayResolution object for the primary DisplayDevice.
|
||||
internal DisplayResolution(int x, int y, int width, int height, int bitsPerPixel, float refreshRate)
|
||||
{
|
||||
// Refresh rate may be zero, since this information may not be available on some platforms.
|
||||
|
|
|
@ -614,6 +614,11 @@ namespace OpenTK.Graphics
|
|||
|
||||
#region --- GL Overloads ---
|
||||
|
||||
#pragma warning disable 3019
|
||||
#pragma warning disable 1591
|
||||
#pragma warning disable 1572
|
||||
#pragma warning disable 1573
|
||||
|
||||
#region public static void Color[34]() overloads
|
||||
|
||||
public static void Color3(System.Drawing.Color color)
|
||||
|
@ -1242,6 +1247,11 @@ namespace OpenTK.Graphics
|
|||
|
||||
#endregion
|
||||
|
||||
#pragma warning restore 3019
|
||||
#pragma warning restore 1591
|
||||
#pragma warning restore 1572
|
||||
#pragma warning restore 1573
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -384,6 +384,7 @@ namespace OpenTK.Graphics
|
|||
/// <summary>
|
||||
/// Raised when a Context is destroyed.
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
public event DestroyEvent<IGraphicsContext> Destroy
|
||||
{
|
||||
add { implementation.Destroy += value; }
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace OpenTK.Graphics
|
|||
bool ErrorChecking { get; set; }
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public delegate void DestroyEvent<T>(T sender, EventArgs e);
|
||||
|
||||
// Functions for internal use by OpenTK.
|
||||
|
@ -75,18 +76,14 @@ namespace OpenTK.Graphics
|
|||
/// </summary>
|
||||
public interface IGraphicsContextInternal
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the internal implementation of the current instance.
|
||||
/// </summary>
|
||||
IGraphicsContext Implementation { get; }
|
||||
|
||||
///// <summary>
|
||||
///// Creates an OpenGL context with the specified direct/indirect rendering mode and sharing state with the
|
||||
///// specified IGraphicsContext.
|
||||
///// </summary>
|
||||
///// <param name="direct">Set to true for direct rendering or false otherwise.</param>
|
||||
///// <param name="source">The source IGraphicsContext to share state from.</param>.
|
||||
///// <seealso cref="CreateContext(bool)"/>
|
||||
//void CreateContext(bool direct, IGraphicsContext source);
|
||||
|
||||
/// <summary>Prepares the entry points for OpenGL.</summary>
|
||||
/// <summary>
|
||||
/// Prepares the entry points for OpenGL.
|
||||
/// </summary>
|
||||
void LoadAll();
|
||||
|
||||
/// <summary>
|
||||
|
@ -94,18 +91,6 @@ namespace OpenTK.Graphics
|
|||
/// </summary>
|
||||
ContextHandle Context { get; }
|
||||
|
||||
// <summary>
|
||||
// Gets the IWindowInfo describing the window associated with this context.
|
||||
// </summary>
|
||||
//IWindowInfo Info { get; }
|
||||
|
||||
///// <summary>
|
||||
///// Gets a System.IntPtr containing the handle to the OpenGL context which is current in the
|
||||
///// calling thread, or IntPtr.Zero if no OpenGL context is current.
|
||||
///// </summary>
|
||||
///// <returns>A System.IntPtr that holds the handle to the current OpenGL context.</returns>
|
||||
//ContextHandle GetCurrentContext();
|
||||
|
||||
/// <summary>
|
||||
/// Registers an OpenGL resource for disposal.
|
||||
/// </summary>
|
||||
|
@ -116,11 +101,13 @@ namespace OpenTK.Graphics
|
|||
/// a resource for disposal during the finalizer call, and call DisposeResources()
|
||||
/// from the main thread to dispose it.
|
||||
/// </remarks>
|
||||
[Obsolete]
|
||||
void RegisterForDisposal(IDisposable resource);
|
||||
|
||||
/// <summary>
|
||||
/// Disposes all registered OpenGL resources.
|
||||
/// </summary>
|
||||
[Obsolete]
|
||||
void DisposeResources();
|
||||
|
||||
/// <summary>
|
||||
|
@ -131,7 +118,6 @@ namespace OpenTK.Graphics
|
|||
/// A pointer to the specified function or IntPtr.Zero if the function isn't
|
||||
/// available in the current opengl context.
|
||||
/// </returns>
|
||||
// /// <see cref="Marshal.GetDelegateForFunctionPointer"/>
|
||||
IntPtr GetAddress(string function);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,9 +77,4 @@ namespace OpenTK.Platform
|
|||
/// </summary>
|
||||
event EventHandler<FrameEventArgs> RenderFrame;
|
||||
}
|
||||
|
||||
[Obsolete] public delegate void UpdateFrameEvent(GameWindow sender, UpdateFrameEventArgs e);
|
||||
[Obsolete] public delegate void RenderFrameEvent(GameWindow sender, RenderFrameEventArgs e);
|
||||
[Obsolete] public delegate void LoadEvent(GameWindow sender, EventArgs e);
|
||||
[Obsolete] public delegate void UnloadEvent(GameWindow sender, EventArgs e);
|
||||
}
|
||||
|
|
|
@ -70,12 +70,12 @@ namespace OpenTK
|
|||
IWindowInfo WindowInfo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="OpenTK.WindowState"> for this window.
|
||||
/// Gets or sets the <see cref="OpenTK.WindowState"/> for this window.
|
||||
/// </summary>
|
||||
WindowState WindowState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="OpenTK.WindowBorder"> for this window.
|
||||
/// Gets or sets the <see cref="OpenTK.WindowBorder"/> for this window.
|
||||
/// </summary>
|
||||
WindowBorder WindowBorder { get; set; }
|
||||
|
||||
|
@ -86,12 +86,12 @@ namespace OpenTK
|
|||
Rectangle Bounds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a <see cref="System.Drawing.Point"> structure that contains the location of this window on the desktop.
|
||||
/// Gets or sets a <see cref="System.Drawing.Point"/> structure that contains the location of this window on the desktop.
|
||||
/// </summary>
|
||||
Point Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a <see cref="System.Drawing.Size"> structure that contains the external size of this window.
|
||||
/// Gets or sets a <see cref="System.Drawing.Size"/> structure that contains the external size of this window.
|
||||
/// </summary>
|
||||
Size Size { get; set; }
|
||||
|
||||
|
|
|
@ -99,6 +99,17 @@ namespace OpenTK.Math
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an approximation of the inverse square root of left number.
|
||||
/// </summary>
|
||||
/// <param name="x">A number.</param>
|
||||
/// <returns>An approximation of the inverse square root of the specified number, with an upper error bound of 0.001</returns>
|
||||
/// <remarks>
|
||||
/// This is an improved implementation of the the method known as Carmack's inverse square root
|
||||
/// which is found in the Quake III source code. This implementation comes from
|
||||
/// http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see
|
||||
/// http://www.beyond3d.com/content/articles/8/
|
||||
/// </remarks>
|
||||
public static double InverseSqrtFast(double x)
|
||||
{
|
||||
return InverseSqrtFast((float)x);
|
||||
|
|
|
@ -348,7 +348,7 @@ namespace OpenTK.Math
|
|||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// Add the specified instances
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
|
@ -741,6 +741,12 @@ namespace OpenTK.Math
|
|||
|
||||
#region Operators
|
||||
|
||||
/// <summary>
|
||||
/// Adds the specified instances.
|
||||
/// </summary>
|
||||
/// <param name="left">Left operand.</param>
|
||||
/// <param name="right">Right operand.</param>
|
||||
/// <returns>Result of addition.</returns>
|
||||
public static Vector2 operator +(Vector2 left, Vector2 right)
|
||||
{
|
||||
left.X += right.X;
|
||||
|
@ -748,6 +754,12 @@ namespace OpenTK.Math
|
|||
return left;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts the specified instances.
|
||||
/// </summary>
|
||||
/// <param name="left">Left operand.</param>
|
||||
/// <param name="right">Right operand.</param>
|
||||
/// <returns>Result of subtraction.</returns>
|
||||
public static Vector2 operator -(Vector2 left, Vector2 right)
|
||||
{
|
||||
left.X -= right.X;
|
||||
|
@ -755,6 +767,11 @@ namespace OpenTK.Math
|
|||
return left;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Negates the specified instance.
|
||||
/// </summary>
|
||||
/// <param name="vec">Operand.</param>
|
||||
/// <returns>Result of negation.</returns>
|
||||
public static Vector2 operator -(Vector2 vec)
|
||||
{
|
||||
vec.X = -vec.X;
|
||||
|
@ -762,33 +779,63 @@ namespace OpenTK.Math
|
|||
return vec;
|
||||
}
|
||||
|
||||
public static Vector2 operator *(Vector2 vec, float f)
|
||||
/// <summary>
|
||||
/// Multiplies the specified instance by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vec">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of multiplication.</returns>
|
||||
public static Vector2 operator *(Vector2 vec, float scale)
|
||||
{
|
||||
vec.X *= f;
|
||||
vec.Y *= f;
|
||||
vec.X *= scale;
|
||||
vec.Y *= scale;
|
||||
return vec;
|
||||
}
|
||||
|
||||
public static Vector2 operator *(float f, Vector2 vec)
|
||||
/// <summary>
|
||||
/// Multiplies the specified instance by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="scale">Left operand.</param>
|
||||
/// <param name="vec">Right operand.</param>
|
||||
/// <returns>Result of multiplication.</returns>
|
||||
public static Vector2 operator *(float scale, Vector2 vec)
|
||||
{
|
||||
vec.X *= f;
|
||||
vec.Y *= f;
|
||||
vec.X *= scale;
|
||||
vec.Y *= scale;
|
||||
return vec;
|
||||
}
|
||||
|
||||
public static Vector2 operator /(Vector2 vec, float f)
|
||||
/// <summary>
|
||||
/// Divides the specified instance by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vec">Left operand</param>
|
||||
/// <param name="scale">Right operand</param>
|
||||
/// <returns>Result of the division.</returns>
|
||||
public static Vector2 operator /(Vector2 vec, float scale)
|
||||
{
|
||||
float mult = 1.0f / f;
|
||||
float mult = 1.0f / scale;
|
||||
vec.X *= mult;
|
||||
vec.Y *= mult;
|
||||
return vec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified instances for equality.
|
||||
/// </summary>
|
||||
/// <param name="left">Left operand.</param>
|
||||
/// <param name="right">Right operand.</param>
|
||||
/// <returns>True if both instances are equal; false otherwise.</returns>
|
||||
public static bool operator ==(Vector2 left, Vector2 right)
|
||||
{
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified instances for inequality.
|
||||
/// </summary>
|
||||
/// <param name="left">Left operand.</param>
|
||||
/// <param name="right">Right operand.</param>
|
||||
/// <returns>True if both instances are not equal; false otherwise.</returns>
|
||||
public static bool operator !=(Vector2 left, Vector2 right)
|
||||
{
|
||||
return !left.Equals(right);
|
||||
|
|
Loading…
Reference in a new issue