Reputation: 20995
I've seen other posts on the web which say to do:
[__glview layoutSubviews];
But you can't do this in 3.10 - glView is a cocos2d-x pointer.
How do we enable it? I am trying to use UIScrollview, and the moment I do ui::ScrollView::create() , the console shows a message "Stencil buffer is not enabled" and the scroll view doesn't seem to display.
Upvotes: 0
Views: 618
Reputation: 489
You should override a method in your AppDelegate
class.
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};
GLView::setGLContextAttrs(glContextAttrs);
}
Upvotes: 0