DSFML icon indicating copy to clipboard operation
DSFML copied to clipboard

Use SFML classes directly instead of CSFML styled wrappers

Open Jebbs opened this issue 8 years ago • 1 comments

I think that there isn't a reason to not use SFML objects directly in he backend and get rid of the CSFML styled wrapper objects.

Occasionally, the CSFML styled objects hold special references to cached things (like sfFont's texture) or a marker specifying if a particular object is the "true" instance (like sfTexture). Often they are just a wrapper around the SFML objects and nothing more.

I feel like the binding would be simplified by using the SFML objects directly by relying on the D wrapper to handle a lot of the same things (and it does some things already).

This also removes a layer of indirection to these objects, possibly giving a (most likely negligible) performance gain.

Jebbs avatar Aug 22 '17 20:08 Jebbs

This might also be a good first step to removing the binding (except for the constructors and destructors).

If that is the right direction, the next step after this would be to define the SFML classes as extern(C++) classes. Perhaps that should be the way forward instead of #249?

Jebbs avatar Aug 22 '17 20:08 Jebbs