Using of iPhone native functionalities in Ogre3D iOS
-
- Gnoblar
- Posts: 18
- Joined: Wed Nov 21, 2007 7:21 am
Using of iPhone native functionalities in Ogre3D iOS
I am currently using Ogre3D for an iphone application. The thing is that there are some functionalities I need, such as reading files during runtime, accessing iphone image picker, camera etc that would need calling of functions from objective-c. I could not find much information regarding this online. Just wondering if anyone has had some experience in implementing such functionalities.
-
- OGRE Retired Team Member
- Posts: 972
- Joined: Mon Jun 02, 2008 6:52 pm
- Location: Berlin
- x 65
Re: Using of iPhone native functionalities in Ogre3D iOS
You're probably in the wrong forum for this 
Accessing native libraries like camera, etc. is not related to Ogre in any way.
I'll move the topic to Mobile Devices, though. Probably someone there can answer your question anyway

Accessing native libraries like camera, etc. is not related to Ogre in any way.
I'll move the topic to Mobile Devices, though. Probably someone there can answer your question anyway

-
- Halfling
- Posts: 70
- Joined: Sun Dec 02, 2007 11:10 am
- Location: Italy
- x 2
Re: Using of iPhone native functionalities in Ogre3D iOS
Yes, Ogre doesn't handle these things for you. You should use objective-c from your code for that, and it's very easy to do as XCode allows you to mix C++ and Obj-C without problems. You just have to rename your source file extension from .cpp to .mm, telling the compiler that you are using some Obj-C in that file.
You can also mix C++ and Obj-C in header files but be careful not to accidentally #include Obj-C code in a cpp file or you'll get errors.
You can also mix C++ and Obj-C in header files but be careful not to accidentally #include Obj-C code in a cpp file or you'll get errors.