Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebugDraw has obsolete methods without non obsolete replacement methods #46

Open
enriko-riba opened this issue Oct 15, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@enriko-riba
Copy link

Description

The following methods in DebugDraw are obsolete but without new Vector2 based version:

        [Obsolete("Look out for new calls using Vector2")]
        public abstract void DrawPolygon(in Vec2[] vertices, int vertexCount, in Color color);

        [Obsolete("Look out for new calls using Vector2")]
        public abstract void DrawSolidPolygon(in Vec2[] vertices, int vertexCount, in Color color);

        [Obsolete("Look out for new calls using Vector2")]
        public abstract void DrawCircle(in Vec2 center, float radius, in Color color);

        [Obsolete("Look out for new calls using Vector2")]
        public abstract void DrawSolidCircle(in Vec2 center, float radius, in Vec2 axis, in Color color);

        [Obsolete("Look out for new calls using Vector2")]
        public abstract void DrawSegment(in Vec2 p1, in Vec2 p2, in Color color);


### How To Reproduce

Implement inherited class and compiler spits out warnings

### Expected Behavior

The abstract DebugDraw class should provide non obsolete method versions:

[Obsolete("Look out for new calls using Vector2")]
public abstract void DrawPolygon(in Vec2[] vertices, int vertexCount, in Color color);

public abstract void DrawPolygon(in Vector2[] vertices, int vertexCount, in Color color);

@enriko-riba enriko-riba added the bug Something isn't working label Oct 15, 2022
@HughPH
Copy link
Collaborator

HughPH commented Jan 9, 2023

You're right, we should implement those.

The warnings won't stop anything from working in the mean time, and Vec2 has implicit casts to and from System.Numerics.Vector2

The casts could probably be sped up too, but I'm not sure if Unsafe.As is available with .Net Standard 2.1

@thomasvt
Copy link
Collaborator

thomasvt commented Jan 9, 2023

See PR #48

@HughPH
Copy link
Collaborator

HughPH commented Jan 10, 2023

See PR #48

Thanks @thomasvt :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants