creating an Image set object from textures

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
magicman
Just popping in
Just popping in
Posts: 4
Joined: Fri Dec 30, 2005 18:39

creating an Image set object from textures

Postby magicman » Fri Dec 30, 2005 19:00

I am new to CEGUI , developing a simple GUI application for OGRE3D based game. On selection of a text item from listbox I want to display a picture associated with the text item. All Image files (JPEG) are kept in applcation folder.

First I have to create a texture object I use
myTexture=CEGUI::System::getSingleton().getRenderer()->createTexture(

What parameters should I pass to this function? :roll:

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Re: creating an Image set object from textures

Postby martignasse » Sat Dec 31, 2005 08:17

All Image files (JPEG) are kept in applcation folder.
What are the dimensions of the images you want to show ?
Basiclly, it's better to put them in an imageset (or more than one), like that, you just have to load the imageset.

hope it help

User avatar
magicman
Just popping in
Just popping in
Posts: 4
Joined: Fri Dec 30, 2005 18:39

Re: creating an Image set object from textures

Postby magicman » Mon Jan 09, 2006 14:27

All images have standard dimensions , 640 * 480. But I should be able to resize them dynamically.

What resourcegroup I need to pass?

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

Re: creating an Image set object from textures

Postby lindquist » Mon Jan 09, 2006 21:22

You probably want to use the function ImagesetManager::createImagesetFromImageFile API ref

It creates a imageset with a single image (seems like what you want.)
The resource group is passed on the the resource provider when loading the image, and is the Ogre resource group you want to load from. Leave it empty if you dont use this.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 10 guests