Exemplo n.º 1
0
        public void OnSurfaceCreated(IGL10 gl, Javax.Microedition.Khronos.Egl.EGLConfig config)
        {
            gl.GlClearColor(0.0f, 0.0f, 0.0f, 0.5f);

            gl.GlClearDepthf(1.0f);
            gl.GlEnable(IGL10Constants.GL_DEPTH_TEST);
            gl.GlDepthFunc(IGL10Constants.GL_LEQUAL);

            gl.GlHint(IGL10Constants.GL_PERSPECTIVE_CORRECTION_HINT,
                      IGL10Constants.GL_NICEST);
        }
 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);
 }
Exemplo n.º 3
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);
 }