3.13.1创建的scene是黑色 只有scene的时候不应该是透明的吗

我想创建一个CCEAGLEView 作为ios下一个UIView的子节点 ,单独的加了一个场景是黑色的,我想让它是透明的 这样ios上的父节点的图才能被看见,代码如下,应该怎么改

CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [UIScreen mainScreen].bounds
                                     pixelFormat: (__bridge NSString *)cocos2d::GLViewImpl::_pixelFormat
                                     depthFormat: cocos2d::GLViewImpl::_depthFormat
                              preserveBackbuffer: NO
                                      sharegroup: nil
                                   multiSampling: NO
                                 numberOfSamples: 0 ];

// Enable or disable multiple touches
[eaglView setMultipleTouchEnabled:NO];
eaglView.opaque = NO;
eaglView.backgroundColor = [UIColor clearColor];

UIView* pview = (UIView*)parent;
[pview insertSubview:eaglView atIndex:1];
// Set EAGLView as view of RootViewController

cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)eaglView);

//set the GLView as OpenGLView of the Director
cocos2d::Director::getInstance()->setOpenGLView(glview);
Application::getInstance()->run();

auto s = cocos2d::Director::getInstance()->getWinSize();
cocos2d::Scene* scene = cocos2d::Scene::create();
Director::getInstance()->runWithScene(scene);

每帧开始时都会渲染一下背景色的

void Director::setGLDefaultValues()
{
    // This method SHOULD be called only after openGLView_ was initialized
    CCASSERT(_openGLView, "opengl view should not be null");

    setAlphaBlending(true);
    // XXX: Fix me, should enable/disable depth test according the depth format as cocos2d-iphone did
    // [self setDepthTest: view_.depthFormat];
    setDepthTest(false);
    setProjection(_projection);

    // set other opengl default values
    glClearColor(0.0f, 0.0f, 0.0f, 1.0f);   // 
}

这个函数就是设置了背景颜色,所以你得修改这个函数的实现,或者在自己的代码里修改背景颜色。

找到了 。不过3.13.1是在frameBuffer里面了

晕,我是在Cocos creator 1.6.1 的 lite 版本里 只在Grabber里找到了一段但是已经设置成
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
还是黑色的 不透明

有没有人提点一下