Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - lasuicida

#1

@Override
public void onCreate(Bundle b) {
super.onCreate(b);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
// setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
setContentView(R.layout.camera_view);
initCamera();
initWorld();
}
private void initCamera() {
mSurfaceView = (SurfaceView) findViewById(R.id.surfaceView);
mSurfaceHolder = mSurfaceView.getHolder();
mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
mSurfaceHolder.addCallback(this);
}
        private void initWorld() {
if (master != null) {
copy(master);
}
mGLView = new GLSurfaceView(getApplication());
mGLView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);

renderer = new MyRenderer();
mGLView.setRenderer(renderer);

mGLView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
FrameLayout f = (FrameLayout) findViewById(R.id.camera_view_body);
f.addView(mGLView, 1);
}
#2
I achieved the effect by taking "helloworld" as an example.
But when i set up the screen to mode "LANDSCAPE", the cube disappeared.
Anybody knows the reason please tell me why.
thanks a lot. ;D