1. EuRayLib4 Released!
- Posted by Icy_Viking Nov 18, 2021
- 1452 views
Hello all,
I have just released EuRayLib4. This is a wrapper for Raylib version 4. I have written this from scratch. I started a new wrapper for this version as the old code base was pretty messy. However, I did fix the typos in the old code base. Initially I was going to wait on this, hoping that Eu 4.2.0 might come out, but when my internet was cutting in and out the other day, I needed something to do. So I wrapped Raylib version 4. It has been made to be as Euphoria friendly to use as possible.
NOTE: I tried to compile raygui as a DLL. However I couldn't get it to compile. If anyone is able to, I wouldn't mind wrapping raygui.
Some examples are included.
Get here: https://github.com/gAndy50/EuRayLib4
Example:
without warning include EuRay4.ew include flags.e atom Width = 800 atom Height = 600 InitWindow(Width,Height,"Simple Window") SetTargetFPS(60) atom ball_x = Width / 2 atom ball_y = Height / 2 atom ball_size = 30 while not WindowShouldClose() do BeginDrawing() if IsKeyDown(KEY_RIGHT) then ball_x += 2.0 elsif IsKeyDown(KEY_LEFT) then ball_x -= 2.0 elsif IsKeyDown(KEY_UP) then ball_y -= 2.0 elsif IsKeyDown(KEY_DOWN) then ball_y += 2.0 end if if ball_x <= 0 then ball_x = 0 elsif ball_x >= Width then ball_x = 780 end if if ball_y <= 0 then ball_y = 0 elsif ball_y >= Height then ball_y = 550 end if ClearBackground(BLACK) DrawText("Use arrow keys to move ball.",10,10,15,YELLOW) DrawCircleV(ball_x,ball_y,ball_size,GREEN) EndDrawing() end while CloseWindow()
2. Re: EuRayLib4 Released!
- Posted by ChrisB (moderator) Nov 19, 2021
- 1442 views
Hey Andy, nice.
But if you have a spare afternoon, why don't you just write your own gui api?
cheers
Chris
3. Re: EuRayLib4 Released!
- Posted by Icy_Viking Nov 19, 2021
- 1414 views
Hey Andy, nice.
But if you have a spare afternoon, why don't you just write your own gui api?
cheers
Chris
I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.
4. Re: EuRayLib4 Released!
- Posted by ChrisB (moderator) Nov 20, 2021
- 1346 views
Hehe, my point is that your output is so prolific, you could probably knock one together, that would look better than the one you are talking about, in what, 30 mins, on hour tops!
I barely have time to download one of your libs and look before another one's out.
Is tic short for tongue in cheek?
Cheers
Chris
5. Re: EuRayLib4 Released!
- Posted by petelomax Nov 20, 2021
- 1380 views
I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.
I get that, I really do, but... long story short:
IupTable wraps IupMatrix on desktop/Phix - total pita and still bugridden
IupTable wraps <table> in HTML/JavaScript/CSS - almost as bad and even more bugridden
... some time later ...
IupGraph ignores IupPlot (which it replaces) and does it all on a plain canvas.
IupGraph is auto-transpiled to HTML/JavaScript (no CSS needed) and works just fine.
The latter draws axis lines with text labels, a grid, a text title, as well as the actual lines.
You can run this little demo online here (nb MINSIZE ain't working yet).
Methinks restarting IupTable from scratch doing it all by hand ain't such a bad idea....
Of course you gotta have some basics to work with, in my case a plain canvas.
6. Re: EuRayLib4 Released!
- Posted by Icy_Viking Nov 20, 2021
- 1392 views
I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.
I get that, I really do, but... long story short:
IupTable wraps IupMatrix on desktop/Phix - total pita and still bugridden
IupTable wraps <table> in HTML/JavaScript/CSS - almost as bad and even more bugridden
... some time later ...
IupGraph ignores IupPlot (which it replaces) and does it all on a plain canvas.
IupGraph is auto-transpiled to HTML/JavaScript (no CSS needed) and works just fine.
The latter draws axis lines with text labels, a grid, a text title, as well as the actual lines.
You can run this little demo online here (nb MINSIZE ain't working yet).
Methinks restarting IupTable from scratch doing it all by hand ain't such a bad idea....
Of course you gotta have some basics to work with, in my case a plain canvas.
I did wrap an older version of IUP. Its an ok GUI library. I mean if QT had a C port, I might wrap that. I tried wrapping FLTK's C port, but it was a mess. Also, the thing is I'm not sure where to really start with making my own GUI.
7. Re: EuRayLib4 Released!
- Posted by petelomax Nov 21, 2021
- 1299 views
I wonder if it is worth trying to embed Julia in Eu/Phix: https://docs.julialang.org/en/v1/manual/embedding/
8. Re: EuRayLib4 Released!
- Posted by ryanj Nov 22, 2021
- 1237 views
Icy_Viking, That's really cool! I have heard of RayLib 4.0 recently and thought about trying it. Hopefully I'll have some time to try it soon in Euphoria with your library.
9. Re: EuRayLib4 Released!
- Posted by Icy_Viking Nov 22, 2021
- 1272 views
Icy_Viking, That's really cool! I have heard of RayLib 4.0 recently and thought about trying it. Hopefully I'll have some time to try it soon in Euphoria with your library.
Thanks ryanj. I continue to update my other wrappers as well as their libraries get updates. As for the GUI thing, I might compiling/building raygui again, but I kept getting errors. I did recently look into Enlightment/EFL, while it is a C library, it is more for Linux, though windows builds do exist, I did try and start a wrapper for it, but I kept running into compatbilility errors and DLLs, so I figured it would be more trouble than it would be worth.
Also, adding to its complexity is that it is a series of layers of libraries built upon each other. So if you use one, you might need to use another. Regardless, I think it would be a cool library or wrapper to have for Euphoria.
https://en.wikipedia.org/wiki/Enlightenment_Foundation_Libraries
http://win-builds.org/doku.php/1.5.0_packages#efl_1112-3_-_enlightenment_core_library
I found premade Windows binaries, but again it is a huge library and it would be a lot of work to get working properly.
10. Re: EuRayLib4 Released!
- Posted by begin Dec 05, 2021
- 1124 views
hallo,
I adapted it to PHIX (x64), which was easy.
- Changed a couple of procedures to functions.
- Changed a couple sequences to strings.
- I added a couple of hundred colors.
Now I don't know I can get an rar archive to you or anybody else, who wants to use your work.
11. Re: EuRayLib4 Released!
- Posted by begin Dec 05, 2021
- 1136 views
Hey Andy, nice.
But if you have a spare afternoon, why don't you just write your own gui api?
cheers
Chris
I wouldn't mind writing my own gui api, but it would be a lot more work than wrapping something that is already available.
Why don't you wrap either
https://github.com/ocornut/imgui or
https://github.com/Immediate-Mode-UI/Nuklear
That would be easier.
12. Re: EuRayLib4 Released!
- Posted by petelomax Dec 05, 2021
- 1120 views
hallo,
I adapted it to PHIX (x64), which was easy.
- Changed a couple of procedures to functions.
- Changed a couple sequences to strings.
- I added a couple of hundred colors.
Now I don't know I can get an rar archive to you or anybody else, who wants to use your work.
I have created a page on PCAN for you here. You should be able to upload your file simply by clicking on the zip file link (and/or rename it [as .rar] if you want).
An alternative might be to clone the github repository, upload your changes there, and create a pull request for Andy to sort out (assuming your mods work equally on both Eu and Phix).
13. Re: EuRayLib4 Released!
- Posted by begin Dec 05, 2021
- 1097 views
Thanx million.
I made sdl run for me to - and phix if anybody is interested. but strictly x64-
14. Re: EuRayLib4 Released!
- Posted by Icy_Viking Dec 05, 2021
- 1081 views
I have looked into wrapping Nuklear, though it uses quite a bit of structs. I might look into wrapping CIMGUI. Again if someone can compile raygui into a DLL, I wouldn't mind wrapping. I can't seem to get it to build into a DLL.