开发者

how to change black background to transparent view in opengl-es(iphone)?

opengles -eaglview have a particle animation with开发者_如何学C background black color.but i don't want black color.i like only transparent view because my view controller already have an image(BG). i want to apply particle effects on the uiimageview. how to change black background to transparent view in opengl-es(iphone)?please help me...

how to change black background to transparent view in opengl-es(iphone)?

it is actual output.. it is created in opengles view; but i don't wants background black color...


In your rendering loop for the opengl view are you clearing the alpha to 0.0?

glClearColor(0,0,0,0);

Also, have you set the opaque and drawableProperties of the view correctly? For transparent backgrounds I use:

yourlayer.opaque=NO;

yourlayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, kEAGLColorFormatRGBA8, kEaglDrawablePropertyColorFormat, nil];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜