Hmmm, and where do you declare BGTex ????
I mean not loading the bitmap into it...
Is this a global declaration ???
Code: Select all
EventReceiver EventRec;
IrrlichtDevice *MainDevice = createDevice(EDT_DIRECT3D9, dimension2d<s32>(800, 600), 16, false, true, false, &EventRec);
ISceneManager *Scene = MainDevice->getSceneManager();
IVideoDriver *Driver = MainDevice->getVideoDriver();
IGUIEnvironment *GUI = MainDevice->getGUIEnvironment();
If so, add the declaration for the texture to it:
Code: Select all
EventReceiver EventRec;
IrrlichtDevice *MainDevice = createDevice(EDT_DIRECT3D9, dimension2d<s32>(800, 600), 16, false, true, false, &EventRec);
ISceneManager *Scene = MainDevice->getSceneManager();
IVideoDriver *Driver = MainDevice->getVideoDriver();
IGUIEnvironment *GUI = MainDevice->getGUIEnvironment();
ITexture *BGTex;
After this you can add the extern declaration to the other file:
Code: Select all
extern IrrlichtDevice *MainDevice; //The Main Irrlicht Device
extern ISceneManager *Scene; //Scene Manager
extern IVideoDriver *Driver; //Video Driver
extern IGUIEnvironment *GUI; //GUI Environment
extern ITexture *BGTex;