I posted a thread for help yesterday and now I'm making another, hopefully I don't become a pest.
I brushed off an old project of mine, since I last worked on it I have erased and reinstalled my Ubuntu partition that I am running it in. The project is a game, when it starts you have the option to change the settings which brings up a window, right now it's just a window with a combo box of resolutions in it. this is what it looks like in CELayoutEditor:
This is how it looks when I bring it up in the game
You may also notice what looks like an out of place right scroll button in the upper right corner, that should be my mouse pointer.
I"ve tried the CEGUI/OGRE tutorial in the OGRE wiki and CEGUI worked fine there[/img]
Resources seem to be messed up
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 8
- Joined: Tue Jul 29, 2008 05:16
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Resources seem to be messed up
OffbeatPatriot wrote:I posted a thread for help yesterday and now I'm making another, hopefully I don't become a pest.
There's much competition for the highly sought after 'pest' label; you have a way to go yet
With regards to the issue, my first thought is that it looks like what you get when using an image that has non power of two dimensions. Though if you're using a standard non-modified TaharezLook.tga then it should not be that (please confirm that, though!). Having just double-checked the texture file, it actually now looks like the image is getting flipped vertically, which I can't explain at the moment, other than it being an issue caused during loading - do you know / can you tell us which lib is doing the loading (such as FreeImage, DevIL or whatever) and it's version (my Ogre is rusty, so apologies if the answer to that is obvious).
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
-
- Just popping in
- Posts: 8
- Joined: Tue Jul 29, 2008 05:16
I thought I was using SILLY but I found this line in config.log
#define CEGUI_DEFAULT_IMAGE_CODEC FreeImageImageCodec
so FreeImage.
And the tga file should be an unmodified one, I copied the contents of /usr/local/shared/CEGUI/ into the datafiles I used just in case and got the same results.
Edit:
I've recompiled with SILLY as my default image codec and everything works.
#define CEGUI_DEFAULT_IMAGE_CODEC FreeImageImageCodec
so FreeImage.
And the tga file should be an unmodified one, I copied the contents of /usr/local/shared/CEGUI/ into the datafiles I used just in case and got the same results.
Edit:
I've recompiled with SILLY as my default image codec and everything works.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Ah, I thought you were using Ogre for rendering, sorry
This means that there are some potential issues in the FreeImage codec that I should probably look at.
This means that there are some potential issues in the FreeImage codec that I should probably look at.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hmm, so in effect we would probably benefit from moving away from tga and over to png for all our files?
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
I think so.
The only advantage you have with the tga files was to have at least one file format that a lot of drawing programs can export to (not always correctly) without any external library.
That's the only reason I would keep it (or replace it by bmp files that don't have the flipping).
But I'd say you have enough more important things to do at the moment, and your taharezlook file has the correct tga format
That would be a thing to do in a free day when there's nothing else to do.
The only advantage you have with the tga files was to have at least one file format that a lot of drawing programs can export to (not always correctly) without any external library.
That's the only reason I would keep it (or replace it by bmp files that don't have the flipping).
But I'd say you have enough more important things to do at the moment, and your taharezlook file has the correct tga format
That would be a thing to do in a free day when there's nothing else to do.
CrazyEddie wrote:Hmm, so in effect we would probably benefit from moving away from tga and over to png for all our files?
I think I have the trick:
in CEGUITGAImageCodec.cpp, there is this code:
Code: Select all
// Now we move the file pointer to the pixel data
buffer += length + 1;
For me, it's at line 180-181. Instead of just skipping that byte, you could read some information out of this. Namely:
Code: Select all
bool bFlipHoriz = (buffer[0] & 16) == 16;
bool bFlipVert = !((buffer[0] & 32) == 32);
buffer += length + 1;
And then flip the image accordingly. For me that works with your tga file and tga files I export from the gimp, this also seems to correspond to the tga reference for tga version 2 files.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Cool, thanks for the info. I'll see about doing something about it sometime soon (I added a mantis note, so I don't forget ).
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 4 guests