I have a rendering intensive game and using png it's too slow to run on 3G phones. But it runs fast using pvrtc so I need to know what model I'm running on.
Question: how can I detect the hardware I'm running on?
Many thanks for your help!
What you're probably actually interested is whether you're on PowerVR MBX hardware (as in the 3G, the original iPhone, the first and second generation iPod Touches and the low-end third generation iPod) or PowerVR SGX hardware (as in the 3GS and iPhone 4, both iPads and the iPod Touches not in the above list).
With that in mind, how about just:
EAGLContext *testContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
BOOL isSGX = testContext ? YES : NO;
[testContext release];
return isSGX;
The SGX is a programmable part that can support ES 2, the MBX isn't. The MBX is also limited to 16mb of VRAM whereas the SGX isn't, which is probably why your app runs poorly with full fat textures but fine with pvrtc.
You could use this class by Erica Sadun.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With