Hi
how i can do step 4 in this post for cocos2d-x 3?
http://discuss.cocos2d-x.org/t/how-to-make-game-background-main-activity-transparent-in-cocos2d-xrc0/12548
What part of step 4 are you struggling with?
i do step 1,2,3 but for step 4 the nativeactivity.cpp in version 3 not have this part of code
const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_BLUE_SIZE, 5,
EGL_GREEN_SIZE, 6,
EGL_RED_SIZE, 5,
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 8,
EGL_NONE
};
and with out change this codes my activity dont transparented
ok i solve it
Step 4:
add this code to initView() in Cocos2dxGLSurfaceView.java in cocos/platform/android/…
setFocusableInTouchMode(true);
setEGLConfigChooser(8, 8, 8, 8, 16, 0);
this.getHolder().setFormat (PixelFormat.TRANSLUCENT);