From cb9c755951848cf3f4904f2e5af608e8b6af0e4b Mon Sep 17 00:00:00 2001 From: Donald Eaton Date: Wed, 3 Jan 2024 18:53:33 -0500 Subject: [PATCH] In-code Documentation Update * Addresses requests in #194 and #195 * Updated all [Obsolete] attributes to be less repetitive * Added a large number of quick reference links to existing summaries * Corrected various typos and unparsable markup(\a and \p) * Added additional formatting to numerous summaries, resulting in more readable tooltips * Added a suggestion to use TimeSpan over SFML's Time while working within a managed environment --- src/SFML.Graphics/PrimitiveType.cs | 32 +++-- src/SFML.Graphics/RenderTexture.cs | 5 +- src/SFML.Graphics/RenderWindow.cs | 2 +- src/SFML.Graphics/Shader.cs | 18 +-- src/SFML.Graphics/Text.cs | 90 ++++++------ src/SFML.Graphics/Texture.cs | 3 + src/SFML.Graphics/VertexArray.cs | 41 +++--- src/SFML.Graphics/VertexBuffer.cs | 211 ++++++++++++++++------------- src/SFML.System/Time.cs | 34 +++-- src/SFML.Window/Event.cs | 10 +- src/SFML.Window/EventArgs.cs | 2 +- src/SFML.Window/Keyboard.cs | 10 +- src/SFML.Window/Window.cs | 2 +- 13 files changed, 253 insertions(+), 207 deletions(-) diff --git a/src/SFML.Graphics/PrimitiveType.cs b/src/SFML.Graphics/PrimitiveType.cs index 5d9c918d..9068f13d 100644 --- a/src/SFML.Graphics/PrimitiveType.cs +++ b/src/SFML.Graphics/PrimitiveType.cs @@ -4,46 +4,48 @@ namespace SFML.Graphics { //////////////////////////////////////////////////////////// /// - /// Types of primitives that a VertexArray can render. + /// Types of primitives that a or can render. + /// /// + /// /// Points and lines have no area, therefore their thickness /// will always be 1 pixel, regardless the current transform /// and view. - /// + /// //////////////////////////////////////////////////////////// public enum PrimitiveType { - /// List of individual points + /// Individual Points Points, - /// List of individual lines + /// Individual, Disconnected Lines; each pair of points forms a line Lines, - /// List of connected lines, a point uses the previous point to form a line + /// Connected Lines; each point starts at the previous point to form a line LineStrip, - /// List of individual triangles + /// Individual, Disconnected Triangles Triangles, - /// List of connected triangles, a point uses the two previous points to form a triangle + /// Connected Triangles; each point uses the two previous points to form a triangle TriangleStrip, - /// List of connected triangles, a point uses the common center and the previous point to form a triangle + /// Connected Triangles; each point uses the first point and the previous point to form a triangle TriangleFan, - /// List of individual quads + /// Quadrilaterals; each set of four points forms a 4-sided shape Quads, - /// List of connected lines, a point uses the previous point to form a line - [Obsolete("LinesStrip is deprecated, please use LineStrip")] + /// DEPRECATED: Use LineStrip + [Obsolete("LineStrip")] LinesStrip = LineStrip, - /// List of connected triangles, a point uses the two previous points to form a triangle - [Obsolete("TrianglesStrip is deprecated, please use TriangleStrip")] + /// DEPRECATED: Use TriangleStrip + [Obsolete("Use TriangleStrip")] TrianglesStrip = TriangleStrip, - /// List of connected triangles, a point uses the common center and the previous point to form a triangle - [Obsolete("TrianglesFan is deprecated, please use TriangleFan")] + /// DEPRECATED: Use TriangleFan + [Obsolete("Use TriangleFan")] TrianglesFan = TriangleFan, } } diff --git a/src/SFML.Graphics/RenderTexture.cs b/src/SFML.Graphics/RenderTexture.cs index 89619c0a..5dac187a 100644 --- a/src/SFML.Graphics/RenderTexture.cs +++ b/src/SFML.Graphics/RenderTexture.cs @@ -34,7 +34,7 @@ public RenderTexture(uint width, uint height) : /// Height of the render-texture /// Do you want a depth-buffer attached? //////////////////////////////////////////////////////////// - [Obsolete("Creating a RenderTexture with depthBuffer is deprecated. Use RenderTexture(width, height, contextSettings) instead.")] + [Obsolete("Use RenderTexture(width, height, contextSettings)")] public RenderTexture(uint width, uint height, bool depthBuffer) : base(sfRenderTexture_create(width, height, depthBuffer)) { @@ -525,8 +525,7 @@ protected override void Destroy(bool disposing) private Texture myTexture = null; #region Imports - [Obsolete("sfRenderTexture_create is obselete. Use sfRenderTexture_createWithSettings instead.")] - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] + [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity, Obsolete] private static extern IntPtr sfRenderTexture_create(uint Width, uint Height, bool DepthBuffer); [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] diff --git a/src/SFML.Graphics/RenderWindow.cs b/src/SFML.Graphics/RenderWindow.cs index 1377f67f..af772148 100644 --- a/src/SFML.Graphics/RenderWindow.cs +++ b/src/SFML.Graphics/RenderWindow.cs @@ -678,7 +678,7 @@ public void ResetGLStates() /// /// //////////////////////////////////////////////////////////// - [Obsolete("Capture is deprecated, please see remarks for preferred method")] + [Obsolete("Use Texture and Texture.Update(RenderWindow)")] public Image Capture() { return new Image(sfRenderWindow_capture(CPointer)); diff --git a/src/SFML.Graphics/Shader.cs b/src/SFML.Graphics/Shader.cs index 67bb32a9..f49f6824 100644 --- a/src/SFML.Graphics/Shader.cs +++ b/src/SFML.Graphics/Shader.cs @@ -498,7 +498,7 @@ public unsafe void SetUniformArray(string name, Glsl.Mat4[] array) /// Value to assign /// //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, float x) { sfShader_setFloatParameter(CPointer, name, x); @@ -516,7 +516,7 @@ public void SetParameter(string name, float x) /// First component of the value to assign /// Second component of the value to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, float x, float y) { sfShader_setFloat2Parameter(CPointer, name, x, y); @@ -535,7 +535,7 @@ public void SetParameter(string name, float x, float y) /// Second component of the value to assign /// Third component of the value to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, float x, float y, float z) { sfShader_setFloat3Parameter(CPointer, name, x, y, z); @@ -555,7 +555,7 @@ public void SetParameter(string name, float x, float y, float z) /// Third component of the value to assign /// Fourth component of the value to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, float x, float y, float z, float w) { sfShader_setFloat4Parameter(CPointer, name, x, y, z, w); @@ -572,7 +572,7 @@ public void SetParameter(string name, float x, float y, float z, float w) /// Name of the parameter in the shader /// Vector to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, Vector2f vector) { SetParameter(name, vector.X, vector.Y); @@ -589,7 +589,7 @@ public void SetParameter(string name, Vector2f vector) /// Name of the parameter in the shader /// Color to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, Color color) { sfShader_setColorParameter(CPointer, name, color); @@ -606,7 +606,7 @@ public void SetParameter(string name, Color color) /// Name of the parameter in the shader /// Transform to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, Transform transform) { sfShader_setTransformParameter(CPointer, name, transform); @@ -630,7 +630,7 @@ public void SetParameter(string name, Transform transform) /// Name of the texture in the shader /// Texture to assign //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, Texture texture) { // Keep a reference to the Texture so it doesn't get GC'd @@ -652,7 +652,7 @@ public void SetParameter(string name, Texture texture) /// Name of the texture in the shader /// Always pass the spacial value Shader.CurrentTexture //////////////////////////////////////////////////////////// - [Obsolete("SetParameter is deprecated, please use the corresponding SetUniform")] + [Obsolete("Use SetUniform()")] public void SetParameter(string name, CurrentTextureType current) { sfShader_setCurrentTextureParameter(CPointer, name); diff --git a/src/SFML.Graphics/Text.cs b/src/SFML.Graphics/Text.cs index 149dea48..912ded90 100644 --- a/src/SFML.Graphics/Text.cs +++ b/src/SFML.Graphics/Text.cs @@ -18,25 +18,25 @@ public class Text : Transformable, Drawable { //////////////////////////////////////////////////////////// /// - /// Enumerate the string drawing styles + /// Flags for styles that can be applied to the /// //////////////////////////////////////////////////////////// [Flags] public enum Styles { - /// Regular characters, no style + /// No Style Regular = 0, - /// Bold characters + /// Bold Bold = 1 << 0, - /// Italic characters + /// Italic Italic = 1 << 1, - /// Underlined characters + /// Underlined Underlined = 1 << 2, - /// Strike through characters + /// Strikethrough StrikeThrough = 1 << 3 } @@ -52,7 +52,7 @@ public Text() : //////////////////////////////////////////////////////////// /// - /// Construct the text from a string and a font + /// Construct the text from a string and a /// /// String to display /// Font to use @@ -64,11 +64,11 @@ public Text(string str, Font font) : //////////////////////////////////////////////////////////// /// - /// Construct the text from a string, font and size + /// Construct the text from a string, and size /// /// String to display /// Font to use - /// Base characters size + /// Font size //////////////////////////////////////////////////////////// public Text(string str, Font font, uint characterSize) : base(sfText_create()) @@ -80,7 +80,7 @@ public Text(string str, Font font, uint characterSize) : //////////////////////////////////////////////////////////// /// - /// Construct the text from another text + /// Construct the text from another /// /// Text to copy //////////////////////////////////////////////////////////// @@ -97,18 +97,20 @@ public Text(Text copy) : //////////////////////////////////////////////////////////// /// - /// Fill color of the object + /// DEPRECATED Fill of the /// /// /// - /// Deprecated. Use instead. + /// Use instead. /// - /// By default, the text's fill color is opaque white. - /// Setting the fill color to a transparent color with an outline - /// will cause the outline to be displayed in the fill area of the text. + /// By default, the text's fill is opaque White. + /// + /// Setting the fill color to a transparent with an outline + /// will cause the outline to be displayed in the fill area of the text. + /// /// //////////////////////////////////////////////////////////// - [Obsolete] + [Obsolete("Use FillColor and OutlineColor")] public Color Color { get { return sfText_getFillColor(CPointer); } @@ -117,13 +119,15 @@ public Color Color //////////////////////////////////////////////////////////// /// - /// Fill color of the object + /// Fill of the /// /// /// - /// By default, the text's fill color is opaque white. - /// Setting the fill color to a transparent color with an outline - /// will cause the outline to be displayed in the fill area of the text. + /// By default, the text's fill is opaque White. + /// + /// Setting the fill color to a transparent with an outline + /// will cause the outline to be displayed in the fill area of the text. + /// /// //////////////////////////////////////////////////////////// public Color FillColor @@ -134,11 +138,11 @@ public Color FillColor //////////////////////////////////////////////////////////// /// - /// Outline color of the object + /// Outline of the /// /// /// - /// By default, the text's outline color is opaque black. + /// By default, the text's outline is opaque Black. /// //////////////////////////////////////////////////////////// public Color OutlineColor @@ -212,7 +216,7 @@ public string DisplayedString //////////////////////////////////////////////////////////// /// - /// Font used to display the text + /// used to display the text /// //////////////////////////////////////////////////////////// public Font Font @@ -256,7 +260,7 @@ public float LineSpacing //////////////////////////////////////////////////////////// /// - /// Style of the text (see Styles enum) + /// Style of the text /// //////////////////////////////////////////////////////////// public Styles Style @@ -268,9 +272,11 @@ public Styles Style //////////////////////////////////////////////////////////// /// /// Return the visual position of the Index-th character of the text, - /// in coordinates relative to the text - /// (note : translation, origin, rotation and scale are not applied) - /// + /// in coordinates relative to the text + /// + /// + /// Translation, origin, rotation and scale are not applied. + /// /// Index of the character /// Position of the Index-th character (end of text if Index is out of range) //////////////////////////////////////////////////////////// @@ -281,14 +287,14 @@ public Vector2f FindCharacterPos(uint index) //////////////////////////////////////////////////////////// /// - /// Get the local bounding rectangle of the entity. - /// - /// The returned rectangle is in local coordinates, which means - /// that it ignores the transformations (translation, rotation, - /// scale, ...) that are applied to the entity. - /// In other words, this function returns the bounds of the - /// entity in the entity's coordinate system. + /// Get the local bounding of the text. /// + /// + /// The returned is in local coordinates. + /// Transformations (Translation, Rotation, Scale) are not applied to the entity. + /// In other words, this function returns the bounds of the + /// entity in the entity's coordinate system. + /// /// Local bounding rectangle of the entity //////////////////////////////////////////////////////////// public FloatRect GetLocalBounds() @@ -298,14 +304,14 @@ public FloatRect GetLocalBounds() //////////////////////////////////////////////////////////// /// - /// Get the global bounding rectangle of the entity. - /// - /// The returned rectangle is in global coordinates, which means - /// that it takes in account the transformations (translation, - /// rotation, scale, ...) that are applied to the entity. - /// In other words, this function returns the bounds of the - /// sprite in the global 2D world's coordinate system. + /// Get the global bounding rectangle of the text. /// + /// + /// The returned is in global coordinates. + /// Transformations (Translation, Rotation, Scale) are applied to the entity. + /// In other words, this function returns the bounds of the + /// sprite in the global 2D world's coordinate system. + /// /// Global bounding rectangle of the entity //////////////////////////////////////////////////////////// public FloatRect GetGlobalBounds() @@ -335,7 +341,7 @@ public override string ToString() //////////////////////////////////////////////////////////// /// - /// Draw the text to a render target + /// Draw the text to a /// /// Render target to draw to /// Current render states diff --git a/src/SFML.Graphics/Texture.cs b/src/SFML.Graphics/Texture.cs index b8e904e2..9c47eca0 100644 --- a/src/SFML.Graphics/Texture.cs +++ b/src/SFML.Graphics/Texture.cs @@ -18,6 +18,9 @@ public class Texture : ObjectBase /// /// Construct the texture /// + /// + /// Textures created this way are uninitialized and have indeterminate contents. + /// /// Texture width /// Texture height /// diff --git a/src/SFML.Graphics/VertexArray.cs b/src/SFML.Graphics/VertexArray.cs index d47ff707..58922154 100644 --- a/src/SFML.Graphics/VertexArray.cs +++ b/src/SFML.Graphics/VertexArray.cs @@ -24,7 +24,7 @@ public VertexArray() : //////////////////////////////////////////////////////////// /// - /// Construct the vertex array with a type + /// Construct the vertex array with a /// /// Type of primitives //////////////////////////////////////////////////////////// @@ -36,7 +36,7 @@ public VertexArray(PrimitiveType type) : //////////////////////////////////////////////////////////// /// - /// Construct the vertex array with a type and an initial number of vertices + /// Construct the vertex array with a and an initial number of vertices /// /// Type of primitives /// Initial number of vertices in the array @@ -50,7 +50,7 @@ public VertexArray(PrimitiveType type, uint vertexCount) : //////////////////////////////////////////////////////////// /// - /// Construct the vertex array from another vertex array + /// Construct the vertex array from another /// /// Transformable to copy //////////////////////////////////////////////////////////// @@ -61,7 +61,7 @@ public VertexArray(VertexArray copy) : //////////////////////////////////////////////////////////// /// - /// Total vertex count + /// Total count /// //////////////////////////////////////////////////////////// public uint VertexCount @@ -71,14 +71,15 @@ public uint VertexCount //////////////////////////////////////////////////////////// /// - /// Read-write access to vertices by their index. - /// + /// Read-Write access to vertices by their index. + /// + /// /// This function doesn't check index, it must be in range /// [0, VertexCount - 1]. The behaviour is undefined - /// otherwise. - /// + /// otherwise. See . + /// /// Index of the vertex to get - /// Reference to the index-th vertex + /// Copy of the index-th vertex. //////////////////////////////////////////////////////////// public Vertex this[uint index] { @@ -111,13 +112,14 @@ public void Clear() //////////////////////////////////////////////////////////// /// /// Resize the vertex array - /// - /// If \a vertexCount is greater than the current size, the previous + /// + /// + /// If is greater than the current size, the previous /// vertices are kept and new (default-constructed) vertices are /// added. - /// If \a vertexCount is less than the current size, existing vertices + /// If is less than the current size, existing vertices /// are removed from the array. - /// + /// /// New size of the array (number of vertices) //////////////////////////////////////////////////////////// public void Resize(uint vertexCount) @@ -127,7 +129,7 @@ public void Resize(uint vertexCount) //////////////////////////////////////////////////////////// /// - /// Add a vertex to the array + /// Add a to the array /// /// Vertex to add //////////////////////////////////////////////////////////// @@ -140,6 +142,9 @@ public void Append(Vertex vertex) /// /// Type of primitives to draw /// + /// + /// See + /// //////////////////////////////////////////////////////////// public PrimitiveType PrimitiveType { @@ -150,10 +155,10 @@ public PrimitiveType PrimitiveType //////////////////////////////////////////////////////////// /// /// Compute the bounding rectangle of the vertex array. - /// - /// This function returns the axis-aligned rectangle that - /// contains all the vertices of the array. /// + /// + /// Contains the axis-aligned that contains all the vertices of the array. + /// //////////////////////////////////////////////////////////// public FloatRect Bounds { @@ -162,7 +167,7 @@ public FloatRect Bounds //////////////////////////////////////////////////////////// /// - /// Draw the vertex array to a render target + /// Draw the vertex array to a /// /// Render target to draw to /// Current render states diff --git a/src/SFML.Graphics/VertexBuffer.cs b/src/SFML.Graphics/VertexBuffer.cs index c428b69b..b6cb2d08 100644 --- a/src/SFML.Graphics/VertexBuffer.cs +++ b/src/SFML.Graphics/VertexBuffer.cs @@ -18,46 +18,49 @@ public class VertexBuffer : ObjectBase, Drawable { //////////////////////////////////////////////////////////// /// - /// Usage specifiers - /// - /// If data is going to be updated once or more every frame, - /// set the usage to Stream. If data is going - /// to be set once and used for a long time without being - /// modified, set the usage to Static. - /// For everything else Dynamic should - /// be a good compromise. + /// Usage Specifiers /// + /// + /// If data is going to be updated once or more every frame, use . + /// If data is going to be set once and used for a long time without being modified, use . + /// For everything else, should be a good compromise. + /// //////////////////////////////////////////////////////////// public enum UsageSpecifier { /// Constantly changing data. + /// Use when the will be updated once or more every frame. Stream, /// Occasionally changing data. + /// Use when the will change infrequently. Dynamic, /// Rarely changing data. + /// Use when the will rarely of never be changed. Static } //////////////////////////////////////////////////////////// /// - /// Whether or not the system supports vertex buffers - /// + /// Whether or not the system supports s + /// + /// /// This function should always be called before using /// the vertex buffer features. If it returns false, then - /// any attempt to use sf::VertexBuffer will fail. - /// + /// any attempt to use will fail. + /// /////////////////////////////////////////////////////////// public static bool Available { get { return sfVertexBuffer_isAvailable(); } } //////////////////////////////////////////////////////////// /// - /// Create a new vertex buffer with a specific - /// PrimitiveType and usage specifier. - /// - /// Creates the vertex buffer, allocating enough graphcis - /// memory to hold \p vertexCount vertices, and sets its - /// primitive type to \p type and usage to \p usage. + /// Create a new with a specific + /// and /// + /// + /// Creates the vertex buffer, allocating enough graphics + /// memory to hold vertices, and sets its + /// to primitiveType and to usageType. + /// /// Amount of vertices /// Type of primitives /// Usage specifier @@ -69,7 +72,7 @@ public VertexBuffer(uint vertexCount, PrimitiveType primitiveType, UsageSpecifie //////////////////////////////////////////////////////////// /// - /// Construct the vertex buffer from another vertex array + /// Construct the vertex buffer from another /// /// VertexBuffer to copy //////////////////////////////////////////////////////////// @@ -88,11 +91,12 @@ public VertexBuffer(VertexBuffer copy) //////////////////////////////////////////////////////////// /// /// OpenGL handle of the vertex buffer or 0 if not yet created - /// + /// + /// /// You shouldn't need to use this property, unless you have /// very specific stuff to implement that SFML doesn't support, /// or implement a temporary workaround until a bug is fixed. - /// + /// //////////////////////////////////////////////////////////// public uint NativeHandle { @@ -101,7 +105,7 @@ public uint NativeHandle //////////////////////////////////////////////////////////// /// - /// The type of primitives drawn by the vertex buffer + /// The drawn by the /// //////////////////////////////////////////////////////////// public PrimitiveType PrimitiveType @@ -112,7 +116,7 @@ public PrimitiveType PrimitiveType //////////////////////////////////////////////////////////// /// - /// The usage specifier for the vertex buffer + /// The for the /// //////////////////////////////////////////////////////////// public UsageSpecifier Usage @@ -123,44 +127,54 @@ public UsageSpecifier Usage //////////////////////////////////////////////////////////// /// - /// Bind a vertex buffer for rendering. - /// - /// This function is not part of the graphics API, it mustn't - /// be used when drawing SFML entities. It must be used only if - /// you mix VertexBuffer with OpenGL code. + /// Bind a for rendering. /// - /// The vertex buffer to bind, can be null to use no vertex buffer + /// + /// This function is not part of the graphics API. + /// It must not be used when drawing SFML entities. + /// It must be used only if you mix VertexBuffer with OpenGL code. + /// + /// The vertex buffer to bind; can be null to use no vertex buffer //////////////////////////////////////////////////////////// public static void Bind(VertexBuffer vertexBuffer) { sfVertexBuffer_bind(vertexBuffer?.CPointer ?? IntPtr.Zero); } - + //////////////////////////////////////////////////////////// /// - /// Update a part of the buffer from an array of vertices - /// offset is specified as the number of vertices to skip + /// Update the from a [] + /// + /// + /// + /// is specified as the number of vertices to skip /// from the beginning of the buffer. - /// - /// If offset is 0 and vertexCount is equal to the size of + /// + /// + /// If is 0 and is equal to the size of /// the currently created buffer, its whole contents are replaced. - /// - /// If offset is 0 and vertexCount is greater than the + /// + /// + /// If is 0 and is greater than the /// size of the currently created buffer, a new buffer is created - /// containing the vertex data. - /// - /// If offset is 0 and vertexCount is less than the size of + /// containing the data. + /// + /// + /// If is 0 and is less than the size of /// the currently created buffer, only the corresponding region /// is updated. - /// - /// If offset is not 0 and offset + vertexCount is greater - /// than the size of the currently created buffer, the update fails. - /// - /// No additional check is performed on the size of the vertex - /// array, passing invalid arguments will lead to undefined - /// behavior. - /// - /// Array of vertices to copy to the buffer + /// + /// + /// If is NOT 0 and + + /// is greater than the size of the currently + /// created buffer, the update fails. + /// + /// + /// No additional checks are performed on the size of the . + /// Passing invalid arguments will lead to undefined behavior. + /// + /// + /// Array of vertices to copy from /// Number of vertices to copy /// Offset in the buffer to copy to //////////////////////////////////////////////////////////// @@ -177,27 +191,28 @@ public bool Update(Vertex[] vertices, uint vertexCount, uint offset) //////////////////////////////////////////////////////////// /// - /// Update a part of the buffer from an array of vertices - /// assuming an offset of 0 and a vertex count the length of the passed array. - /// - /// If offset is 0 and vertexCount is equal to the size of - /// the currently created buffer, its whole contents are replaced. - /// - /// If offset is 0 and vertexCount is greater than the - /// size of the currently created buffer, a new buffer is created - /// containing the vertex data. - /// - /// If offset is 0 and vertexCount is less than the size of - /// the currently created buffer, only the corresponding region - /// is updated. - /// - /// If offset is not 0 and offset + vertexCount is greater - /// than the size of the currently created buffer, the update fails. - /// - /// No additional check is performed on the size of the vertex - /// array, passing invalid arguments will lead to undefined - /// behavior. + /// Update a part of the buffer from a [] /// + /// + /// + /// If the length of is equal + /// to the current size of the buffer, the entire buffer is replaced. + /// + /// + /// If the length of is greater than the + /// current size of the buffer, a new buffer is created containing + /// the data. + /// + /// + /// If the length of is less than the + /// current size of the buffer, only the first .Length + /// vertices are replaced. + /// + /// + /// No additional checks are performed on .Length. + /// Passing invalid arguments will lead to undefined behavior. + /// + /// /// Array of vertices to copy to the buffer //////////////////////////////////////////////////////////// public bool Update(Vertex[] vertices) @@ -207,27 +222,37 @@ public bool Update(Vertex[] vertices) //////////////////////////////////////////////////////////// /// - /// Update a part of the buffer from an array of vertices - /// assuming a vertex count the length of the passed array. - /// - /// If offset is 0 and vertexCount is equal to the size of - /// the currently created buffer, its whole contents are replaced. - /// - /// If offset is 0 and vertexCount is greater than the - /// size of the currently created buffer, a new buffer is created - /// containing the vertex data. - /// - /// If offset is 0 and vertexCount is less than the size of - /// the currently created buffer, only the corresponding region - /// is updated. - /// - /// If offset is not 0 and offset + vertexCount is greater - /// than the size of the currently created buffer, the update fails. - /// - /// No additional check is performed on the size of the vertex - /// array, passing invalid arguments will lead to undefined - /// behavior. + /// Update a part of the buffer from a [] /// + /// + /// + /// is specified as the number of vertices to skip + /// from the beginning of the buffer. + /// + /// + /// If is 0 and .Length + /// is equal to the size of the currently created buffer, its whole contents are replaced. + /// + /// + /// If is 0 and .Length + /// is greater than the size of the currently created buffer, a new buffer is created + /// containing the data. + /// + /// + /// If is 0 and .Length + /// is less than the size of the currently created buffer, only the first + /// .Length vertices are replaced. + /// + /// + /// If is NOT 0 and + + /// .Length is greater than the size of the currently + /// created buffer, the update fails. + /// + /// + /// No additional checks are performed on the size of the . + /// Passing invalid arguments will lead to undefined behavior. + /// + /// /// Array of vertices to copy to the buffer /// Offset in the buffer to copy to //////////////////////////////////////////////////////////// @@ -238,9 +263,9 @@ public bool Update(Vertex[] vertices, uint offset) //////////////////////////////////////////////////////////// /// - /// Copy the contents of another buffer into this buffer + /// Copy the contents of another into this buffer /// - /// Vertex buffer whose contents to copy into first vertex buffer + /// VertexBuffer whose contents to copy from //////////////////////////////////////////////////////////// public bool Update(VertexBuffer other) { @@ -249,9 +274,9 @@ public bool Update(VertexBuffer other) //////////////////////////////////////////////////////////// /// - /// Swap the contents of another buffer into this buffer + /// Swap the contents of another into this buffer /// - /// Vertex buffer whose contents to swap with + /// VertexBuffer whose contents to swap with //////////////////////////////////////////////////////////// public void Swap(VertexBuffer other) { @@ -271,7 +296,7 @@ protected override void Destroy(bool disposing) //////////////////////////////////////////////////////////// /// - /// Draw the vertex buffer to a render target + /// Draw the to a /// /// Render target to draw to /// Current render states diff --git a/src/SFML.System/Time.cs b/src/SFML.System/Time.cs index adc0fedc..ff815ec9 100644 --- a/src/SFML.System/Time.cs +++ b/src/SFML.System/Time.cs @@ -6,8 +6,14 @@ namespace SFML.System { //////////////////////////////////////////////////////////// /// - /// This class represents a time value + /// A Time value for interfacing with SFML /// + /// + /// Using while working within managed code is best. + /// In most cases, is only needed when calling into unmanaged code. + /// Implicit casts from to + /// allow s to be used for most SFML methods. + /// //////////////////////////////////////////////////////////// [StructLayout(LayoutKind.Sequential)] public struct Time : IEquatable