diff --git a/Framework/Foster.Framework.csproj b/Framework/Foster.Framework.csproj
index b70df53..fcec1b3 100644
--- a/Framework/Foster.Framework.csproj
+++ b/Framework/Foster.Framework.csproj
@@ -20,6 +20,7 @@
$(SolutionDir)artifacts/
true
true
+ CS1591
diff --git a/Framework/Graphics/Batcher.cs b/Framework/Graphics/Batcher.cs
index ff6f2b6..7e40700 100644
--- a/Framework/Graphics/Batcher.cs
+++ b/Framework/Graphics/Batcher.cs
@@ -506,7 +506,12 @@ public void PopScissor()
///
/// Pushes a Matrix that will transform all future data
///
+ ///
+ ///
+ ///
+ ///
/// If the Matrix should be relative to the previously pushed transformations
+ ///
public Matrix3x2 PushMatrix(in Vector2 position, in Vector2 scale, in Vector2 origin, float rotation, bool relative = true)
{
return PushMatrix(Transform.CreateMatrix(position, origin, scale, rotation), relative);
@@ -515,6 +520,7 @@ public Matrix3x2 PushMatrix(in Vector2 position, in Vector2 scale, in Vector2 or
///
/// Pushes a Matrix that will transform all future data
///
+ ///
/// If the Matrix should be relative to the previously pushed transformations
public Matrix3x2 PushMatrix(Transform transform, bool relative = true)
{
@@ -524,6 +530,7 @@ public Matrix3x2 PushMatrix(Transform transform, bool relative = true)
///
/// Pushes a Matrix that will transform all future data
///
+ ///
/// If the Matrix should be relative to the previously pushed transformations
public Matrix3x2 PushMatrix(in Vector2 position, bool relative = true)
{
@@ -533,6 +540,7 @@ public Matrix3x2 PushMatrix(in Vector2 position, bool relative = true)
///
/// Pushes a Matrix that will transform all future data
///
+ ///
/// If the Matrix should be relative to the previously pushed transformations
public Matrix3x2 PushMatrix(in Matrix3x2 matrix, bool relative = true)
{
diff --git a/Framework/Graphics/Material.cs b/Framework/Graphics/Material.cs
index ac244b0..e279e52 100644
--- a/Framework/Graphics/Material.cs
+++ b/Framework/Graphics/Material.cs
@@ -52,7 +52,7 @@ public void Clear()
}
///
- /// Copies the Shader & Uniform values from this Material to the given one
+ /// Copies the Shader & Uniform values from this Material to the given one
///
public void CopyTo(Material material)
{
diff --git a/Framework/Graphics/Mesh.cs b/Framework/Graphics/Mesh.cs
index 7d8a396..3a3ca35 100644
--- a/Framework/Graphics/Mesh.cs
+++ b/Framework/Graphics/Mesh.cs
@@ -3,9 +3,20 @@
namespace Foster.Framework;
+///
+/// The Mesh contains a buffer of Vertices and optionally a buffer of Indices
+/// used during a DrawCommand.
+///
public class Mesh : IResource
{
+ ///
+ /// Optional Mesh Name
+ ///
public string Name { get; set; } = string.Empty;
+
+ ///
+ /// If the Mesh has been disposed
+ ///
public bool IsDisposed => disposed;
///
@@ -31,6 +42,9 @@ public class Mesh : IResource
internal IntPtr resource;
internal bool disposed = false;
+ ///
+ /// Creates a new Mesh for rendering
+ ///
public Mesh()
{
resource = Platform.FosterMeshCreate();
@@ -39,6 +53,9 @@ public Mesh()
Graphics.Resources.RegisterAllocated(this, resource, Platform.FosterMeshDestroy);
}
+ ///
+ /// Disposes the Mesh resources
+ ///
~Mesh()
{
Dispose(false);
@@ -252,6 +269,10 @@ public unsafe void SetSubVertices(int offset, IntPtr data, int count)
);
}
+ ///
+ /// Disposes the graphical resources of the Mesh. Once Disposed, the Mesh
+ /// is no longer usable.
+ ///
public void Dispose()
{
Dispose(true);
diff --git a/Framework/Images/Color.cs b/Framework/Images/Color.cs
index 83e5380..8634fc2 100644
--- a/Framework/Images/Color.cs
+++ b/Framework/Images/Color.cs
@@ -148,6 +148,7 @@ public override readonly string ToString()
/// Returns a Hex String representation of the Color's given components
///
/// The Components, in any order. ex. "RGBA" or "RGB" or "ARGB"
+ /// The destination to write the string to
public readonly void ToHexString(ReadOnlySpan components, Span destination)
{
if (destination.Length < components.Length * 2)
diff --git a/Framework/Images/Image.cs b/Framework/Images/Image.cs
index 3018751..d57b5d2 100644
--- a/Framework/Images/Image.cs
+++ b/Framework/Images/Image.cs
@@ -200,7 +200,7 @@ static unsafe void Write(IntPtr context, IntPtr data, int size)
}
///
- /// Get & Set the color of a pixel.
+ /// Get & Set the color of a pixel.
///
public Color this[int index]
{
@@ -212,7 +212,7 @@ public Color this[int index]
}
///
- /// Get & Set the color of a pixel.
+ /// Get & Set the color of a pixel.
///
public Color this[int x, int y]
{
diff --git a/Framework/Images/Packer.cs b/Framework/Images/Packer.cs
index 7da2e13..03103dd 100644
--- a/Framework/Images/Packer.cs
+++ b/Framework/Images/Packer.cs
@@ -10,31 +10,17 @@ public class Packer
///
/// A single packed Entry
///
+ /// Index when added to the Packer
+ /// The Name of the Entry
+ /// The corresponding image page of the Entry
+ /// The Source Rectangle
+ /// The Frame Rectangle. This is the size of the image before it was packed
public readonly record struct Entry
- (
- ///
- /// Index when added to the Packer
- ///
- int Index,
-
- ///
- /// The Name of the Entry
- ///
- string Name,
-
- ///
- /// The corresponding image page of the Entry
- ///
- int Page,
-
- ///
- /// The Source Rectangle
- ///
- RectInt Source,
-
- ///
- /// The Frame Rectangle. This is the size of the image before it was packed
- ///
+ (
+ int Index,
+ string Name,
+ int Page,
+ RectInt Source,
RectInt Frame
);