I checked out the irrlicht-ogl-es branch with svn:
Code: Select all
svn co https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/branches/ogl-es irrlicht-ogl-es
read this,
1. Created a new XCode iPhone Static Library project. Added include and source group folders.
2. Add existing files from Irrlicht ogl-es include and source tree.
Then cleaned it up by removing any files that are not in the MacOSX project.
4. Added the following lines to IrrCompileConfig.h around line 81 after the #if defined(__APPLE__) bit.
#undef _IRR_USE_OSX_DEVICE_
#define _IRR_IPHONE_PLATFORM_
#define _IRR_USE_IPHONE_DEVICE_
5. In CIrrDeviceIPhone.cpp and .h
a. Rename setResizeAble to setResizable
b. Added the 'void CIrrDeviceIPhone::minimizeWindow(){}' method to the .cpp
c. Added extern "C" in front 'IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx(...' in the .cpp
d. Removed the enclosing 'namespace base { }'
6. Changed the line in COpenGLExtensionHandler.cpp where it sets MaxTextureUnits to
MaxTextureUnits = core::min_(static_cast<u8>(val),static_cast<u8>(MATERIAL_MAX_TEXTURES));
I think at this point the library should build. For the app:
and followed the steps above and skipped point 5 and 6, since hybrid stated he fixed that and I get heaploads of compiler errors, which boil down to more or less one:
In file included from /Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/source/Irrlicht/C3DSMeshFileLoader.cpp:5:
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/include/IrrCompileConfig.h:5:1: error: unterminated #ifndef
error: unterminated #ifndef
something obviously wrong with my compile config... anyone got an idea ?
the block from line 81 - 94 looks like this now...
Code: Select all
#if defined(__APPLE__) || defined(MACOSX)
#undef _IRR_USE_OSX_DEVICE_
#define _IRR_IPHONE_PLATFORM_
#define _IRR_USE_IPHONE_DEVICE_
#if !defined(MACOSX)
#define MACOSX // legacy support
#endif
#define _IRR_OSX_PLATFORM_
#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
#define _IRR_IPHONE_PLATFORM_
#define _IRR_COMPILE_WITH_IPHONE_DEVICE_
#if !defined(_IRR_USE_LINUX_DEVICE_) && !defined(_IRR_USE_CONSOLE_DEVICE_) && !defined(_IRR_USE_SDL_DEVICE_)
#define _IRR_COMPILE_WITH_OSX_DEVICE_
#endif
#endif
thx in advance
EDIT:
commented irrCompileConfig.h line 5:
//#ifndef __IRR_COMPILE_CONFIG_H_INCLUDED__
and I looks like it's doing it... ?
unfortunately now I get:
error: GLES/gl.h: No such file or directory
error: GLES/egl.h: No such file or directory
EDIT2:
I added:
Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/OpenGLES.framework/
with no result... hmm
EDIT3:
just checking out:
svn checkout
http://iphone-dev.googlecode.com/svn/trunk/ iphone-dev
which includes egl.h, see if that helps...
EDIT4:
Slowly getting somewhere, I ignored that unofficial googlecode iphone sdk, which however looks interesting and changed:
#define _IRR_USE_IPHONE_DEVICE_
to
#define _IRR_COMPILE_WITH_IPHONE_DEVICE_
now I get:
error: cannot allocate an object of abstract type 'irr::CIrrDeviceIPhone'
which sounds familiar... well already checked, it says
void CIrrDeviceIPhone::setResizeable(bool resize)
here, also it says:
extern "C" IRRLICHT_API IrrlichtDevice* IRRCALLCONV createDeviceEx
hmm...
EDIT5:
I reduced it to this one error by also removing OSXClipboard.mm aswell as libjpeg and png (whole folder) and wondering about the notes next to the last remaining error:
Code: Select all
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/source/Irrlicht/CIrrDeviceIPhone.cpp:275: error: cannot allocate an object of abstract type 'irr::CIrrDeviceIPhone'
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/source/Irrlicht/CIrrDeviceIPhone.h:60: note: because the following virtual functions are pure within 'irr::CIrrDeviceIPhone':
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/include/IrrlichtDevice.h:211: note: virtual void irr::IrrlichtDevice::setResizable(bool)
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/include/IrrlichtDevice.h:217: note: virtual void irr::IrrlichtDevice::maximizeWindow()
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/include/IrrlichtDevice.h:220: note: virtual void irr::IrrlichtDevice::restoreWindow()
/Users/tobi/Documents/irrlicht-olg-es/../../sdks/irrlicht-ogl-es/include/IrrlichtDevice.h:243: note: virtual irr::E_DEVICE_TYPE irr::IrrlichtDevice::getType() const
again any help appreciated ! I call it a day for now...