Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why P/Invoke?  (Read 2986 times)

0 Members and 1 Guest are viewing this topic.

raycrasher

  • Newbie
  • *
  • Posts: 24
    • View Profile
Why P/Invoke?
« on: May 14, 2013, 07:28:12 am »
I'm just wondering why SFML.NET uses P/Invoke and not a C++/CLI wrapper?

I have read that a custom C++/CLI wrapper gives better performance that using P/Invoke : manual marshalling, coarse interfaces, etc. Especially when using SFML.NET, since there's an additional layer involved (CSFML). I had previous experience wrapping up the libRocket GUI library for use in .NET, and it works great, so it should work for SFML.

Also, a little background: I have been getting weird errors when using the latest version of the .NET binding, so as a result, I'm creating my own C++/CLI wrapper for use in C#. That took care of the errors, and it runs great, but it still needs some work.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Why P/Invoke?
« Reply #1 on: May 14, 2013, 07:48:20 am »
Quote
I'm just wondering why SFML.NET uses P/Invoke and not a C++/CLI wrapper?
To make it compatible with Mono (and thus Linux and OS X).

Quote
I have been getting weird errors when using the latest version of the .NET binding
It would be great if you could report them.
Laurent Gomila - SFML developer

 

anything