Пример #1
0
        public override void Present(float deltaTime)
        {
            IGL10 gl = _glGraphics.GL10;

            //gl.GlViewport (0, 0, _glGraphics.Width, _glGraphics.Height);


            //gl.GlClearColor(0,0,1,1);
            gl.GlClear(GL10.GlColorBufferBit);
            //gl.GlMatrixMode (GL10.GlProjection);

            //gl.GlLoadIdentity ();
            //gl.GlOrthof (0,320,0,480,1,-1);

            //gl.GlEnable (GL10.GlTexture2d);
            //gl.GlEnable (GL10.GlBlend);
            gl.GlBlendFunc(GL10.GlSrcAlpha, GL10.GlOneMinusSrcAlpha);
            _vertices.Bind();
            _textureRgba.BindTexture();
            _vertices.Draw(GL10.GlTriangles, 6, 6);


            _textureRgb.BindTexture();
            _vertices.Draw(GL10.GlTriangles, 0, 6);
            _vertices.Unbind();
        }
        public override void Present(float deltaTime)
        {
            IGL10 gl = _glGraphics.GL10;

            gl.GlViewport(0, 0, _glGraphics.Width, _glGraphics.Height);
            gl.GlClear(GL10.GlColorBufferBit);
            gl.GlMatrixMode(GL10.GlProjection);
            gl.GlLoadIdentity();
            gl.GlOrthof(0, 540, 0, 960, 1, -1);
            gl.GlEnable(GL10.GlTexture2d);

            _texture.BindTexture();

            gl.GlEnableClientState(GL10.GlVertexArray);
            gl.GlEnableClientState(GL10.GlTextureCoordArray);
            _vertices.Position(0);
            gl.GlVertexPointer(2, GL10.GlFloat, _vertexSize, _vertices);
            _vertices.Position(2);
            gl.GlTexCoordPointer(2, GL10.GlFloat, _vertexSize, _vertices);
            gl.GlDrawElements(GL10.GlTriangles, 6, GL10.GlUnsignedShort, _indices);
        }