Page 1 of 1

Cannot display the texture.

Posted: Sat May 20, 2006 07:25
by brizally
hello, i'm a newer to cegui.

I try to display a jpeg file on the screen.
This is my code:

Code: Select all

//Init();
ImagesetManager::getSingleton().createImagesetFromImageFile(
   "MainMenuBackground", "GUI/images/MainMenuBk.jpg");
//DisplayFunc:
StaticImage *background = ....
bkground->setBackgroundImage("MainMenuBackground", "full_image");
bkground->setPosition(Point(0.0f, 0.0f));
bkground->setSize(Size(1.0f, 1.0f));

The code works well, and the image displayed correctly on my machine.
But the other team members could not see it, there just be white on their screen.

We try to load another image supplied by the CEGUI SDK, well, it works
well on all the machines. So I don't know the reason of this problem.

Does anybody tell me why?

Posted: Sun May 21, 2006 19:59
by Duck
A few thoughts:

Perhaps the file isn't to the power two and square, which could create problems with older graphics cards... (I'm not sure if CEGUI handles that for you).

Check the file is present in the right place on the other machines.

Step through the code in a debugger to see if it's failing to load the texture.

Posted: Tue May 23, 2006 04:57
by brizally
I generate the .dds image through the Texture Atlas Tool supplied by the NVIDIA, and the dds images can display correctly on all the machines. So the problem is solved by this way.

But I still want to know what's the difference between the .dds image and the common image formats. And, does there any restriction on image selection in CEGUI?

Posted: Tue May 23, 2006 05:57
by lindquist
There are no restrictions as such, they lie in the renderer modules.