mirror of https://github.com/axmolengine/axmol.git
update describe for support translucency on android
This commit is contained in:
parent
3fd9561df8
commit
4f2d7f47fc
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue