build a AS Demo success but screen is black
// Initialize the renderer mRenderer = new FastCVSampleRenderer( this ); mGLSurface = mRenderer.getGLSurfaceView(); mGLSurface.setZOrderMediaOverlay(true); mGLSurface.setVisibility( View.VISIBLE ); mGLSurface.setRenderMode( GLSurfaceView.RENDERMODE_WHEN_DIRTY ); mRootViewGroup.addView(mGLSurface); // Camera surface is required for Camera to send // preview frame callback on some devices. // The order this is added to the rootViewGroup matters to ensure it is // below GLSurface. GLSurface is actually used for rendering. // Further note, when splash screen is not used this should be added // after GLSurfaceView. Really tricky to get ordering correct. mCamera = Camera.open(); mCamSurface = new CameraSurface( this, mCamera ); mRootViewGroup.addView(mCamSurface); bringControlsToFront(); startPreview(); System.gc();
in this block, mCameSurface run success, but mGLSurface is black, I tried to adjust their order, but it also failed.