Creating Irrlicht device from separate functions
Posted: Sat Dec 13, 2008 10:53 pm
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:
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 ¶m;
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