使用的是cocos2dx 3.6 cocos版本2.2.5和2.2.6都试过了 都不行。
我加入了cocosstudio做的ui 然后输出一直在刷这个 OpenGL error 0x0502 in …\renderer\CCTextureAtlas.cpp cocos2d::TextureAtlas::drawNumberOfQuads 691。
删掉ui的那行代码就没有错误了
使用的是cocos2dx 3.6 cocos版本2.2.5和2.2.6都试过了 都不行。
我加入了cocosstudio做的ui 然后输出一直在刷这个 OpenGL error 0x0502 in …\renderer\CCTextureAtlas.cpp cocos2d::TextureAtlas::drawNumberOfQuads 691。
删掉ui的那行代码就没有错误了
Layer::init();
Sprite* pBac = Sprite::create("Background.png");
pBac->setPosition(640.f, 360.f);
this->addChild(pBac);
//把下面这些删去就没有了
Node* pUI = CSLoader::getInstance()->createNode("UILayer.csb");
this->addChild(pUI);
Button* pShift = dynamic_cast<Button*>(pUI->getChildByName("Button_Shift"));
pShift->addClickEventListener(CC_CALLBACK_1(CUILayer::Bcallback,this));
Button* pBomb = dynamic_cast<Button*>(pUI->getChildByName("Button_Bomb"));
pShift->addClickEventListener(=](Ref* pTarget){
log("2444444"); });
return true;
但是我做的另一个ui就没问题。。。。。。
好像有时候 有几率执行这个代码的时候会触发断言 parent == null 但是我点忽略之后就再也没出现过了