What is the maximum texture size available on the iPad?
Asked Answered
D

3

10

Anyone know the maximum texture size for the iPad? I'm having trouble finding numbers for this.

Despinadespise answered 24/3, 2010 at 3:39 Comment(4)
You really need to say what edition of the iPad (iPad, iPad 2, iPad 3rd gen or iPad 4th gen (to date)?)Sixth
See here tomshardware.com/reviews/ipad-3-benchmark-review,3156-6.htmlSixth
@Rob, the accepted answer is way obsolete. A modest suggestion - mark my answer as the accepted answer and save folks who get to this page some time.Decibel
I clearly do not use SO as much as I use to. In any case your answer is now the accepted one @DecibelDespinadespise
D
40

As a supplement to the accepted answer:

2048 was the maximum for iPad2 as well, up until iOS5.1, when it became 4096.

4096 is the maximum for iPad3, as pointed out by @badweasel in the comments.

Best to determine the limit programmatically, using

int max;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max);

This is useful if you want your code to adapt to maximum sizes on devices or versions you haven't tried, or haven't yet been released.

Decibel answered 7/9, 2011 at 20:40 Comment(5)
I just hit this limit with my texture atlas. Noticed that on the one display object before textures stopped rendering properly my atlas height was 2046, and proximity to a power of 2 made me google, then this showed up. +1 for the GL integer query, it's exactly what I wanted :-)Mcmullan
For the iPad3 ("the new iPad") it returns 4096.Slipcover
The code is not working for me. glGetIntegerv doesn't modify the value of max, glError is returning 0. Am I missing something? I am calling this in the app delegate at starting.Austine
@louissmr, I'm not very much of GL user these days, but you probably need to set up a GL context before this works.Decibel
Thank you @brainjam, It makes sense. I am not using OpenGL in my app at all, but I still needing the max texture size for determine the max resolution image size to be loaded without using tiles. Should creating a context has any side effect? I guess that I can create the context, invoke glGetIntegerv and then destroy the context.Austine
P
16

The iPad 2 supports OpenGL ES 2.0 and 2048 x 2048 textures.

http://developer.apple.com/iphone/library/documentation/General/Conceptual/iPadProgrammingGuide/AboutThePlatform/AboutThePlatform.html

Practice answered 8/5, 2010 at 22:26 Comment(5)
Yeah, the answer was based on preliminary and incorrect specs. Nice catch. +1Gentleman
Complete specs here: developer.apple.com/library/ios/#documentation/3DDrawing/…Briefs
-1: You didn't say what iPad. iPad changes so much internally, they may as well be completely different devices with completely distinct names, like "iPad" for one, and "myPad" for the next one.Sixth
The iPad 2 had 512MB, and iPad 3 has 1G of shared RAM. You will not run out of memory after 3 2048x2048 textures.Sixth
@Sixth I make 2048*2048*4/(1024*1024) = 2*2*4 = 16 mb per texture. So room for quite a few more than three.Murmuration
T
4

Here is a more recent resource from Apple.

https://developer.apple.com/metal/limits/

It has a lot of information about graphical limitations. If you want to know the maximum texture size for iOS, find the entry for "Maximum 2D texture width and height".

It depends on what operating systems you are targeting. For example, if you want to support iOS 8 and higher you are restricted to the iOS 8 limit for 2D textures of 4096 x 4096 pixels even though later versions of iOS can support larger textures.

Torrential answered 5/5, 2017 at 9:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.