Add more documentation to RenderSystem.
This commit is contained in:
@@ -118,9 +118,20 @@ namespace Voile.Rendering
|
||||
/// </summary>
|
||||
public abstract void EndFrame();
|
||||
|
||||
/// <summary>
|
||||
/// Begin drawing with texture blending.
|
||||
/// </summary>
|
||||
/// <param name="blendMode">Type of texture blending.</param>
|
||||
public abstract void BeginBlended(BlendMode blendMode);
|
||||
public abstract void EndBlended();
|
||||
|
||||
/// <summary>
|
||||
/// Begins drawing using a 2D camera.
|
||||
/// </summary>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="target"></param>
|
||||
/// <param name="rotation"></param>
|
||||
/// <param name="zoom"></param>
|
||||
public abstract void BeginCamera2d(Vector2 offset, Vector2 target, float rotation, float zoom);
|
||||
public abstract void EndCamera2d();
|
||||
|
||||
@@ -130,6 +141,9 @@ namespace Voile.Rendering
|
||||
/// <param name="color">Background color.</param>
|
||||
public abstract void ClearBackground(Color color);
|
||||
|
||||
/// <summary>
|
||||
/// Resets all transform operations.
|
||||
/// </summary>
|
||||
public void ResetTransform()
|
||||
{
|
||||
transformPosition = Vector2.Zero;
|
||||
@@ -182,6 +196,12 @@ namespace Voile.Rendering
|
||||
/// <param name="color">Color of the text.</param>
|
||||
public abstract void DrawSdfText(string text, int fontSize, Color color);
|
||||
|
||||
/// <summary>
|
||||
/// Draw text using a rasterized font resource.
|
||||
/// </summary>
|
||||
/// <param name="font">Rasterized font.</param>
|
||||
/// <param name="text">Text to draw.</param>
|
||||
/// <param name="color">Color of the text.</param>
|
||||
public abstract void DrawText(ResourceRef<Font> font, string text, Color color);
|
||||
|
||||
/// <summary>
|
||||
@@ -195,6 +215,9 @@ namespace Voile.Rendering
|
||||
protected float transformRotation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Quality of MSAA anti-aliasing.
|
||||
/// </summary>
|
||||
public enum Msaa
|
||||
{
|
||||
None,
|
||||
@@ -202,6 +225,9 @@ namespace Voile.Rendering
|
||||
Msaa4x,
|
||||
Msaa8x
|
||||
}
|
||||
/// <summary>
|
||||
/// Settings for the renderer.
|
||||
/// </summary>
|
||||
public struct RendererSettings
|
||||
{
|
||||
public Msaa Msaa;
|
||||
@@ -220,7 +246,9 @@ namespace Voile.Rendering
|
||||
WindowSettings = WindowSettings.Default
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Settings for window.
|
||||
/// </summary>
|
||||
public struct WindowSettings
|
||||
{
|
||||
public string Title;
|
||||
@@ -233,6 +261,9 @@ namespace Voile.Rendering
|
||||
Size = size;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default window settings.
|
||||
/// </summary>
|
||||
public static WindowSettings Default => new("Voile Game", new Vector2(1280, 720));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user