Skip to content

Commit 2351fc4

Browse files
author
LoneWandererProductions
committed
Sync back some Render Engine Stuff and cleanup
1 parent 0799071 commit 2351fc4

19 files changed

Lines changed: 394 additions & 392 deletions

Core.StateExecutive.Builder/ExecutiveState.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* COPYRIGHT: See COPYING in the top level directory
33
* PROJECT: Core.StateExecutive.Builder
44
* FILE: ExecutiveState.cs
5-
* PURPOSE: Your file purpose here
5+
* PURPOSE: State of the State Executive Engine. Each state has a unique ID and a list of transitions to other states.
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/
88

@@ -12,7 +12,7 @@ namespace Core.StateExecutive.Builder
1212
{
1313
/// <inheritdoc />
1414
/// <summary>
15-
/// Stat eof the State Executive Engine. Each state has a unique ID and a list of transitions to other states.
15+
/// State of the State Executive Engine. Each state has a unique ID and a list of transitions to other states.
1616
/// </summary>
1717
/// <seealso cref="Core.StateExecutive.Interfaces.IState" />
1818
internal sealed class ExecutiveState : IState

RenderEngine/ColumnData.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

RenderEngine/CoordinateData.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

RenderEngine/GLResourceManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,4 @@ public void Dispose()
272272
GC.SuppressFinalize(this);
273273
}
274274
}
275-
}
275+
}

RenderEngine/Geometry2DBuilder.cs

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*
1+
/*
22
* COPYRIGHT: See COPYING in the top level directory
33
* PROJECT: RenderEngine
44
* FILE: Geometry2DBuilder.cs
5-
* PURPOSE: Your file purpose here
5+
* PURPOSE: Builder for 2D geometry vertex buffers.
66
* PROGRAMMER: Peter Geinitz (Wayfarer)
77
*/
88

@@ -16,6 +16,11 @@ namespace RenderEngine
1616
/// </summary>
1717
internal static class Geometry2DBuilder
1818
{
19+
/// <summary>
20+
/// Builds the colored lines.
21+
/// </summary>
22+
/// <param name="points">The points.</param>
23+
/// <returns>Array of floats representing the colored lines.</returns>
1924
internal static float[] BuildColoredLines(
2025
(float x, float y, int r, int g, int b, int a)[] points)
2126
{
@@ -34,6 +39,15 @@ internal static float[] BuildColoredLines(
3439
return data;
3540
}
3641

42+
/// <summary>
43+
/// Builds the solid quad.
44+
/// </summary>
45+
/// <param name="p0">The p0.</param>
46+
/// <param name="p1">The p1.</param>
47+
/// <param name="p2">The p2.</param>
48+
/// <param name="p3">The p3.</param>
49+
/// <param name="fill">The fill.</param>
50+
/// <returns>Array of floats representing a solid quad.</returns>
3751
internal static float[] BuildSolidQuad(
3852
(int x, int y) p0,
3953
(int x, int y) p1,
@@ -53,6 +67,13 @@ internal static float[] BuildSolidQuad(
5367
};
5468
}
5569

70+
/// <summary>
71+
/// Builds the colored triangle.
72+
/// </summary>
73+
/// <param name="p0">The p0.</param>
74+
/// <param name="p1">The p1.</param>
75+
/// <param name="p2">The p2.</param>
76+
/// <returns>Array of floats representing a colored triangle.</returns>
5677
public static float[] BuildColoredTriangle(
5778
(float x, float y, int r, int g, int b, int a) p0,
5879
(float x, float y, int r, int g, int b, int a) p1,
@@ -66,6 +87,14 @@ public static float[] BuildColoredTriangle(
6687
};
6788
}
6889

90+
/// <summary>
91+
/// Builds the textured quad.
92+
/// </summary>
93+
/// <param name="p0">The p0.</param>
94+
/// <param name="p1">The p1.</param>
95+
/// <param name="p2">The p2.</param>
96+
/// <param name="p3">The p3.</param>
97+
/// <returns>Array of floats representing a textured quad.</returns>
6998
public static float[] BuildTexturedQuad(
7099
(int x, int y) p0,
71100
(int x, int y) p1,
@@ -79,6 +108,12 @@ public static float[] BuildTexturedQuad(
79108
};
80109
}
81110

111+
/// <summary>
112+
/// Builds the polyline.
113+
/// </summary>
114+
/// <param name="points">The points.</param>
115+
/// <param name="color">The color.</param>
116+
/// <returns>Array of floats representing a polyline.</returns>
82117
internal static (float x, float y, int r, int g, int b, int a)[] BuildPolyline(
83118
ReadOnlySpan<(float x, float y)> points,
84119
(int r, int g, int b, int a) color)
@@ -98,6 +133,15 @@ internal static (float x, float y, int r, int g, int b, int a)[] BuildPolyline(
98133
return data;
99134
}
100135

136+
/// <summary>
137+
/// Builds the rect outline.
138+
/// </summary>
139+
/// <param name="x">The x.</param>
140+
/// <param name="y">The y.</param>
141+
/// <param name="w">The w.</param>
142+
/// <param name="h">The h.</param>
143+
/// <param name="color">The color.</param>
144+
/// <returns>Array of floats representing a rectangle outline.</returns>
101145
public static (float x, float y, int r, int g, int b, int a)[]
102146
BuildRectOutline(
103147
float x, float y,
@@ -110,6 +154,15 @@ public static (float x, float y, int r, int g, int b, int a)[]
110154
}
111155

112156

157+
/// <summary>
158+
/// Builds the circle outline.
159+
/// </summary>
160+
/// <param name="cx">The cx.</param>
161+
/// <param name="cy">The cy.</param>
162+
/// <param name="radius">The radius.</param>
163+
/// <param name="segments">The segments.</param>
164+
/// <param name="color">The color.</param>
165+
/// <returns>Array of floats representing a circle outline.</returns>
113166
internal static (float x, float y, int r, int g, int b, int a)[] BuildCircleOutline(
114167
float cx, float cy,
115168
float radius,

RenderEngine/ImageToolkit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,4 @@ public int[] CompositeToBits()
187187
}
188188
}
189189
}
190-
}
190+
}

RenderEngine/Interfaces/IImageToolkit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ public interface IImageToolkit
6262
/// <param name="layerIndices">The layer indices.</param>
6363
/// <param name="insertAt">The insert at.</param>
6464
void MergeLayers(LayeredImageContainer container, int[] layerIndices, int insertAt);
65-
}
65+
}

RenderEngine/LayeredImageContainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,4 @@ private static unsafe void AlphaBlend(Span<byte> baseSpan, Span<byte> overlaySpa
234234
}
235235
}
236236
}
237-
}
237+
}

RenderEngine/OpenTKHelper.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace RenderEngine
2323
/// </summary>
2424
public static class OpenTkHelper
2525
{
26+
/// <summary>
27+
/// The gl version
28+
/// </summary>
2629
private static Version? _glVersion;
2730

2831
/// <summary>
@@ -197,7 +200,11 @@ internal static int LoadTextureFromFile(string filePath)
197200
/// Loads a cubemap texture from six image files.
198201
/// </summary>
199202
/// <param name="filePaths">Array of six image file paths in cubemap order.</param>
200-
/// <returns>OpenGL cubemap texture ID.</returns>
203+
/// <returns>
204+
/// OpenGL cubemap texture ID.
205+
/// </returns>
206+
/// <exception cref="System.ArgumentException">Cube map must have exactly 6 textures. - filePaths</exception>
207+
/// <exception cref="System.IO.FileNotFoundException">Cubemap texture not found: {filePaths[i]}</exception>
201208
/// <exception cref="ArgumentException">Thrown if array length is not 6.</exception>
202209
internal static int LoadCubeMap(string[] filePaths)
203210
{
@@ -263,6 +270,11 @@ internal static int LoadCubeMap(string[] filePaths)
263270
/// Checks if the system supports at least the given OpenGL version.
264271
/// Caches the result to avoid repeated GLContext queries.
265272
/// </summary>
273+
/// <param name="requiredMajor">The required major.</param>
274+
/// <param name="requiredMinor">The required minor.</param>
275+
/// <returns>
276+
/// <c>true</c> if [is open gl compatible] [the specified required major]; otherwise, <c>false</c>.
277+
/// </returns>
266278
internal static bool IsOpenGlCompatible(int requiredMajor = 4, int requiredMinor = 5)
267279
{
268280
if (_glVersion == null)

0 commit comments

Comments
 (0)