adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] On source code structure and backends


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] On source code structure and backends
Date: 07 Mar 2003 21:00:43 +0100

> > This adds some contraints to our programming, but brings a lot of
> > flexibility - backends could then be distributed separately from the
> > engine, and will be selectable at runtime.
> 
> That's even better than I had imagined. Might make porting a bit more
> difficult, but dynamic loading seems to work well for Python, so we
> should also manage to make it work everywhere.

AFAIK, we'd only have a few #ifdefs for windows. The DLL tools are just
the same, but named differently.

> > Another thing I've tested (which but has failed) was to run python,
> > import the backend Python wrapper, and then import the libgfx. I
> > thought that it would be able to find all the symbols it links to as
> > the backend has been loaded by Python, but it didn't work. Sad,
> > because it would have been a nice solution.
> 
> Do you really need a wrapper around the backend? I think it might be so
> lowlevel, that direct access from python makes not much sense.

I needed it to be able to import the backend. I hoped that by importing
a backend, and right after the gfx library, we would have the gfx lib
using the symbols of the loaded backend. That way, the Python init
script could choose itself the backend to use. Anyway, the other
solution (that will at least work ;)) is as good - probably better even,
since it wouldn't need to either have Python to dynamically choose the
backend to use, or either link at compile time to the backend we want.
And as said before, since the libraries and include files could now be
installed to the system, we could even ship backend separately from the
engine.

More to come about this in a couple of days - I'll run some tests!
Alex.
-- 
http://www.gnurou.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]