Image->createImage error

huaner

10-07-2007 03:24:57

hi;
i want to creat a new image, my code is:

QuickGUI::Image* logoImage = mSheet->createImage(Ogre::Vector4(0.02,0.07,0.2,0.2), "Examples/OgreLogo", true);
logoImage->setBorderWidth(10);

but, the reslut is that the image is white, why?
thank you!

kungfoomasta

10-07-2007 04:52:00

Change the last parameter to false, unless you have created a Texture called "Examples/OgreLogo". I believe that is a material script. The reason I have that variable is to enable use of render to texture, so it can be displayed via the Image Widget.

Hope that fixes it.

huaner

10-07-2007 08:09:43

Change the last parameter to false, unless you have created a Texture called "Examples/OgreLogo". I believe that is a material script. The reason I have that variable is to enable use of render to texture, so it can be displayed via the Image Widget.

Hope that fixes it.

kungfoomasta, thank for your reply. i think i can't exprehend the souce code