示例#1
0
 public static void DisableDepthTest(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableDepthTest)
     {
         GLHelper.sEnableDepthTest = false;
         pGL.GlDisable(GL10Consts.GlDepthTest);
     }
 }
示例#2
0
 public static void DisableMultisample(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableMultisample)
     {
         GLHelper.sEnableMultisample = false;
         pGL.GlDisable(GL10Consts.GlMultisample);
     }
 }
示例#3
0
 public static void DisableDither(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableDither)
     {
         GLHelper.sEnableDither = false;
         pGL.GlDisable(GL10Consts.GlDither);
     }
 }
示例#4
0
 public static void DisableLightning(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableLightning)
     {
         GLHelper.sEnableLightning = false;
         pGL.GlDisable(GL10Consts.GlLighting);
     }
 }
示例#5
0
 public static void DisableTextures(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableTextures)
     {
         GLHelper.sEnableTextures = false;
         pGL.GlDisable(GL10Consts.GlTexture2d);
     }
 }
示例#6
0
 public static void DisableBlend(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableBlend)
     {
         GLHelper.sEnableBlend = false;
         pGL.GlDisable(GL10Consts.GlBlend);
     }
 }
示例#7
0
 public static void DisableCulling(/* final */ GL10 pGL)
 {
     if (GLHelper.sEnableCulling)
     {
         GLHelper.sEnableCulling = false;
         //pGL.glDisable(GL10.GL_CULL_FACE);
         pGL.GlDisable(GL11Consts.GlCullFaceMode);
     }
 }
        // ===========================================================
        // Methods for/from SuperClass/Interfaces
        // ===========================================================

        protected override void OnDrawScene(/* final */ GL10 pGL)
        {
            /* final */
            //Camera firstCamera = this.GetFirstCamera();
            Camera firstCamera = this.FirstCamera;
            /* final */
            Camera secondCamera = this.SecondCamera;

            /* final */
            int surfaceWidth = this.mSurfaceWidth;
            /* final */
            int surfaceWidthHalf = surfaceWidth >> 1;

            /* final */
            int surfaceHeight = this.mSurfaceHeight;

            //pGL.glEnable(GL10.GL_SCISSOR_TEST); // TODO --> GLHelper
            pGL.GlEnable(GL10Consts.GlScissorTest); // TODO --> GLHelper

            /* First Screen. With first camera, on the left half of the screens width. */
            {
                pGL.GlScissor(0, 0, surfaceWidthHalf, surfaceHeight);
                pGL.GlViewport(0, 0, surfaceWidthHalf, surfaceHeight);

                //super.mScene.onDraw(pGL, firstCamera);
                base.mScene.OnDraw(pGL, firstCamera);
                firstCamera.OnDrawHUD(pGL);
            }

            /* Second Screen. With second camera, on the right half of the screens width. */
            {
                pGL.GlScissor(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);
                pGL.GlViewport(surfaceWidthHalf, 0, surfaceWidthHalf, surfaceHeight);

                //super.mScene.onDraw(pGL, secondCamera);
                base.mScene.OnDraw(pGL, secondCamera);
                secondCamera.OnDrawHUD(pGL);
            }

            pGL.GlDisable(GL10Consts.GlScissorTest);
        }