Re: Allegro Wrapper?

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

Hello all,

So recently after looking through the updated documentation of Allegro, I have thought about making an Allegro wrapper. Now I know I did in the past, but its old and the codebase is just ugh. So I would rather start new with the most recent version of Allegro. Just wondering if anyone would use it or have use for it?

Codebase wise it would be similar to how the C version is. Each would have its own .e include file. For example: base.h would base.e and would contain the Euphoria code equvialent for wrapping DLLs.

As I recall, Allegro has the same problem as Raylib: it passes a lot of structures by value instead of by reference, e.g. al_map_rgb() returns an ALLEGRO_COLOR struct which is four floats.

Euphoria currently isn't equipped to pull that off the stack, but it can be. I think we need to work on solving this first instead of relying on hacks or shim libraries.

Most of my time recently has been spent pouring through the source code and picking at things to see how they work.

I will see if I can graft in libffi to replace the existing routines. That should allow a lot more flexibility, broader compatibility, and less work to understand calling conventions, etc.

Another thing we need is a better approach to wrapping C libraries. I've recently revisited IUP and I think I've got a good foundation sketched out for general-purpose C-to-Euphoria wrapping process.

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu