1. SDL2 libraries
- Posted by axtens_bruce 2 weeks ago
- 270 views
(Asking for a friend from another programming language community)
What's the most recent in SDL2 libraries (or even SDL3 seeing as that is becoming a thing). I recently re-encountered AGAR. But it would still seem to be the case that, as this ancient posting on StackOverflow indicates: "There are tons of [SDL GUI librar[ies]] that turn up in google, but majority of them look like they came straight out of 1992."
-Bruce
2. Re: SDL2 libraries
- Posted by jmduro 2 weeks ago
- 241 views
Someone already wrote an AGAR wrapper in 2016, at least for Linux. I found an archive in my files (agar_eu.tar.gz) but i don't know who did the job.
Jean-Marc
3. Re: SDL2 libraries
- Posted by jmduro 2 weeks ago
- 234 views
I found a second archive in a folder named 'personal', so it may be my own work. Probably just a draft.
4. Re: SDL2 libraries
- Posted by petelomax 2 weeks ago
- 234 views
Someone already wrote an AGAR wrapper in 2016, at least for Linux. I found an archive in my files (agar_eu.tar.gz) but i don't know who did the job.
Jean-Marc
Is it a remnant from https://openeuphoria.org/forum/m/129391.wc ??
5. Re: SDL2 libraries
- Posted by Icy_Viking 2 weeks ago
- 222 views
I was going to wrap AGAR library for Windows. I managed to get it to build under Windows using MySys2 and MingW, I think. It did build under windows, the library itself anyway. I stopped bothering to trying to wrap it, was it was a pain for me. I still have the DLLs (shared libraries) if anyone might want them. I believe they are 64-bit built DLLs.
6. Re: SDL2 libraries
- Posted by jmduro 1 week ago
- 200 views
Someone already wrote an AGAR wrapper in 2016, at least for Linux. I found an archive in my files (agar_eu.tar.gz) but i don't know who did the job.
Jean-Marc
Is it a remnant from https://openeuphoria.org/forum/m/129391.wc ??
Yes Pete, it is. I forgot I did part of the job 8 years ago.
Jean-Marc
7. Re: SDL2 libraries
- Posted by jmduro 1 week ago
- 200 views
It was just a draft. Here is the very small part that had been done:
ag_gui.e
include std/dll.e include std/machine.e include std/os.e atom ag_gui ifdef WINDOWS then ag_gui = open_dll("../bin/win32/ag_gui.dll") elsifdef UNIX then sequence un = uname() sequence arch = un[5] if equal(arch, "i686") then ag_gui = open_dll("../bin/i686/libag_gui.so.5.0.0") elsif equal(arch, "x86_64") then ag_gui = open_dll("../bin/x86_64/libag_gui.so.5.0.0") end if end ifdef if ag_gui = -1 then puts(1,"Could not open ag_gui library!\n") abort(0) end if constant xAG_WindowNew = define_c_func(ag_gui, "AG_WindowNew", {C_UINT}, C_POINTER), xAG_InitGraphics = define_c_func(ag_gui, "AG_InitGraphics", {C_POINTER}, C_INT), xAG_LabelNew = define_c_func(ag_gui, "AG_LabelNew", {C_POINTER, C_UINT, C_POINTER}, C_POINTER), xAG_WindowShow = define_c_proc(ag_gui, "AG_WindowShow", {C_POINTER} ) public function AG_WindowNew(integer n) return c_func(xAG_WindowNew, {n}) end function public function AG_InitGraphics(atom win) return c_func(xAG_InitGraphics, {win}) end function public function AG_LabelNew(atom win, integer b, sequence s) atom addr, ret addr = allocate_string(s) ret = c_func(xAG_LabelNew, {win, b, addr}) free(addr) return ret end function public procedure AG_WindowShow(atom win) c_proc(xAG_WindowShow, {win}) end procedure
ag_core.e
include std/dll.e include std/machine.e include std/os.e atom ag_core ifdef WINDOWS then ag_core = open_dll("../bin/win32/ag_core.dll") elsifdef UNIX then sequence un = uname() sequence arch = un[5] if equal(arch, "i686") then ag_core = open_dll("../bin/i686/libag_core.so.5.0.0") elsif equal(arch, "x86_64") then ag_core = open_dll("../bin/x86_64/libag_core.so.5.0.0") end if end ifdef if ag_core = -1 then puts(1,"Could not open ag_core library!\n") abort(0) end if public constant xAG_InitCore = define_c_func(ag_core, "AG_InitCore", {C_POINTER, C_UINT}, C_INT), xAG_EventLoop = define_c_func(ag_core, "AG_EventLoop", {}, C_INT), xAG_GetErrorCode = define_c_func(ag_core, "AG_GetErrorCode", {}, C_POINTER), xAG_GetError = define_c_func(ag_core, "AG_GetError", {}, C_POINTER) -- Core public function AG_InitCore(object progname, integer flags) atom addr, ret if sequence(progname) then addr = allocate_string(progname) else addr = progname end if ret = c_func(xAG_InitCore, {progname, flags}) return ret end function public function AG_EventLoop() return c_func(xAG_EventLoop, {}) end function public function AG_GetErrorCode() return c_func(xAG_GetErrorCode, {}) end function public function AG_GetError() return c_func(xAG_GetError, {}) end function
hello.ex
include std/dll.e include ../include/ag_core.e include ../include/ag_gui.e if (AG_InitCore(NULL, 0) = -1) or (AG_InitGraphics(0) = -1) then printf(2, "Init failed: %s\n", {AG_GetError()}) abort (1) end if atom win = AG_WindowNew(0) AG_LabelNew(win, 0, "Hello, world!") AG_WindowShow(win) AG_EventLoop()
Jean-Marc
8. Re: SDL2 libraries
- Posted by Icy_Viking 1 week ago
- 181 views
Here are prebuilt DLLs for Agar 1.7.0
9. Re: SDL2 libraries
- Posted by petelomax 1 week ago
- 160 views
Here are prebuilt DLLs for Agar 1.7.0
Ugh, what a truly horrible file host! Can you upload a copy here for me? (clicking on the .zip link should guide you through the process)
10. Re: SDL2 libraries
- Posted by Icy_Viking 1 week ago
- 154 views
Here are prebuilt DLLs for Agar 1.7.0
Ugh, what a truly horrible file host! Can you upload a copy here for me? (clicking on the .zip link should guide you through the process)
I was unable to upload it to pcan. Maybe this link will work better for you? Keep in mind these are just the DLLs for AGAR, its not the wrapper. I only have a small amount of code written for the wrapper.
https://www.mediafire.com/file/vl2mqgc80r8846l/agar.zip/file
11. Re: SDL2 libraries
- Posted by petelomax 1 week ago
- 129 views
Thx, that's 10x better. What trouble did you have uploading to PCAN? Does "The Password" on http://phix.x10.mx/pmwiki/pmwiki.php?n=Main.Introduction help?
12. Re: SDL2 libraries
- Posted by Icy_Viking 1 week ago
- 119 views
Thx, that's 10x better. What trouble did you have uploading to PCAN? Does "The Password" on http://phix.x10.mx/pmwiki/pmwiki.php?n=Main.Introduction help?
I figured out the password. Just run it in Euphoria. The file just wouldn't upload for some reason.