GUIEnvironment

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Thomaskkc
Posts: 134
Joined: Fri Sep 15, 2006 4:04 pm

GUIEnvironment

Post by Thomaskkc »

i'd like to ask why a use the function getGUIEnvironment()
the .exe will have error?

just only use the code
IGUIEnvironment* env = Device->getGUIEnvironment();

Thanks
zeno60
Posts: 342
Joined: Sun May 21, 2006 2:48 am
Location: NC, USA
Contact:

Post by zeno60 »

Are you sure it is this specific line that is giving you the error? If so, what is the error and is it a comile or run-time error?
Thomaskkc
Posts: 134
Joined: Fri Sep 15, 2006 4:04 pm

Post by Thomaskkc »

when i comment this line, it can run
when add this line, when it exe the file,
it has run timwe error
slang
Posts: 6
Joined: Wed Sep 27, 2006 6:34 am

Post by slang »

show the block of code around where you insert that line...
Thomaskkc
Posts: 134
Joined: Fri Sep 15, 2006 4:04 pm

Post by Thomaskkc »

if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);

}

IGUIEnvironment* env = Device->getGUIEnvironment();
IGUIToolBar* bar = env->addToolBar();
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It's strange that the next line does still work when commenting the getEnvironment! This should lead to a crash upon null dereferencing. Anyway, yre you sure that Driver is properly instantiated?
Post Reply