在 cocos2d-x 中甚至无法绘制光滑的空心圆圈
Can't even draw smooth empty circle in cocos2d-x
找了很多,还是不能在cocos2dx中简单的画出光滑的圆
drawCircle
没做完,画个圈不好。
有谁知道在cocos2d-x中绘制完美平滑圆的具体解决方案吗?
这是 drawCircle
制造的麻烦:http://discuss.cocos2d-x.org/t/draw-circle-with-strong-border/14827/3
您需要开启抗锯齿功能。在 iOS 上,您可以通过在 AppController.mm 中更改 CCEAGLView 的创建来完成:
CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds]
pixelFormat: (NSString*)cocos2d::GLViewImpl::_pixelFormat
depthFormat: cocos2d::GLViewImpl::_depthFormat
preserveBackbuffer: NO
sharegroup: nil
multiSampling: YES // <- by default is NO
numberOfSamples: 4 ]; // <- if more samples the smoother shapes are, but more time takes the drawing
找了很多,还是不能在cocos2dx中简单的画出光滑的圆
drawCircle
没做完,画个圈不好。
有谁知道在cocos2d-x中绘制完美平滑圆的具体解决方案吗?
这是 drawCircle
制造的麻烦:http://discuss.cocos2d-x.org/t/draw-circle-with-strong-border/14827/3
您需要开启抗锯齿功能。在 iOS 上,您可以通过在 AppController.mm 中更改 CCEAGLView 的创建来完成:
CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds]
pixelFormat: (NSString*)cocos2d::GLViewImpl::_pixelFormat
depthFormat: cocos2d::GLViewImpl::_depthFormat
preserveBackbuffer: NO
sharegroup: nil
multiSampling: YES // <- by default is NO
numberOfSamples: 4 ]; // <- if more samples the smoother shapes are, but more time takes the drawing