Hacker News new | past | comments | ask | show | jobs | submit login

When working in UIKit developers are warned now to use images that are larger than 1024x1024 because that is the limit on the size if a texture in openGLES. I wouldn't be surprised to see this being doubled for the retina and Apple using that as the hard limit.

( You should avoid creating UIImage objects that are greater than 1024 x 1024 in size. Besides the large amount of memory such an image would consume, you may run into problems when using the image as a texture in OpenGL ES or when drawing the image to a view or layer - http://developer.apple.com/library/ios/#documentation/uikit/...)




I believe that limit was lifted as of the iPhone 3GS (i.e., for OpenGL ES 2.0 devices and greater).


There's also no reason you can't split the image up (e.g. 2048x2048 -> 4x1024x1024) and render it in 4 pieces. Where a hard limitation like that exists, implementations frequently sidestep them.


If you do this though, make sure you split at JPEG block boundaries. That means that every column should have a width divisible by 8 except the rightmost, and every row should have a height divisible by 8 except the bottom. Otherwise you may see a noticeable seam.


You can split the JPEGs at bit mapped images on the device before rendering. At that pointed you wouldn't be limited tithe block boundaries anymore.

edit for clarity: don't manipulate images in the JPEG domain.


Better make that 16 unless your image is greyscale.


I think it's actually just been doubled to 2048x2048. OpenGL ES 2.0 seems to define a 64x64 as the minimum requirement for texture size to meet the spec, which is really not much at all.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: