Esempio n. 1
0
        public ModelViewMatrixScreen(IGame g) : base(g)
        {
            AndroidGLGame game = g as AndroidGLGame;

            _glGraphics = game.GLGraphics;
            _texture    = new AndroidTexture(game, "bobrgb888.png");
            _vertices   = new AndroidVertices(_glGraphics, 4, 6, false, true);
            _vertices.SetVertices(new float[] { -32, -32, 0, 1,
                                                32, -32, 1, 1,
                                                32, 32, 1, 0,
                                                -32, 32, 0, 0 }, 0, 16);
            _vertices.SetIndices(new short[] { 0, 1, 2, 2, 3, 0 }, 0, 6);

            _bobs = new BobModel[NUM_BOBS];

            for (int i = 0; i < NUM_BOBS; i++)
            {
                _bobs [i] = new BobModel();
            }
        }
Esempio n. 2
0
        public BlendingScreen(IGame g) : base(g)
        {
            AndroidGLGame game = g as AndroidGLGame;

            _glGraphics  = game.GLGraphics;
            _textureRgb  = new AndroidTexture(game, "bobrgb888.png");
            _textureRgba = new AndroidTexture(game, "bobargb8888.png");
            _vertices    = new AndroidVertices(_glGraphics, 8, 12, true, true);

            float[] rects = new float[] {
                100, 100, 1, 1, 1, 0.5f, 0, 1,
                228, 100, 1, 1, 1, 0.5f, 1, 1,
                228, 228, 1, 1, 1, 0.5f, 1, 0,
                100, 228, 1, 1, 1, 0.5f, 0, 0,

                100, 300, 1, 1, 1, 1f, 0, 1,
                228, 300, 1, 1, 1, 1f, 1, 1,
                228, 428, 1, 1, 1, 1f, 1, 0,
                100, 428, 1, 1, 1, 1f, 0, 0
            };

            _vertices.SetVertices(rects, 0, rects.Length);
            _vertices.SetIndices(new short[] { 0, 1, 2, 2, 3, 0, 4, 5, 6, 6, 7, 4 }, 0, 12);
        }