示例#1
0
        void GLSurfaceView.IRenderer.OnSurfaceCreated(Javax.Microedition.Khronos.Opengles.IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)

        {
            GLES20.GlClearColor(1f, 1f, 1f, 1.0f);
            GLES20.GlEnable(GLES20.GlDepthTest);
            mPointCloud           = new PointCloud(mMaxDepthPoints);
            mGrid                 = new Grid();
            mCameraFrustumAndAxis = new CameraFrustumAndAxis();
            Matrix.SetIdentityM(mViewMatrix, 0);
            Matrix.SetLookAtM(mViewMatrix, 0, 5f, 5f, 5f, 0f, 0f, 0f, 0f, 1f, 0f);
            mCameraFrustumAndAxis.ModelMatrix = ModelMatCalculator.ModelMatrix;
        }
示例#2
0
 public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
 {
     // Set background color and enable depth testing
     GLES20.GlClearColor(1f, 1f, 1f, 1.0f);
     GLES20.GlEnable(GLES20.GlDepthTest);
     resetModelMatCalculator();
     mCameraFrustum        = new CameraFrustum();
     mFloorGrid            = new Grid();
     mCameraFrustumAndAxis = new CameraFrustumAndAxis();
     mTrajectory           = new Trajectory(3);
     // Construct the initial view matrix
     Matrix.SetIdentityM(mViewMatrix, 0);
     Matrix.SetLookAtM(mViewMatrix, 0, 5f, 5f, 5f, 0f, 0f, 0f, 0f, 1f, 0f);
     mCameraFrustumAndAxis.ModelMatrix = ModelMatCalculator.ModelMatrix;
 }