views:

722

answers:

2

Hello,

I am currently trying to learn about OpenGL ES for the iPhone and following Simon Maurice's excellent tutorial located here.

The problem I am running into is that in an attempt to personalize the tutorial, I have switched the PNG file from the one included with the tutorial to a custom one. Whenever I do, not only does the background of the square containing the texture turn black but so does the triangle that is right next to the texture.

The issue isn't the code as even if I run it with his tutorial files, it still runs into this issue. I have examined most aspects of the two PNG files to find any differences (color profile, transparency, interlaced or not, bits, etc...) and can't find a difference. I have also used PNGThing to optimize it with no avail.

Any help would be greatly appreciated...

Thanks in advance!

+2  A: 

Try making the png a power of 2 in size (128x128, 256x256, 512x512, 1024x1024) etc. This is often important for textures, especially with simple examples.

rikh
I check that aspect as well... I matched the dimensions of the previous texture as well.
Jacob
A: 

The only other thing I can suggest is to single step through the code in the debugger and look out for anything that fails during the loading process.

rikh