6

Im trying to create a cube map of six jpg files from the web in GLKit. It works great on my iPhone 6+ but when i run the same code on "The new iPad" the cube map is just black when applied to an object. If i try the same thing with png files it works. Is there anything specific that needs to be done to load jpg's correctly on certain hardware?

The error from cubeMapWithContentsOfFiles is nil so it appears like GLKit thinks it loaded the texture properly.

Here is a demo project http://s.swic.name/Yw8F

Maciej Swic
  • 11,139
  • 8
  • 52
  • 68

1 Answers1

0

If the dimensions of textures you're generating are themselves determined by the device's display dimensions (e.g. rendering a full-screen UIView to a texture) then the resulting cube-map could easily fall within the MAX_TEXTURE_SIZE on some devices but exceed it on larger devices. What are the pixel dimensions of your cube map on iPhone 6 Plus vs iPad 4th generation? If they exceed 4096 in either dimension you could be in trouble.

Jaysen Marais
  • 3,956
  • 28
  • 44