jingwood / d2dlib

A .NET library for hardware-accelerated, high performance, immediate mode rendering via Direct2D.
MIT License
234 stars 40 forks source link

Use system.numerics instead of customized struct D2DPoint and D2DMatrix3x2 #97

Closed jingwood closed 1 year ago

jingwood commented 1 year ago

Changes

nikeee commented 1 year ago

+1

drewnoakes commented 1 year ago

Given this is a fairly decent API break, are there other API changes we could includes in the next release?

jingwood commented 1 year ago

I am thinking make the Direct 1.1 support available in the next release, if possible... https://github.com/jingwood/d2dlib/milestone/1

What do you think?

drewnoakes commented 1 year ago

I've commented on #60.

nikeee commented 1 year ago

In the nud2dlib fork, I've done some work to better support C#'s non-nullable-reference-types: https://github.com/nikeee/nud2dlib/commit/83843e8b0001a949a7dabd54b3cf43fbb2dd924d

I also fiddled around with SuppressGCTransition in this commit: https://github.com/nikeee/nud2dlib/commit/79361decc048f71184268754c9ba295c5859ad85 I'm not sure if adding the attribute was/is valid in this case (it's a long time ago). But it was ment to improve the performance of pinvoke calls to the native DLL (see linked article).

There were also some unused resources: https://github.com/nikeee/nud2dlib/commit/8ea17c37b790934ecad0ebad3c0f38f273722d08

Maybe these kinds of simplifications would be something worth to backport: https://github.com/nikeee/nud2dlib/commit/e5ebacbda70fd36d4c67d31c657d7705cecabeb1 https://github.com/nikeee/nud2dlib/commit/5e4030fe6c9571140737cf73a8af9190229243e6

If you're in on some of these, I'd be happy to file some PRs.