Example #1
0
        protected virtual void OnInitDraw(/* final */ GL10 pGL)
        {
            GLHelper.SetColor(pGL, this.mRed, this.mGreen, this.mBlue, this.mAlpha);

            GLHelper.EnableVertexArray(pGL);
            GLHelper.BlendFunction(pGL, this.mSourceBlendFunction, this.mDestinationBlendFunction);
        }
            public /* override */ void OnSurfaceCreated(GL10 pGL, EGLConfig pConfig)
            {
                Debug.D("onSurfaceCreated");
                GLHelper.Reset(pGL);

                GLHelper.SetPerspectiveCorrectionHintFastest(pGL);
                //			pGL.glEnable(GL10.GL_POLYGON_SMOOTH);
                //			pGL.glHint(GL10.GL_POLYGON_SMOOTH_HINT, GL10.GL_NICEST);
                //			pGL.glEnable(GL10.GL_LINE_SMOOTH);
                //			pGL.glHint(GL10.GL_LINE_SMOOTH_HINT, GL10.GL_NICEST);
                //			pGL.glEnable(GL10.GL_POINT_SMOOTH);
                //			pGL.glHint(GL10.GL_POINT_SMOOTH_HINT, GL10.GL_NICEST);

                GLHelper.SetShadeModelFlat(pGL);

                GLHelper.DisableLightning(pGL);
                GLHelper.DisableDither(pGL);
                GLHelper.DisableDepthTest(pGL);
                GLHelper.DisableMultisample(pGL);

                GLHelper.EnableBlend(pGL);
                GLHelper.EnableTextures(pGL);
                GLHelper.EnableTexCoordArray(pGL);
                GLHelper.EnableVertexArray(pGL);

                GLHelper.EnableCulling(pGL);
                pGL.GlFrontFace(GL10Consts.GlCcw);
                pGL.GlCullFace(GL10Consts.GlBack);

                // GLHelper.EnableExtensions(pGL, this.mEngine.getEngineOptions().getRenderOptions());
                GLHelper.EnableExtensions(pGL, this.mEngine.EngineOptions.RenderOptions);
            }