Esempio n. 1
0
 public static void EnableDepthTest(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableDepthTest)
     {
         GLHelper.sEnableDepthTest = true;
         pGL.GlEnable(GL10Consts.GlDepthTest);
     }
 }
Esempio n. 2
0
 public static void EnableMultisample(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableMultisample)
     {
         GLHelper.sEnableMultisample = true;
         pGL.GlEnable(GL10Consts.GlMultisample);
     }
 }
Esempio n. 3
0
 public static void EnableDither(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableDither)
     {
         GLHelper.sEnableDither = true;
         pGL.GlEnable(GL10Consts.GlDither);
     }
 }
Esempio n. 4
0
 public static void EnableLightning(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableLightning)
     {
         GLHelper.sEnableLightning = true;
         pGL.GlEnable(GL10Consts.GlLighting);
     }
 }
Esempio n. 5
0
 public static void EnableTextures(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableTextures)
     {
         GLHelper.sEnableTextures = true;
         pGL.GlEnable(GL10Consts.GlTexture2d);
     }
 }
Esempio n. 6
0
 public static void EnableBlend(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableBlend)
     {
         GLHelper.sEnableBlend = true;
         pGL.GlEnable(GL10Consts.GlBlend);
     }
 }
Esempio n. 7
0
 public static void EnableCulling(/* final */ GL10 pGL)
 {
     if (!GLHelper.sEnableCulling)
     {
         GLHelper.sEnableCulling = true;
         //pGL.GlEnable(GL10.GL_CULL_FACE);
         pGL.GlEnable(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);
        }