update describe for support translucency on android

This commit is contained in:
Dhilan007 2013-12-30 16:42:33 +08:00
parent 3fd9561df8
commit 4f2d7f47fc
3 changed files with 34 additions and 20 deletions

View File

@ -10,19 +10,23 @@ public class Cocos2dxActivity extends NativeActivity{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//1.Set the format of window for supports translucency
//getWindow().setFormat(PixelFormat.TRANSLUCENT);
//For supports translucency
//2.You need configure egl attribs in cocos\2d\platform\android\nativeactivity.cpp on some android versions(eg.4.4) for supports translucency.
//eg:
//1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp
/*const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_BUFFER_SIZE, 32,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
//EGL_BLUE_SIZE, 5, -->delete
//EGL_GREEN_SIZE, 6, -->delete
//EGL_RED_SIZE, 5, -->delete
EGL_BUFFER_SIZE, 32, //-->new field
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 8,
EGL_NONE
};*/
//2.Set the format of window
// getWindow().setFormat(PixelFormat.TRANSLUCENT);
}
}

View File

@ -10,18 +10,23 @@ public class Cocos2dxActivity extends NativeActivity{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//1.Set the format of window for supports translucency
//getWindow().setFormat(PixelFormat.TRANSLUCENT);
//2.You need configure egl attribs in cocos\2d\platform\android\nativeactivity.cpp on some android versions(eg.4.4) for supports translucency.
//eg:
//For supports translucency
//1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp
/*const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_BUFFER_SIZE, 32,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
//EGL_BLUE_SIZE, 5, -->delete
//EGL_GREEN_SIZE, 6, -->delete
//EGL_RED_SIZE, 5, -->delete
EGL_BUFFER_SIZE, 32, //-->new field
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 8,
EGL_NONE
};*/
//2.Set the format of window
// getWindow().setFormat(PixelFormat.TRANSLUCENT);
}
}

View File

@ -10,18 +10,23 @@ public class Cocos2dxActivity extends NativeActivity{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//1.Set the format of window for supports translucency
//getWindow().setFormat(PixelFormat.TRANSLUCENT);
//2.You need configure egl attribs in cocos\2d\platform\android\nativeactivity.cpp on some android versions(eg.4.4) for supports translucency.
//eg:
//For supports translucency
//1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp
/*const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_BUFFER_SIZE, 32,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
//EGL_BLUE_SIZE, 5, -->delete
//EGL_GREEN_SIZE, 6, -->delete
//EGL_RED_SIZE, 5, -->delete
EGL_BUFFER_SIZE, 32, //-->new field
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 8,
EGL_NONE
};*/
//2.Set the format of window
// getWindow().setFormat(PixelFormat.TRANSLUCENT);
}
}