0

当我在 cocos2d 场景初始化中向 openGLView 添加子视图时,会显示闪烁

-(id) init
{
if( (self=[super init])) {

    _overlay = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1024, 768)];
    self.overlay.alpha = 0.6f;
    [[[CCDirector sharedDirector] openGLView] addSubview:_overlay];
    ....
}

有谁知道如何避免它?

4

1 回答 1

1

修复了此更改:

EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
                               pixelFormat:kEAGLColorFormatRGB565
                               depthFormat:0
                        preserveBackbuffer:NO
                                sharegroup:nil
                             multiSampling:NO
                           numberOfSamples:0];

我曾经有:

multiSampling:YES
numberOfSamples:4];
于 2012-09-12T10:50:22.403 回答