Page 1 of 1
CELayoutUser: Lets use DevIL not SILLY?
Posted: Mon Jun 18, 2007 23:30
by arrummzen
I don't know what the SILLY codec is, and apparently it isn't installed by default on most Linux distros, can we either make this user configurable or switch to the more common DevIL?
Change:
CEGUI::OpenGLRenderer::setDefaultImageCodecName("SILLYImageCodec");
To:
CEGUI::OpenGLRenderer::setDefaultImageCodecName("DevILImageCodec");
In:
src/EditorFrame.cpp
Thank you for your time,
James Steven Supancic III
Posted: Tue Jun 19, 2007 08:05
by Shades
SILLY is the Simple Image Loading LibrarY. It was designed for CEGUI by Dalfy (I believe, please someone correct if I'm wrong)
You can get it from the cegui download page:
http://www.cegui.org.uk/wiki/index.php/Downloads
And there is meant to be an API at
http://dalfy.dyndns.org/~ode/cegui/RC2/silly_api_reference but it doesn't seem to want to load anymore.
However I when you run ./configure you can change the default image library to whatever you like, for devil you will need to add
Code: Select all
--with-default-image-codec=DevILImageCodec
.
You can also disable the other image codecs there.[/code]
Posted: Thu Jun 21, 2007 11:03
by arrummzen
I am using the most recent SVN version. --with-default-image-codec=DevILImageCodec
has no effect at all. ./configure --help makes zero mention of that option or anything similar.
I have created a patch for the svn version:
http://arrummzen.net/celayout.patch
that enables an option that does just that.
Thank you for your time,
James Steven Supancic III
Posted: Thu Jun 21, 2007 12:09
by ppl
CEGUI::OpenGLRenderer::setDefaultImageCodecName() set OpenGLRenderer::d_defaultImageCodecName which is default initialized to CEGUI_DEFAULT_IMAGE_CODEC which is provided when you compile CEGUI.
When you compile CEGUI you can provide the ./configure option that Shades suggested.
CELayoutEditor should use whichever default codec CEGUI was compiled with. Therefor, the call to CEGUI::OpenGLRenderer::setDefaultImageCodecName() should be completly removed.
If we want to change the default image codec name in CELayoutEditor, it should be in the form of an option (.ini).
I didn't try any of this but by looking at the code this seems to be the logical thing to do.
Arrummzen, can you confirm that removing the call to setDefaultImageCodecName() solve your problem? I assume you compile CEGUI with DEVIL as the default image codec?
HTH,
ppl
Posted: Thu Jun 21, 2007 12:26
by arrummzen
Yes. I removed the call to
CEGUI::OpenGLRenderer::setDefaultImageCodecName("SILLYImageCodec");
and it works fine. I suppose that is a much easier way to solve the problem.
Thank you for your time,
James Steven Supancic III
Posted: Thu Jun 21, 2007 12:45
by ppl
Posted: Fri Jun 22, 2007 13:34
by scriptkid
I've looked at the cegui sources and i've discovered the reason why this quick change was made to the editor. Cegui defaults to the TGA image codec, which -as the name states- only allowes the use of TGA for background images.
An INI options could do (i read the mantis ticket), however the user has to know which codec (s)he may choose from. But on the other hand the current setup requires Silly so that's not much of an argument... yeah an ini option might do just fine...
Posted: Fri Jun 22, 2007 15:53
by ppl
scriptkid wrote:I've looked at the cegui sources and i've discovered the reason why this quick change was made to the editor. Cegui defaults to the TGA image codec, which -as the name states- only allowes the use of TGA for background images.
An INI options could do (i read the mantis ticket), however the user has to know which codec (s)he may choose from. But on the other hand the current setup requires Silly so that's not much of an argument... yeah an ini option might do just fine...
It would be even better if you could get a listing of available codecs from CEGUI. Is it possible?
Then we could add a menu option (+ ini option saving) to actually change the image codec on the fly from the available codec list.