I read a cocos2d tutorial (which I think is old) and a forum post saying how to do this. The tutorial ( http://www.cocos2d-iphone.org/wiki/doku.php/tips:director_transparentview ) mentions initGLDefaultValues, but all I could find was setGLDefaultsValues. Which gave me this:
-(void) setGLDefaultValues
{
// This method SHOULD be called only after openGLView_ was initialized
NSAssert( openGLView_, @"openGLView_ must be initialized");
[self setAlphaBlending: YES];
[self setDepthTest: YES];
[self setProjection: projection_];
// set other opengl default values
openGLView_.opaque = NO;
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
#if CC_DIRECTOR_FAST_FPS
if (!FPSLabel_) {
CCTexture2DPixelFormat currentFormat = [CCTexture2D defaultAlphaPixelFormat];
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA4444];
FPSLabel_ = [[CCLabelAtlas labelWithString:@"00.0" charMapFile:@"fps_images.png" itemWidth:16 itemHeight:24 startCharMap:'.'] retain];
FPSLabel_.position = ccp(200, 200);
[CCTexture2D setDefaultAlphaPixelFormat:currentFormat];
}
#endif // CC_DIRECTOR_FAST_FPS
}
Also under [director setOpenGLView:glView]; I put:
[CCDirector sharedDirector].openGLView.backgroundColor = [UIColor clearColor];
glView.opaque = NO;
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
Anyone have an idea where this could be coming from?
FAKE EDIT: also I've tested this out by putting a view behind it. I can see the view if I set the alpha lower on glView.