public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
        {
            /*
             * By default, OpenGL enables features that improve quality
             * but reduce performance. One might want to tweak that
             * especially on software renderer.
             */
            gl.GlDisable(GL10.GlDither);

            /*
             * Some one-time OpenGL initialization can be made here
             * probably based on features of this particular context
             */
            gl.GlHint(GL10.GlPerspectiveCorrectionHint, GL10.GlFastest);

            if (mTranslucentBackground)
            {
                gl.GlClearColor(0, 0, 0, 0);
            }
            else
            {
                gl.GlClearColor(1, 1, 1, 1);
            }

            gl.GlEnable(GL10.GlCullFaceCapability);
            gl.GlShadeModel(GL10.GlSmooth);
            gl.GlEnable(GL10.GlDepthTest);
        }
Пример #2
0
        public void OnSurfaceCreated(IGL10 gl, EGLConfig config)
        {
            /*
             * By default, OpenGL enables features that improve quality
             * but reduce performance. One might want to tweak that
             * especially on software renderer.
             */
            gl.GlDisable(GL10.GlDither);

            /*
             * Some one-time OpenGL initialization can be made here
             * probably based on features of this particular context
             */
            gl.GlHint(GL10.GlPerspectiveCorrectionHint, GL10.GlFastest);

            if (mTranslucentBackground)
            {
                gl.GlClearColor(0, 0, 0, 0);
            }
            else
            {
                gl.GlClearColor(1, 1, 1, 1);
            }

            // FIXME: Mono.Android.dll misses this constant. Filed as #3531.
            gl.GlEnable(2884);            //GL10.GlCullFace);
            gl.GlShadeModel(GL10.GlSmooth);
            gl.GlEnable(GL10.GlDepthTest);
        }
Пример #3
0
        public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
        {
            gl.GlClearColor(0f, 0f, 0f, 1f);
            gl.GlShadeModel(GL10.GlSmooth);
            gl.GlHint(GL10.GlPerspectiveCorrectionHint, GL10.GlNicest);
            gl.GlHint(GL10.GlLineSmoothHint, GL10.GlNicest);
            gl.GlHint(GL10.GlPolygonSmoothHint, GL10.GlNicest);
            gl.GlEnable(GL10.GlLineSmooth);
            gl.GlDisable(GL10.GlDepthTest);
            gl.GlDisable(GL10.GlCullFaceCapability);

            mObserver.OnSurfaceCreated();
        }
 public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
 {
     // 关闭抗抖动
     gl.GlDisable(GL10.GlDither);
     // 设置系统对透视进行修正
     gl.GlHint(GL10.GlPerspectiveCorrectionHint, GL10.GlFastest);
     gl.GlClearColor(0, 0, 0, 0);
     // 设置阴影平滑模式
     gl.GlShadeModel(GL10.GlSmooth);
     // 启用深度测试
     gl.GlEnable(GL10.GlDepthTest);
     // 设置深度测试的类型
     gl.GlDepthFunc(GL10.GlLequal);
     // 启用2D纹理贴图
     gl.GlEnable(GL10.GlTexture2d);
     // 装载纹理
     loadTexture(gl);
 }
        public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
        {
            /*
             * By default, OpenGL enables features that improve quality
             * but reduce performance. One might want to tweak that
             * especially on software renderer.
             */
            gl.GlDisable (GL10.GlDither);

            /*
             * Some one-time OpenGL initialization can be made here
             * probably based on features of this particular context
             */
            gl.GlHint (GL10.GlPerspectiveCorrectionHint, GL10.GlFastest);

            if (mTranslucentBackground)
                gl.GlClearColor (0,0,0,0);
            else
                gl.GlClearColor (1,1,1,1);

            // FIXME: Mono.Android.dll misses this constant. Filed as #3531.
            gl.GlEnable(2884);//GL10.GlCullFace);
            gl.GlShadeModel(GL10.GlSmooth);
            gl.GlEnable(GL10.GlDepthTest);
        }
Пример #6
0
 public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
 {
     // Set the background frame color
      // ������Ӱƽ��
      gl.GlShadeModel(GL10.GlSmooth);
      // ��ɫ����
      gl.GlClearColor(0.5f, 0.6f, 0.6f, 1.0f);
      // ������Ȼ���
      gl.GlClearDepthf(1.0f);
      // ������Ȳ���
      gl.GlEnable(GL10.GlDepthTest);
      // ������Ȳ��Ե�����
      gl.GlDepthFunc(GL10.GlLequal);
      // ����ϵͳ��͸�ӽ�������
      gl.GlHint(GL10.GlPerspectiveCorrectionHint, GL10.GlNicest);
 }