Creating Irrlicht device from separate functions

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
Def5
Posts: 21
Joined: Thu Nov 27, 2008 7:50 pm

Creating Irrlicht device from separate functions

Post by Def5 »

Hi! Is there any possibilities to create device from separate functions for example: SetVideoDriver(), SetWindowSize(), SetColorBits(), SetWindowId()... without rewriting some Irrlicht code and compiling him again. I tried to create something like that with creating class CConfigurator.
In functions of that class I used shared pointers (IS_DT, IS_WS...) of objects inside SIrrCreationParameters structure. When trying to compile CConfigurator file I´ve always get error "undeclared identifier". There is shared file I used:

Code: Select all

#ifndef IRR_SHARED_HPP
#define IRR_SHARED_HPP

#include "irrlicht.h"

using namespace irr;
using namespace video;
using namespace io;
using namespace scene;

SIrrlichtCreationParameters &param;

video::E_DRIVER_TYPE IS_DT = param.DriverType;
core::dimension2d<s32> IS_WS = param.WindowSize;
u32 IS_Bits = param.Bits;
bool IS_Fullscreen = param.Fullscreen;
bool IS_SB = param.Stencilbuffer;
bool IS_VSync = param.Vsync;
bool IS_AA = param.AntiAlias;
bool IS_HP_FPU = param.HighPrecisionFPU;
IEventReceiver* IS_ER = param.EventReceiver;
void* IS_W_ID = param.WindowId;

#endif // End of IRR_SHARED_HPP
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I guess it's just a namespace problem, but you should give the full error message.
Def5
Posts: 21
Joined: Thu Nov 27, 2008 7:50 pm

Post by Def5 »

I can´t currently provide full source code of that file (CConfigurator) or error message, because I erased it when I was mad but I know what you want me to say.

using namespace irr = BAD :(
namespace irr{<CODE>} = GOOD :D

I will write that class again and try this solution.
Post Reply