![]() ![]() Second time still a black screen but the log window is filled with OpenGL 0x0501 error messagesĪny ideas? Someone here has managed to implement a Cocos2d-x based wallpaper?īy the way, I’m using Cocos2d-x 2.1.4 release. If void void showDialog(String pTitle, String void showEditTextDialog(String pTitle, String pMessage, int pInputMode, int pInputFlag, int pReturnType, int void runOnGLThread(Runnable pRunnable)Īs you can see no Cocos2d圎ditText class is present and showDialog and showEditTextDialog implementations are left empty.įirst time I run the project and pick the wallpaper nothing happens, just a black screen and the usual Cocos logging. tCocos2dxRenderer(new Cocos2dxRenderer()) Ĭocos2dxHelper.init(MyWallpaperService.this, void onVisibilit圜hanged(boolean visible) MGLSurfaceView = new MyGLSurfaceView(MyWallpaperService.this) Private MyGLSurfaceView void onCreate(SurfaceHolder surfaceHolder) MyGLSurfaceView(Context SurfaceHolder getHolder() ![]() Protected class MyGLSurfaceView extends Cocos2dxGLSurfaceView Protected class MyWallpaperEngine extends Engine implements Cocos2dxHelperListener So far the code looks like this: public class MyWallpaperService extends Engine onCreateEngine() In essence I’m moving initialization code from Cocos2dxActivity to my custom WallpaperService.Engine subclass. I’ve took the idea from ‘approach one’ of this blog post: Īlso I’m trying to reuse Cocos2dxHelper and Cocos2dxRenderer classes. ![]() However it should be possible to reuse the Cocos2dxGLSurfaceView class inside the WallpaperService.Engine class. The lifecycle changes a lot because instead of an Activity I must use a WallpaperService.Engine class. Now I’m trying to change the code to use it inside a live wallpaper. So far I’ve managed to create and run the default android project. That said, I’m a total newbie with Cocos2d-x. In the past I’ve developed two iOS games using Cocos2D, but now I want to switch to Cocos2d-x to use the same engine for my iOS games, Android games AND Android Live Wallpapers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |