mirror of https://github.com/axmolengine/axmol.git
33 lines
907 B
Java
33 lines
907 B
Java
package org.cocos2dx.cpp;
|
|
|
|
import android.app.NativeActivity;
|
|
import android.os.Bundle;
|
|
|
|
public class Cocos2dxActivity extends NativeActivity{
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
// TODO Auto-generated method stub
|
|
super.onCreate(savedInstanceState);
|
|
|
|
//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_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);
|
|
|
|
}
|
|
}
|