cocos2dx-CCOrbitCamera類的問題解決
CCOrbitCamera是用來翻轉軌跡的類,但是在使用中,如果後麵有一個背景會遇到一個小問題,例如:中間圖片少了半張。
其實是內置的一個函數問題,文檔描述如下。
/** enables/disables OpenGL depth test */ void setDepthTest(bool bOn);
加上一句話即可解決問題。
CCDirector::sharedDirector()->setDepthTest(false);
運行結果如下:
國內論壇確實問不出什麼東西來。爭取好東西大家分享。
最後更新:2017-04-02 17:51:22