Irrlicht - "unsupported texture format" [solved]

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

User avatar
FTC
Just popping in
Just popping in
Posts: 8
Joined: Sat Oct 02, 2010 09:35

Irrlicht - "unsupported texture format" [solved]

Postby FTC » Sat Oct 02, 2010 09:47

Hi,

i am new to cegui, so I was trying to setup a very basic interface with irrlicht. Through searching and tutorials I got this far:

Code: Select all

    IrrlichtDevice *device =createDevice(EDT_OPENGL, dimension2d<u32>(640, 480), 16,false, false, false, 0);
    CEGUI::IrrlichtRenderer *myRenderer = &CEGUI::IrrlichtRenderer::bootstrapSystem(*device);
    CEGUI::SchemeManager::getSingleton().create("TaharezLook.scheme");
    CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
    CEGUI::Window* root = (CEGUI::Window*)winMgr.createWindow("DefaultWindow", "Root");
    CEGUI::FrameWindow* wnd = (CEGUI::FrameWindow*)winMgr.createWindow("TaharezLook/FrameWindow", "Demo Window");
    root->addChildWindow(wnd);


and of course

Code: Select all

        smgr->drawAll();
        CEGUI::System::getSingleton().renderGUI();
        driver->endScene();


I had to find out why the programm crashed several times (exceptions) but now it kind of runs. Except it does not work.
When using this

Code: Select all

    CEGUI::FrameWindow* wnd = (CEGUI::FrameWindow*)winMgr.createWindow("TaharezLook/FrameWindow", "Demo Window");

I get two "unsupported texture format" messages in the console and no gui displayed, Irrlicht runs like it should. I just use the files that were included in the package. Not finding the files does not seem to be the problem anymore, because that caused exceptions.
I use irrlicht 1.7.1 and Code::Blocks with mingw on Win XP.
Do I have to link another specifig image loader or something?

greetings
Last edited by FTC on Sat Oct 16, 2010 12:59, edited 2 times in total.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Irrlicht - "unsupported texture format"

Postby CrazyEddie » Mon Oct 04, 2010 09:13

I think those texture messages are an issue in Irrlicht - I saw it mentioned on their forum - and are harmless and can be ignored (I get them too).

You have to set the gui 'sheet' to the root you created:

Code: Select all

CEGUI::System::getSingleton().setGUISheet( root );


CE.

User avatar
FTC
Just popping in
Just popping in
Posts: 8
Joined: Sat Oct 02, 2010 09:35

Re: Irrlicht - "unsupported texture format"

Postby FTC » Mon Oct 04, 2010 13:09

Hi,

thanks :) I really missed that line in the tutorials somehow :oops:
However, I seem to have missed something else, because my windows looks like this:
Image
There is no titlebar :(
Did I forget anything else?
That's the current code:

Code: Select all

    CEGUI::SchemeManager::getSingleton().create("TaharezLook.scheme");
    CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
    CEGUI::Window* root = (CEGUI::Window*)winMgr.createWindow("DefaultWindow", "Root");
    CEGUI::System::getSingleton().setGUISheet( root );
    CEGUI::FrameWindow* wnd = (CEGUI::FrameWindow*)winMgr.createWindow("TaharezLook/FrameWindow", "Demo Window");
    root->addChildWindow(wnd);
    wnd->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.25f, 0 ), CEGUI::UDim( 0.25f, 0 ) ) );
    wnd->setSize( CEGUI::UVector2( CEGUI::UDim( 0.5f, 0 ), CEGUI::UDim( 0.5f, 0 ) ) );
    wnd->setText( "Hello World!" );


greetings

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Irrlicht - "unsupported texture format" [half solved]

Postby CrazyEddie » Wed Oct 06, 2010 09:04

Hmmm. Does the window react if you click / drag where the titlebar should be? I want to establish if the title bar is truly not there, or whether it's a rendering issue (which is most likely). It seems it's probably an issue with rendering to texture (you could confirm this by calling setUsingAutoRenderingSurface on the window and passing false).

Which hardware are you running on?

CE

User avatar
FTC
Just popping in
Just popping in
Posts: 8
Joined: Sat Oct 02, 2010 09:35

Re: Irrlicht - "unsupported texture format" [half solved]

Postby FTC » Wed Oct 06, 2010 16:36

Hi,

setUsingAutoRenderingSurface did the trick for showing the rest of the window, however, for the windows skin, the window seems to be cropped somehow.
But this could also be due to my hardware. I currently run this on my old laptop, because my main pc is not available.
I run it on WinXP which itself runs on a Celeron M processor 1.6 ghz with 768 mb ram and an Intel Onbard Graphicscard. OpenGL seems not to be the favorite driver of that card, but my irrlicht dll has no directX driver.

Neither the window, nor the cursur does react, probably because I do not pass any events, yet. Or sould that be done by the system automatically?
[edit] Just read the input tutorial, I now have a reaction ;) The window responds as it should, even with the titlebar not being drawn.

My full programm looks like this:

Code: Select all

#include <irrlicht.h>
#include <CEGUI.h>
#include <RendererModules/Irrlicht/CEGUIIrrlichtRenderer.h>

using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;


int main(int argc, char** argv)
{

    IrrlichtDevice *device =
        createDevice(EDT_SOFTWARE, dimension2d<u32>(640, 480), 16,
            false, false, false, 0);

    CEGUI::IrrlichtRenderer *myRenderer =
       &CEGUI::IrrlichtRenderer::bootstrapSystem(*device);

    device->setWindowCaption(L"Hello World! - Window Test");

    IVideoDriver* driver = device->getVideoDriver();
    ISceneManager* smgr = device->getSceneManager();


    smgr->addCameraSceneNode();


    CEGUI::SchemeManager::getSingleton().create("TaharezLook.scheme");
    CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton();
    CEGUI::Window* root = (CEGUI::Window*)winMgr.createWindow("DefaultWindow", "Root");
    CEGUI::System::getSingleton().setGUISheet( root );
    CEGUI::FrameWindow* wnd = (CEGUI::FrameWindow*)winMgr.createWindow("TaharezLook/FrameWindow", "Demo Window");
    root->addChildWindow(wnd);
    wnd->setPosition( CEGUI::UVector2( CEGUI::UDim( 0.25f, 0 ), CEGUI::UDim( 0.25f, 0 ) ) );
    wnd->setSize( CEGUI::UVector2( CEGUI::UDim( 0.5f, 0 ), CEGUI::UDim( 0.5f, 0 ) ) );
    wnd->setText( "Hello World!" );
    wnd->setUsingAutoRenderingSurface(false);

    CEGUI::System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow");

    while(device->run())
    {
        driver->beginScene(true, true, SColor(0,200,200,200));

        smgr->drawAll();
        CEGUI::System::getSingleton().renderGUI();
        driver->endScene();
    }

    device->drop();

    return 0;
}




greetings

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Irrlicht - "unsupported texture format" [half solved]

Postby CrazyEddie » Fri Oct 08, 2010 09:20

Can we confirm which version of CEGUI this is, please? :) If it's 0.7.2 or later, I think it could be driver related (not passing the buck - if you test it elsewhere, I'm confident it would work!). If it's an earlier version, we did fix some bugs where we were not correctly detecting capabilities correctly, so it could be that.

Hmmm. Then again, I see you're using the software renderer in irr, I think that definitely will affect things, since I only really test this stuff with GL/D3D. I'll add a ticket to remind me to test, and at least try to fix any issues that come up with the software renderer.

CE.

User avatar
FTC
Just popping in
Just popping in
Posts: 8
Joined: Sat Oct 02, 2010 09:35

Re: Irrlicht - "unsupported texture format" [half solved]

Postby FTC » Fri Oct 08, 2010 17:14

Hi,

I had the chance to test the gui on another pc, not much better than my pc, but the gui is working fine (with all skins). Software renderer does not work. I use 0.7.2.

Also, I found the CEGUI Layout editor and tested it. It wont even start on my laptop, but runs slowly on the other pc.

I think when my pc is useble again, the problems will be gone :)

greetings

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Irrlicht - "unsupported texture format" [half solved]

Postby CrazyEddie » Wed Oct 13, 2010 08:40

Thanks for the update.

I shall make some attempt to get things working with the software driver if at all possible, though obviously it's not a priority ;)

Hope all is well once your PC is usable.

CE

User avatar
FTC
Just popping in
Just popping in
Posts: 8
Joined: Sat Oct 02, 2010 09:35

Re: Irrlicht - "unsupported texture format" [half solved]

Postby FTC » Sat Oct 16, 2010 12:58

Hi,

pc is repaired, everything works fine now :)
Using the software driver is still not possible (programm crashes).

greetings


Return to “Help”

Who is online

Users browsing this forum: No registered users and 26 guests