Re: EuSDL3 Update

new topic     » goto parent     » topic index » view thread      » older message » newer message
euphoric said...
Icy_Viking said...

Hi all,

I have updated EuSDL3 for SDL 3.4.0!

[https://github.com/gAndy50/EuSDL3] - Grab it here

How cross-platform is this? Can I eventually port it to Mac, Linux, Android, iPhone, consoles, etc.?

SDL3 itself is already highly portable, it is written in C. The wrapper should be very portable as well. I already have ifdefs in there for WINDOWS, LINUX and OSX. It works fine under windows. It should work out of the box in Linux and OSX as well. I don't know about Android/iPhone or video game consoles.

include std/ffi.e 
include std/machine.e 
include std/os.e 
 
public atom sdl 
 
ifdef WINDOWS then 
	sdl = open_dll("SDL3.dll") 
	elsifdef LINUX or FREEBSD then 
	sdl = open_dll("libSDL3.so") 
	elsifdef OSX then 
	sdl = open_dll("libSDL3.dylib") 
end ifdef 
 
if sdl = 0 then 
	puts(1,"Failed to load SDL3!\n") 
	abort(0) 
end if 

EuSDL3 is written in OpenEuphoria 4.1.0 Beta 2 and uses Greg's FFI library (also written in Euphoria) with helping wrapping structs.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu