Skip to content

Commit 1840530

Browse files
Updated examples in readme. Added Contributing section.
1 parent 2a8e958 commit 1840530

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ dotnet package add DotNetElements.DebugRenderer.Silk.Net
3838
### OpenTK Example
3939

4040
```csharp
41+
using System.Numerics;
4142
using DotNetElements.DebugRenderer.Core;
43+
using DotNetElements.DebugRenderer.Core.Primitives;
4244
using DotNetElements.DebugRenderer.OpenTk;
43-
using System.Numerics;
4445

4546
// Initialize the renderer (make sure you have a valid OpenGL context initialized first)
4647
DebugDrawRenderer<OpenTkContext> debugDrawRenderer = new(new OpenTkContext());
@@ -51,11 +52,13 @@ void OnRender()
5152
debugDrawRenderer.BeginRender(viewProjectionMatrix);
5253

5354
// Draw primitives
54-
DebugDraw.Box(new Vector3(0, 0, 0), Quaternion.Identity, 1f, 1f, 1f, DebugColor.Green);
55-
55+
DebugDraw.Origin(Vector3.Zero, 0.5f);
56+
57+
DebugDraw.Box(new Vector3(2, 0, 2), Quaternion.Identity, 1f, 1f, 1f, DebugColor.Green);
58+
5659
DebugDraw.Line(Vector3.Zero, Vector3.UnitX, DebugColor.Red);
57-
58-
DebugDraw.Sphere(new Vector3(-1, 1, 3), 0.5f, DebugColor.Cyan, wireframe: false);
60+
61+
DebugDraw.Sphere(new Vector3(-1, 1, 3), 0.5f, DebugColor.Cyan);
5962

6063
debugDrawRenderer.EndRender();
6164
}
@@ -67,9 +70,10 @@ debugDrawRenderer.Dispose();
6770
### Silk.NET Example
6871

6972
```csharp
73+
using System.Numerics;
7074
using DotNetElements.DebugRenderer.Core;
75+
using DotNetElements.DebugRenderer.Core.Primitives;
7176
using DotNetElements.DebugRenderer.Silk.Net;
72-
using System.Numerics;
7377

7478
// Initialize the renderer (glApi is your Silk.NET GL instance >>> needs to be initialized first)
7579
DebugDrawRenderer<SilkNetContext> debugDrawRenderer = new(new SilkNetContext(glApi));
@@ -80,11 +84,13 @@ void OnRender()
8084
debugDrawRenderer.BeginRender(viewProjectionMatrix);
8185

8286
// Draw primitives
83-
DebugDraw.Box(new Vector3(0, 0, 0), Quaternion.Identity, 1f, 1f, 1f, DebugColor.Green);
84-
87+
DebugDraw.Origin(Vector3.Zero, 0.5f);
88+
89+
DebugDraw.Box(new Vector3(2, 0, 2), Quaternion.Identity, 1f, 1f, 1f, DebugColor.Green);
90+
8591
DebugDraw.Line(Vector3.Zero, Vector3.UnitX, DebugColor.Red);
86-
87-
DebugDraw.Sphere(new Vector3(-1, 1, 3), 0.5f, DebugColor.Cyan, wireframe: false);
92+
93+
DebugDraw.Sphere(new Vector3(-1, 1, 3), 0.5f, DebugColor.Cyan);
8894

8995
debugDrawRenderer.EndRender();
9096
}
@@ -153,6 +159,10 @@ Complete examples are available in the `examples` folder:
153159
- NVIDEA GeForce RTX 3060 OpenGL 4.6.0 - Build 560.94
154160
- AMD Radeon (TM) Graphics OpenGL 4.6.0 - Build 23.19.21.11.250530
155161

162+
## Contributing
163+
164+
Contributions are welcome! Please open issues to report bugs or suggest features. Pull requests are welcome, make sure to let me know if you plan to work on something specific.
165+
156166
## License
157167

158-
MIT
168+
This library is released under the MIT License. See the [LICENSE](https://github.com/Felix-CodingClimber/DebugDraw/blob/main/README.md) file for more details.

0 commit comments

Comments
 (0)