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.

  1. Robske says:

    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)

  2. anon says:

    can i haz a fillrgba() function? definitely needed!

    btw

    deadmau5 – strobe

  3. anon says:

    are you releasing this? if so, when?

  4. Spitt says:

    I would ask that you check into some of the old isxwow and isxwarden functions.

  5. Mike says:

    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 :)

    • kynox says:

      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.

  6. Ron says:

    Are you coding this in directx 3d?

  7. misz says:

    A few months have passed since you posted it.

    Any planed release Date?

  8. Very good journey and experience!

  1. There are no trackbacks for this post yet.

Leave a Reply