iPhone Version of the SDK?

I’m an iPhone/Touch developer, and I have been working with the PowerVR SDKs a little bit ever since I gave up on my near-complete .x file loader/renderer/animator (skinning’s all that’s left)… I tried to get some parts of the API to work on my Mac in an iPhone project, but it turns out that there is a lot of porting, and to my understanding, I would have to know the API pretty well to get this code to work out correctly. The truth is that I’ve only been working on it for about a day, and I would like a quick fix to get 3D objects up, rendering, and animating efficiently fairly quickly since I spent enough time trying to do everything myself. Does anyone know if there is an iPhone/MBX-Lite-specific SDK out there that I may have overlooked?

Apple are directly supporting the iPhone and there are no plans to release a POWERVR SDK for the platform at this time.





You may wish to look at http://oolongengine.com/ which is a project that is based on a fairly recent (2.2 IIRC) version of our SDK and even has converted versions of some of the POWERVR SDK examples. I watch their email list and the people using this engine are quite helpful. They might also be interested in a .x file loader/renderer/animator module and help you complete it.











That said, it is fairly easy to get many of the POWERVR SDK OpenGL ES1.1 demos and training courses running on iPhone with a little bit of porting as long as you’re familiar with Obj-C and C++ (aka Obj-C++).





The LinuxPCEmulation version is probably the closest to iPhoneOS readiness in the code, however, if you have a Windows setup and can open .sln files then the organisation of the Visual Studio projects in the WindowsPCEmulation SDK gives more indication of what you’re probably aiming to have in XCode.





I would recommend starting with one of the Apple OpenGL ES projects (or template) and one of our simpler PVRShell-based training courses; IntroducingPVRShell for instance. This uses our PVRShell abstraction layer to aid in cross-platform compatibility. Take the PVRShell.h and PVRShell.cpp and the training course .cpp files intact and add them to the XCode project. Then take the PVRShellOS and PVRShellAPI files - these will be the ones you’ll need to edit to get the demo working. You need to tie these into the AppController and EAGLView files from the Apple example to produce a version of PVRShell for the demo to work from.





Do initialisation in applicationDidFinishLaunching from the Obj-C code creating an instance of PVRShellInit and setting this up, then call InitApplication() and InitView() in the demo. Leave RenderScene() for the function hit by your render NSTimer.





Converting the PVRTools is pretty easy once you fix the gl.h include paths to





Code:

#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>



And remove most of PVRTglext.h as the extensions are treated as if they are core on iPhone. Bear in mind that building libraries for iPhone at this time seems non-trivial so you'd probably be better off just building the Tools directly into your own project.



Finally, remember that for Obj-C files to work with C++ code the extension on them needs to be changed to .mm from .m and that C++ constructors and destructors won't be called from Obj-C code.



Please be in contact if you need further guidance with this - I hope this helps.



Hi Travis,





Did you ever get this working well?

bump :slight_smile:

Just wanted to check if anyone has successfully implemented an iPhone version of the SDK?

I’ve been looking into Oolong over the past couple days, unfortunately it appears they do use an older version of the SDK, and have stripped/renamed a number of the SDK classes, and do not appear to completely conform to the ‘Shell’ environment.

- Does Imagination Technologies eventually plan to release an SDK version for the iPhone? If so when? (curious if this has changed since last post)

  • If not, is there a community or any individuals working on or planning to do this?
    - Is there any documentation that would help guide a developer to do this? Can you offer any tips/hints/suggestions?

    Thanks!

At the moment the situation hasn’t changed with regard to a version of the POWERVR SDK for iPhone i.e. the situation is still what I say above. It’s possible that this policy may change in the future, but I can’t say anything for certain now.





We do maintain an interest in the platform here and in my free time I have a pretty much fully-functional version of the SDK that I use for my own projects so I can say for certain that using the code on the iPhone is possible (so it’s been done twice:) ).





I think the only community working on this kind of effort is actually the Oolong group. There has been some talk of investing some work from here in that project more directly, but nothing’s really happened so far. As you’ve noticed, there are some changes from our SDK in Oolong and this makes working on it a little awkward for us.





As I say above, if you have specific questions please ask them here or by email: devtech@imgtec.com and I’ll try to answer.


Gordon,
We are looking into a development environment for phones like the new Nokia.
Can you comment on the difference between the PowerVR SDK and Oolong?
Looking at Oolong and the posts here, it seems that you have incorporated several useful abstractions from that engine into your SDK.
Can you comment on what Oolong provides that we cannot get by using the PowerVR SDKs?
(obviously OpenAL sound server is one thing)
Also, do you have any examples that use the PVREngine code?
Thanks in advance,
Alex

Augmented Environments Laboratory
Georgia Institute of Technology

spacecatx2009-09-09 03:26:12

As I believe I mentioned above, the POWERVR SDK does not include components of the Oolong engine, but, in fact, the Oolong engine was originally based on a release of the POWERVR SDK.





Since then dvelopment has proceeded on both. The POWERVR SDK is provided to help developers work with graphics on Imagination’s POWERVR platforms and as such it doesn’t include the many graphics-unrelated components that are present in Oolong which is designed to be a full application development environment. Also, the SDK has to support many more platforms than just the iPhone so it lacks some of the iPhone specific aspects of Oolong. Oolong is only designed to target iPhone.





If you are targetting Nokia platforms then some of the POWERVR SDKs available from the downloads section of this website are already suitable for use with Nokia phones, whereas Oolong will require converting back to work with these or other platforms and some of the platform abstraction provided by PVRShell may have been compromised.





Off the top of my head I believe Oolong has a physics library, sound support and VFP mathematics support which is not present in the SDK.





The SDK has been updated a few times since Oolong branched from it, however, so, while Wolfgang tries to keep Oolong in step with it, there may be other differences - Oolong typically lags a little behind the SDK in shared features. There are features of Oolong that are unlikely to be added to the SDK as they do not relate to graphics.





I would suggest you look at the Oolong engine website and mailing list for more information on it.





The example provided for the PVREngine is the PODPlayer application available in the same folder. There may be other examples produced in the future which may use the engine in different ways.Gordon2009-09-11 16:36:02