In apple's docs:(http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/OpenGLESPlatforms/OpenGLESPlatforms.html)
it says that for "OpenGL ES 1.1 on the PowerVR SGX" "There are 8 texture units available."
it doesn't say how many units are available on OpenGL ES 2.0, does that mean there is no limit?
Rather than asking and getting an answer that may or may not be correct in the future, your app should be checking programmatically at runtime using something like this:
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &MaxTextureUnits);
Note that there are also separate numbers for the number of allowed texture units in a vertex shader and a fragment shader. They would use the constants GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
and GL_MAX_TEXTURE_IMAGE_UNITS
. The COMBINED
number is the number available to both at the same time.
There is a detailed listing of all the hardware across iPhones and iPads on Apple's iOS Device Compatibility Reference
Based on this, you are safe with using upto 8 Texture units on any iOS device.
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