请教达人
我在vs2013中运行3.6版本的cocos2dx 其中的scrollview若裁剪则无法正常显示,无论是读取csb中的还是自己创建的。
_csbNode = CSLoader::createNode(“Test/MainScene.csb”);//MainScene为cocosstudio提供的关卡选择示例,包含scrollview
_csbNode->setAnchorPoint(Vec2(0.5, 0.5));
_csbNode->setPosition(VISIBLE_WIDTH / 2, VISIBLE_HEIGHT / 2);
this->addChild(_csb);
在网上查找了解决方案 都是更改AppDelegate,已尝试但仍然无效。
void AppDelegate::initGLContextAttrs()
{
//set OpenGL context attributions,now can only set six attributions:
//red,green,blue,alpha,depth,stencil
GLContextAttrs glContextAttrs = { 8, 8, 8, 8, 24, 8 }; //5, 6, 5, 0, 16, 8
GLView::setGLContextAttrs(glContextAttrs);
}
但将代码放入提供的例子cpp_test里时,可以正常显示。不知道怎么解决了,求助各位达人,拜谢。