views:

377

answers:

0

My problem is incorrect alpha blending using OpenGL ES 1.1 on iPhone. Unlike many other peoples' issues with this, textures are not involved.

I am drawing dozens of small white circles on a light blue background. Each circle is a drawn as a GL_POINT. I am animating a fade from alpha=1.0 to alpha=0.0. Everything works perfectly in the iPhone simulator. Here is the snapshot of one of the last frames of the animation when the alpha is nearing 0: geneson.net/openglwtf/simulator_correct.png

The problem arises when I actually install it on an original 2G iPhone. When alpha approaches zero, instead of rendering as a faint white circle, each point is rendered as a dark gray circle. Here is a snapshot of the faulty iPhone rendering: geneson.net/openglwtf/iPhone_wrong.png

Some relevant calls I use are:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) ;
glEnable(GL_POINT_SMOOTH);

This is all 2-dimensional with an orthographic view.

I found this similar question and have confirmed that CAEAGLLayer.opaque is set to TRUE.

(sorry for the non-hyper-linked images. new user limitation...)