I'm trying to draw a translucent rectangle onto a ccRenderTexture. In my render texture's update method, I have the following code:
[self begin];
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor4f(255, 255, 255, alpha);
glLineWidth(1);
CGPoint verts[] = {
ccp(1, 15),
ccp(15, 15),
ccp(15, 1),
ccp(0, 0)
};
ccDrawPoly(verts, 4, YES);
[self end];
When I run this, the rectangle always appears as solid white. Is there something I need to change to have the alpha value take effect?