3D Rendering Library
Hey, as some of you are aware, i’m writing a small rendering library for injected C# tools. While i’m writing features, is there any features you guys might want added? So far i’ve added:
// Fields internal static Device Device internal static TextDrawer TextRenderer internal static Matrix Projection internal static Matrix View // Rendering functions internal static void DrawOutlinedBox(Vector3 position, float length, float width, float height, Color color) internal static void DrawBox(Vector3 position, float length, float width, float height, Color color) internal static void DrawLine(Vector3 vecStartPos, Vector3 vecEndPos, float width, Color color) internal static bool WorldToScreen(Vector3 position, out Vector3 screen) internal static bool ScreenToWorld(Vector2 screen, out Vector3 world)
In addition to these functions, you can subscribe to an OnFrame callback.
Let me know what you guys want.
Perhaps make a distiction between Draw- and Fill- type methods.
DrawCircle(Vector3 center, float radius, float lineThickness, Color lineColor)
FillCircle(Vector3 center, float radius, Color fillColor)
Polygon triangulation of a convex polygon is rather trivial, if you’re up for it you can also support triangulation of any polygon.
DrawConvexPolygon(Color color, params Vector3[] vertices)
FillConvexPolygon(Color color, params Vector3[] vertices)
I also wrote a small “triangle list builder” for my own lib that takes care of managing the list of vertices and indices as such;
var triangles = new TriangleListBuilder();
triangles.AddTriangle(a,b,c);
triangles.AddTriangle(a,d,c);
DrawUserBlah(… triangles.Vertices,… triangles.Indices…)
In the above sample, the vertices a and c won’t be added twice, it’ll search the list and use the appropriate index.
Other than this, no idea :) Perhaps something related to sprites/images? Or exposing some settings of the Device? (Effects such as alpha/wireframe/zbuffer etc)
1) Will do
2) I have never touched such things. Feel free to do it yourself though :)
3) The Device class is exposed, giving all the information and more through a managed interface.
I was looking into a general triangulation method recently. Two valuable resources I found were:
http://mathworld.wolfram.com/Triangulation.html
http://www.cs.unc.edu/~dm/CODE/GEM/chapter.html
can i haz a fillrgba() function? definitely needed!
btw
deadmau5 – strobe
Yeah, something i overlooked.
are you releasing this? if so, when?
When it’s done.
I would ask that you check into some of the old isxwow and isxwarden functions.
What?
You didn’t publish any details of the Device class so I have some questions about it.
Can it be used to create Vertex and Index buffers?
Does it give access to SetStreamSource and DrawIndexedPrimitive?
Can it be used to set texture stages?
Can it be used to set shaders?
Also, a managed wrapper for D3DXCompileShader would be awesome :)
Yes, Yes, Yes and Yes.
Microsoft.DirectX.Direct3D.ShaderLoader.CompileShader :)
If you would like an early version to test things on (Your shader requests have me rather curious, tbh :p); then let me know.
Are you coding this in directx 3d?
A few months have passed since you posted it.
Any planed release Date?
Very good journey and experience!