using powervr tools on the iPhone

I recently started tooling around in the iPhone SDK and i realized that they use a powervr MBX lite chip. I’m writing an opengl ES application and i would love to take advantage of the powervr texture compression, as this seems like the only texture compression available.





I would love to get the textureloader from the tools compiling on an iphone, has anyone had any luck so far?





is there some code somewhere i could use thats specifically for loading .pvr compressed images and doesnt have all the other sdk stuff attached?

You might find http://oolongengine.com/ useful. It has a number of the powervr sdk samples ported to XCODE.

zzajin wrote:
You might find http://oolongengine.com/ useful. It has a number of the powervr sdk samples ported to XCODE.



Has anyone had any luck implementing the oolong engine?



I have downloaded latest source along with bullet 2.71, and I'm pulling my hair out trying to examine the bullet demo xcode projects. I have downloaded the PVRGeoPOD v1.05, and exported a 3d scene from Maya.



Can anyone suggest how/where I would go about including my .pod into the oolong project?



No documentation, only vague references on including/loading the .pod format directly exported from Maya using the PowerVR exporter.



Anyone?

I have been building and running samples from the Oolong engine since the Apple SDK appeared and it went official. As the poster says above, they’ve ported most of our public demos to their framework.





I would suggest you sign up to their mailing list for direct support (I watch this most of the time too).


The example at Oolong Engine2/Examples/Renderer/Ported PowerVR Examples/01 POD Geometry is a port of our own IntroducingPOD demo and shows how to display a POD file. Both these programs are very basic and rather unforgiving of changes to the POD file used in the demo. The Oolong version also includes the POD as a header file which is a practice we discourage now.





Under Oolong: If you’re using external .pod files then you simply need to add them to your XCode project (say in a group called Resources). You then need to resolve a path to this using the NSBundle API or similar and load the data using CPODScene::ReadFromFile() passing this path. You’ll then have to alter/extend the source code provided to display your particular POD.





They’re talking at the moment about the benefits of providing an easier, higher level interface for this stuff.





I’m happy to answer questions about the POD format here (bear in mind that we do not officially support the iPhone or the Oolong engine on this forum, though).





Hope this helps,





G

Gordon,





Thanks for the reply and for your insights.





I see what you mean about the POD 01 example being unforgiving. I’m trying to take one step at a time. Is the newest exporter writing the same .h files as implemented in the POD 01 sample - which I assume is quite old?





When attempting to include a Maya exported mesh (a simple sphere polygon) in this example with the following:





Code:

//application.mm

/*
     We exported the scene from 3DSMax into two .h files.
     One for the Common (floating point) profile, the other one for CommonLite (fixed point) profile.
*/
#ifdef OGLESLITE
#include "Media/ball_fixed.h"
#else
#include "Media/ball_float.h"



I get the following errors: I would assume that the existing ModelPOD.h should define the pod structures?



Code:

1) #error Before including this file, you must include a header to define the POD structures.
2) 'EPVRTDataType' was not declared in this scope
3) expected '}' before numeric constant
4) expected '}' before numeric constant
5) expected ',' or ';' before numeric constant
6) expected declaration before '}' token



Sorry if this is such a basic question that should be self explanatory, I'm just a bit lost in finding the simplest starting point for learning the powerVR technology along with the oolong engine. I understand you don't officially support functionality with oolong and xcode, but any tips would be greatly appreciated! Thanks again,





Edit: I think it may be a settings issue, or an exporter versioning issue?



Getting Started, I find that I have to make the following changes .h file that is exported:



1) #if !defined(_PVRTMODELPOD_H_) && !defined(_D3DMTOOLS_H_) && !defined(_DX9TOOLS_H_) && !defined(_OGLTOOLS_H_) && !defined(_OGLESTOOLS_H_) to:



#if !defined(_MODELPOD_H_) && !defined(_D3DMTOOLS_H_) && !defined(_DX9TOOLS_H_) && !defined(_OGLTOOLS_H_) && !defined(_OGLESTOOLS_H_)







2) Change all EPVRTDataType to EDataType:



const CPODData c_BALL_HMesh0psUVW[1] =

{

          { (EPVRTDataType)0x00000001, 3, 60, (unsigned char*)0x00000030 },

};



const CPODData c_BALL_HMesh0psUVW[1] =

{

          { (EDataType)0x00000001, 3, 60, (unsigned char*)0x00000030 },

};







3) Then, when I render, I get a sphere that is not rendered correctly. It comes out oblong egg shaped.



Any ideas?

jackjohnson2008-10-04 03:37:03

The issues with needing to change the type names are down to the changes made in Oolong to separate it from our SDK. If you use the binary version of our POD format you shouldn’t encounter these problems. Note that the Oolong engine (as of writing this) is using a version of the POD runtime from an older SDK than the current version on our website so there may be problems because of this. I believe this is being fixed soon.





I’m not quite sure what you mean by oblong egg shaped - would it be possible for you to send the pod file or maya file that you are using to devtech@imgtec.com and then I might be able to work out what is going on?

Quote:
<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

They're talking at the moment about the benefits of providing an easier, higher level interface for this stuff.

I'm happy to answer questions about the POD format here (bear in mind that we do not officially support the iPhone or the Oolong engine on this forum, though).



 


I am sucesfully using ImgTech tools SDK on iPhone ( and planning to use on other devices).


I generally use it to handle Pod and Texture reading only and it works out just fine.


 


The only problem is that PVRTModelPOD , as opposed to PVRTTextureLoadFromPointer,does not provide an API to load a model from memory or some sort of callback based stream  ( I am talking here about the memory-based equivalent of ReadFromFile and not ReadFromMemory(const SPODScene &scene)  which only handles h include files )


 


This would be handy for people who use some sort of custom compressed data files ( in my case I am using http://icculus.org/physfs/).


 


Of course I could hack a custom version of CsourceStream to handle this , but since these classes are internal only , that would mean modifying PVRTModelPOD.cpp file itself, something I would rather not do.


 


Thanks


 

Walter warmi2008-12-02 17:20:50