I want to add 128-bit floats to GML with C++, where do I start?

S

StardragonEX

Guest
Hello, I want to add this: https://www.boost.org/doc/libs/1_67...boost_multiprecision/tut/floats/float128.html to GML, for Windows, Linux and MacOS.

I'm not pretty sure what is possible and what is not with extensions yet, if someone could guide me a little bit I'd appreciate it.

I've used JNI to add C++ code to Java, so I think it should be kind of similar. But what resources should I look for? Where do I look for info for what I want to do.

Thanks in advance.
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
There's an official example.

Common options for transferring >64-bit data to DLL would be
  • Transfer it in parts (store the value as two raw data floats on GML side, feed to DLL as separate arguments)
  • Exchange data through a buffer, give the DLL an address via buffer_get_address (example has this)
  • Exchange data as strings - GM uses zero-terminated immutable C strings containing UTF8 data so you can use any format so long as it doesn't involve 0-bytes.
 
S

StardragonEX

Guest
Hey dude, thanks a lot, I going to investigate more with what you gave me.
 
Last edited by a moderator:
Top