What is the maximum texture size available on the iPad?

18,056

Solution 1

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

Solution 2

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.

Solution 3

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.

Share:
18,056

Related videos on Youtube

Rob Segal
Author by

Rob Segal

Co-Founder of Get Set Games creators of Mega Jump, Mega Run and Monsters Inc. Run on iOS. Director, Get Set Games Twitter | Facebook | Send Us Feedback I am a co-founder/organizer of the Toronto Indie Game Jam. An annual game development event held in Toronto in which participants are asked to create a fully playable game over the course of a weekend. Co-Founder/Organizer, Toronto Indie Game Jam

Updated on June 04, 2022

Comments

  • Rob Segal
    Rob Segal about 2 years

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

    • bobobobo
      bobobobo over 11 years
      You really need to say what edition of the iPad (iPad, iPad 2, iPad 3rd gen or iPad 4th gen (to date)?)
  • Coincoin
    Coincoin about 14 years
    Yeah, the answer was based on preliminary and incorrect specs. Nice catch. +1
  • P i
    P i almost 13 years
  • KomodoDave
    KomodoDave over 12 years
    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 :-)
  • badweasel
    badweasel over 12 years
    For the iPad3 ("the new iPad") it returns 4096.
  • bobobobo
    bobobobo over 11 years
    -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.
  • bobobobo
    bobobobo over 11 years
    The iPad 2 had 512MB, and iPad 3 has 1G of shared RAM. You will not run out of memory after 3 2048x2048 textures.
  • louissmr
    louissmr over 9 years
    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.
  • brainjam
    brainjam over 9 years
    @louissmr, I'm not very much of GL user these days, but you probably need to set up a GL context before this works.
  • louissmr
    louissmr over 9 years
    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.
  • Tommy
    Tommy almost 9 years
    @bobobobo I make 2048*2048*4/(1024*1024) = 2*2*4 = 16 mb per texture. So room for quite a few more than three.