CEGUI problem

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Guest

CEGUI problem

Post by Guest »

Does anyone know whats wrong with this... I'm just trying to get CEGUI to work before I start messing with the API and stuff....

Please tell me if you know anything about compiling CEGUI with Irrlicht

Code: Select all

#include <irrlicht.h>
#include <CEGUI.h>
#include <renderers/IrrlichtRenderer/irrlichtrenderer.h>


using namespace irr;
using namespace core;
using namespace scene;
using namespace video;

using namespace CEGUI;

int main(void)
{
	IrrlichtDevice *device =
		createDevice(EDT_DIRECT3D9,dimension2d<s32>(640,480),32,false,false,false);
	
	device->setWindowCaption(L"CEGUI + IrrlichtTest");
	IVideoDriver *driver = device->getVideoDriver();
	ISceneManager *smgr = device->getSceneManager();
	smgr->addCameraSceneNode();

	IrrlichtRenderer* ceguir = new IrrlichtRenderer(device,true);
	System* cegui = new System(ceguir);

	Imageset *taharezImages	
		= ImagesetManager::getSingleton().createImageset("../datafiles/imagesets/TaharezLook.imageset");

	cegui->setDefaultMouseCursor( &taharezImages -> getImage( "MouseArrow" ) );
	FontManager::getSingleton().createFont("../datafiles/fonts/Commonwealth-10.font");
	SchemeManager::getSingleton().loadScheme("../datafiles/schemes/TaharezLookWidgets.scheme");
	
	WindowManager* winmgr = &WindowManager::getSingleton();
	
	DefaultWindow* root = (DefaultWindow*)winmgr -> createWindow("DefaultWindow", "Root");
	cegui->setGUISheet(root);
	
	FrameWindow* wnd = (FrameWindow*)winmgr -> createWindow("TaharezLook/FrameWindow", "Demo Window");

	root->addChildWindow(wnd);

	wnd->setPosition(Point(0.25f, 0.25f));
	wnd->setSize(Size(0.5f, 0.5f));

	wnd->setMaximumSize(Size(1.0f, 1.0f));
	wnd->setMinimumSize(Size(0.1f, 0.1f));

	wnd->setText("Some Thing");

	while(device->run())
	{
		if(device->isWindowActive())
		{
			driver->beginScene(true,true,SColor(0,0,0,0));
			smgr->drawAll();
			cegui->renderGUI();
			driver->endScene();
		}
	}
	delete System::getSingletonPtr();
	device->drop();
	return 0;
}
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Heavens! Don't just dump your code here. At least have the decency to state your problem. Is there a compiler error, a runtime error? Anything in the logs? When there is an error what's the message? What steps did you already take to circumvent your problem?
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

I gave up on getting CE to work with irrlicht. There are a huge number of dependencies depending on what compiler you are using, because of requirements for STL.
Guest

Post by Guest »

@guest: why dont you want to use irrlichts gui system? i mean i dont want to tell you what to do but when irrlichts gui system can do the same things (i dont know cegui) then why not use it :) ?

@Baal Cadar that link is just perfect!!

i would like to quote this part:
Despite this, hackers have a reputation for meeting simple questions with what looks like hostility or arrogance. It sometimes looks like we're reflexively rude to newbies and the ignorant. But this isn't really true.

What we are, unapologetically, is hostile to people who seem to be unwilling to think or to do their own homework before asking questions. People like that are time sinks — they take without giving back, and they waste time we could have spent on another question more interesting and another person more worthy of an answer. We call people like this “losers” (and for historical reasons we sometimes spell it “lusers”).
although im no hacker, i really think it describes my point of view about some of the newbie posts that are posted here.

see you! (have to read that article now hehe)
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

dhenton9000, hard deps for cegui are only DevIL and freetype, both of them are provided. You don't need extra STLPort or anything, it is only provided as an option. And you only need XERCES, if you use it as cegui's xml parser, which you don't need to, as it also has its own one built-in.
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

Baal Cadar wrote:dhenton9000, hard deps for cegui are only DevIL and freetype, both of them are provided. You don't need extra STLPort or anything, it is only provided as an option. And you only need XERCES, if you use it as cegui's xml parser, which you don't need to, as it also has its own one built-in.
So I take it you got it to compile with Irrlicht, I'm on VC++ 6, which compiler did you use to get it to work?
Guest

Post by Guest »

I'm not exactly sure what the problem is, It loads everything perfectly, it just crashes before it shows everything, It compiles fine with no errors, and no warnings. As I already states, if you would have read the post, then maybe you wouldn't act like an smartypants that thinks he knows everything...

CEGUI is wayyyyyyyyyyyy better and more proffesional looking them Irrlichts GUI.... And way more editable..
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Guest wrote:Does anyone know whats wrong with this... I'm just trying to get CEGUI to work before I start messing with the API and stuff....

Please tell me if you know anything about compiling CEGUI with Irrlicht
Huh? Reading this did not help at all to learn about your problem. You simply didn't state what's wrong and failed to provide any information at all. Read it again. The "behaving like an smartypants" goes right back to you.

So the new information you provided is, that it just crashes and that you don't get any error messages.

Two things we need: Paste your cegui.log. And tell us the call stack from the moment it crashes.
Guest

Post by Guest »

Anonymous wrote: As I already states, if you would have read the post, then maybe you wouldn't act like an smartypants that thinks he knows everything...
its really weird that people like you often behave like that when they dont get help immediately. baal cadar is right, your just lazy. you got some error, and posted your code here to let us solve it. thats not the way it works - do you think we want to download cegui and setting up a cegui project and test your code for you just because you did not provide ANY information about whats wrong?

if you want to get help, that first explain the problem.


bye!
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

I got it working, the problem is with config files and dlls. PM me and I can send the code. I'd post it, but I'd be afraid of offending the forum gods. Fortunately the forum gods don't need to know this--they've done it all before.
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Is posting cegui code here forbidden by some forum gods? Wasn't aware of this. What rule does say so?

Personally I prefer to have problem solutions in forums out in the open. This way others can benefit from it too, when they do a forum search on the same or a similiar problem.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Baal Cadar wrote:Is posting cegui code here forbidden by some forum gods? Wasn't aware of this. What rule does say so?

Personally I prefer to have problem solutions in forums out in the open. This way others can benefit from it too, when they do a forum search on the same or a similiar problem.
There are no rules here stating you can't post cegui code. :roll:
He was be sarcastic.
personally, I'd like to see the code. I'm not planning on using cegui, but I read others code as a learning tool. :)
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
_zola

Post by _zola »

You might find this interesting http://thomas.webtracker.ch/jahia/Jahia/pid/858
Its a tutorial for using CEQUI with irrlicht - maybe a bit outdated :) it uses CQUI v 0.2 anyway it sould help getting started.
Post Reply