Imagination PowerVR SDK Blog

Including PVRShell.h in iOS ViewController


#1

I am trying to #include the PVRShell as i have done several times previously in other projects in a custom ViewController that is set as a .mm file.



Though when i come to compile it fails including and compiling the PVRShell.h on the line



typedef void* (PFNLoadFileFunc)(const char, char** pData, size_t &size);



Though when i include it in the root AppDelegate it compiles fine and i cant see why there is any difference.



I realize this is more of a C++ and include question but i am quite stumped.


#2

I was causing a transative dependency in my ViewController else where in my project. Mark as answered.


#3

Hi Dev2rights,



As the original poster, you should be able to mark it as answered. Is this option appearing at the bottom of your latest post?



Thanks,

Joe


#4

Hi Joe, i don’t see the “Did this answer the question ?” tag on my own post or own answer.


#5

No problem :slight_smile:


#6

Hello Dev2Rights


may you describe the step you have done or some source code to do this integration, it will be wonderfull and very helpfull (Christmass Present :slight_smile: )

thanks

regards
david g

#7

Hi Dgu,


Apologies if this seems a little bit patronising but have you got the UIViewcontroller model locked to memory ? This is the core iOS fundamental windowing process and is found here:

http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007457

Once you have nailed Views and ViewControllers then you will see that the most common method is setting up an EAGL view for rendering OpenGLES onto a CAEGL layer for that view. This can be used to set up your OpenGLES context and any other setup you do. A simple starting point to get a grip of how iOS handles OGLES is to look at the iOS tutorials apple provide:

https://developer.apple.com/devcenter/ios/resources/opengl-es/

#8

sperbe thanks !!!