diff --git a/lib/irrlicht/source/Irrlicht/Irrlicht.cpp b/lib/irrlicht/source/Irrlicht/Irrlicht.cpp index 7f5d0a4cc..0107425f8 100644 --- a/lib/irrlicht/source/Irrlicht/Irrlicht.cpp +++ b/lib/irrlicht/source/Irrlicht/Irrlicht.cpp @@ -4,7 +4,7 @@ #include "IrrCompileConfig.h" -static const char* const copyright = "Irrlicht Engine (c) 2002-2012 Nikolaus Gebhardt"; +//static const char* const copyright = "Irrlicht Engine (c) 2002-2012 Nikolaus Gebhardt"; #ifdef _IRR_WINDOWS_ #include @@ -30,10 +30,6 @@ static const char* const copyright = "Irrlicht Engine (c) 2002-2012 Nikolaus Geb #include "CIrrDeviceLinux.h" #endif -#ifdef _IRR_COMPILE_WITH_IPHONE_DEVICE_ -#include "iOS/CIrrDeviceiOS.h" -#endif - #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ #include "CIrrDeviceSDL.h" #endif @@ -57,7 +53,8 @@ namespace irr IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDevice(video::E_DRIVER_TYPE driverType, const core::dimension2d& windowSize, u32 bits, bool fullscreen, - bool stencilbuffer, bool vsync, IEventReceiver* res) + bool stencilbuffer, bool vsync, IEventReceiver* res, + io::IFileSystem *file_system) { SIrrlichtCreationParameters p; p.DriverType = driverType; @@ -67,6 +64,7 @@ namespace irr p.Stencilbuffer = stencilbuffer; p.Vsync = vsync; p.EventReceiver = res; + p.FileSystem = file_system; return createDeviceEx(p); } @@ -95,11 +93,6 @@ namespace irr if (params.DeviceType == EIDT_X11 || (!dev && params.DeviceType == EIDT_BEST)) dev = new CIrrDeviceLinux(params); #endif - -#ifdef _IRR_COMPILE_WITH_IPHONE_DEVICE_ - if (params.DeviceType == EIDT_IPHONE || (!dev && params.DeviceType == EIDT_BEST)) - dev = new CIrrDeviceIPhone(params); -#endif #ifdef _IRR_COMPILE_WITH_SDL_DEVICE_ if (params.DeviceType == EIDT_SDL || (!dev && params.DeviceType == EIDT_BEST)) @@ -111,17 +104,17 @@ namespace irr dev = new CIrrDeviceFB(params); #endif -#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_ - if (params.DeviceType == EIDT_ANDROID || (!dev && params.DeviceType == EIDT_BEST)) { - dev = new CIrrDeviceAndroid(params); - } -#endif - #ifdef _IRR_COMPILE_WITH_CONSOLE_DEVICE_ if (params.DeviceType == EIDT_CONSOLE || (!dev && params.DeviceType == EIDT_BEST)) dev = new CIrrDeviceConsole(params); #endif +#ifdef _IRR_COMPILE_WITH_ANDROID_DEVICE_ + if (params.DeviceType == EIDT_ANDROID || (!dev && params.DeviceType == EIDT_BEST)) { + dev = new CIrrDeviceAndroid(params); + } +#endif + if (dev && !dev->getVideoDriver() && params.DriverType != video::EDT_NULL) { dev->closeDevice(); // destroy window @@ -147,7 +140,7 @@ namespace video } // end namespace irr -#if defined(_IRR_WINDOWS_API_) +#if defined(_IRR_WINDOWS_API_) && !defined(_IRR_STATIC_LIB_) BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 1d9681447..303110a48 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -113,7 +113,7 @@ IrrDriver::IrrDriver() m_shadow_matrices = NULL; m_resolution_changing = RES_CHANGE_NONE; m_phase = SOLID_NORMAL_AND_DEPTH_PASS; - m_device = createDevice(video::EDT_NULL, + m_device = irr::createDevice(video::EDT_NULL, irr::core::dimension2d(640, 480), /*bits*/16U, /**fullscreen*/ false, /*stencilBuffer*/ false, @@ -440,7 +440,11 @@ void IrrDriver::initDevice() Log::verbose("irr_driver", "Trying to create device with " "%i bits\n", bits); +#ifdef ANDROID_DEVICE params.DriverType = video::EDT_OPENGL; +#else + params.DriverType = video::EDT_OGLES2; +#endif params.Stencilbuffer = false; params.Bits = bits; params.EventReceiver = this; @@ -473,7 +477,7 @@ void IrrDriver::initDevice() (int)UserConfigParams::m_antialiasing); } */ - m_device = createDeviceEx(params); + m_device = irr::createDeviceEx(params); if(m_device) break; @@ -487,7 +491,11 @@ void IrrDriver::initDevice() UserConfigParams::m_width = MIN_SUPPORTED_WIDTH; UserConfigParams::m_height = MIN_SUPPORTED_HEIGHT; +#ifdef ANDROID_DEVICE m_device = createDevice(video::EDT_OPENGL, +#else + m_device = createDevice(video::EDT_OGLES2, +#endif core::dimension2du(UserConfigParams::m_width, UserConfigParams::m_height ), 32, //bits per pixel