adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] backend handling


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] backend handling
Date: Tue, 10 Oct 2006 00:49:13 +0200

Do you intend to "create" sdlgl backends for audio, input and main
too? (I guess copying the existing sdl modules should suffice).
Because the way the engine is written at present, it would be easier
if the same backend was used for everything. Like the -b command line
switch or the General/Backend config parameter are implemented to
handle a single backend only.

Or should we change stuff to allow different backends for the
different engine parts? Like sdlgl for gfx, sdlal for audio and plain
sdl for input and main. More tricky perhaps, but makes it easier to
pick what's best for each part ...

I suppose the second solution would be better for us. Because it makes
sense to use SDL for graphics and (say) OpenAL for audio. Doing so
would not only allow us to mix backends elegantly, but it would also
having copies of the same directories everywhere (not exactly copies,
since class names must be changed) which would be hazardous to
maintain.

If we stick to the first alternative, there's one more thing to think
about: right now, "sdl" is hardcoded as default backend in
adonthell::app::init. Would be nice if we'd figure out the best
available backend at configure/cmake time and supply it as -DBACKEND
or something like that.

If we implement the second, we still might be able to do the same on a
per engine part basis.

I think the right place for that is the configuration file. Or we
could give backends a "priority" number. Or maybe the app class could
select a "safe" backend (SDL makes sense here) by default if no better
backend is selected (that last solution sounds good to me, at least
for now - we just need to allow the user to switch backends through a
configuration menu).

Alex.




reply via email to

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