Cannot display the texture.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

brizally
Just popping in
Just popping in
Posts: 2
Joined: Thu May 18, 2006 12:43

Cannot display the texture.

Postby brizally » Sat May 20, 2006 07:25

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?

User avatar
Duck
Just popping in
Just popping in
Posts: 9
Joined: Sun Apr 30, 2006 17:15

Postby Duck » Sun May 21, 2006 19:59

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.

brizally
Just popping in
Just popping in
Posts: 2
Joined: Thu May 18, 2006 12:43

Postby brizally » Tue May 23, 2006 04:57

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?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Tue May 23, 2006 05:57

There are no restrictions as such, they lie in the renderer modules.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 1 guest