简体   繁体   English

Android上的cocos2d-x屏幕闪烁

[英]cocos2d-x screen flicker on Android

I got screen flicker when developing with cocos2d-x 3.0alpha1. 使用cocos2d-x 3.0alpha1开发时出现屏幕闪烁。

I designed the resources on 480x800 resolution. 我以480x800分辨率设计资源。

Then I try on both my android phone ( HTC One V ) and tablet. 然后,我尝试同时在Android手机(HTC One V)和平板电脑上使用。 It works fine on my phone which is 480x800 without scaling. 无需缩放即可在480x800的手机上正常工作。 But it flickers on my Android tablet which has 600x1024 reesolution ( HTC Flyer ). 但是它在具有600x1024分辨率(HTC Flyer)的Android平板电脑上闪烁。

This is the video of how the flicker going on http://youtu.be/f_-TilhW3ns 这是有关如何进行闪烁的视频http://youtu.be/f_-TilhW3ns

I've tried 我试过了

Director::getInstance()->setDepthTest(false); 导演::的getInstance() - > setDepthTest(假); Director::getInstance()->setProjection(Director::Projection::_2D); 导演::的getInstance() - > setProjection(导演::投影:: _ 2D);

with no success. 没有成功。

Has anybody encounter this before and maybe fixed it? 有人遇到过这个问题,也许已经解决了吗?

Thanks 谢谢

You can try adding the following code in your AppDelegate.cpp in your AppDelegate::applicationDidFinishLaunching() methode : 您可以尝试在AppDelegate :: applicationDidFinishLaunching()方法的AppDelegate.cpp中添加以下代码:

 glview->setDesignResolutionSize(720,1280,ResolutionPolicy::SHOW_ALL);

Worked for me. 为我工作。 I hope it helps. 希望对您有所帮助。

我有一个同样的问题,我的问题是我使用的Sprite纸太大,并且还使用了粒子的CCParticleBatchNodes。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM