Пример #1
0
        public void OnDrawFrame(IGL10 gl)
        {
            if (Width == 0 || Height == 0)
            {
                return;
            }

            SystemTime.Tick();
            var rightNow = SystemTime.Now;

            step = (now == 0 ? 0 : rightNow - now);
            now  = rightNow;

            if (step <= 0)
            {
                return;
            }

            Step();

            NoosaScript.Get().ResetCamera();
            GLES20.GlScissor(0, 0, Width, Height);
            GLES20.GlClear(GLES20.GlColorBufferBit);
            Draw();
        }
Пример #2
0
        public override void Draw()
        {
            base.Draw();

            var script = NoosaScript.Get();

            texture.Bind();

            script.Camera(Camera);

            script.UModel.valueM4(Matrix);
            script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa);

            script.DrawQuadSet(verticesBuffer, 9);
        }
Пример #3
0
        public override void Draw()
        {
            base.Draw();

            var script = NoosaScript.Get();

            font.Texture.Bind();

            if (Dirty)
            {
                UpdateVertices();
            }

            script.Camera(Camera);

            script.UModel.valueM4(Matrix);
            script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa);
            script.DrawQuadSet(Quads, RealLength);
        }
Пример #4
0
        public override void Draw()
        {
            base.Draw();

            var script = NoosaScript.Get();

            texture.Bind();

            script.UModel.valueM4(Matrix);
            script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa);

            if (!updated.IsEmpty)
            {
                UpdateVertices();
            }

            script.Camera(Camera);
            script.DrawQuadSet(quads, size);
        }
Пример #5
0
        public override void Draw()
        {
            base.Draw();

            var script = NoosaScript.Get();

            texture.Bind();

            script.Camera(Camera);

            script.UModel.valueM4(Matrix);
            script.Lighting(Rm, Gm, Bm, Am, RA, Ga, Ba, Aa);

            if (dirty)
            {
                verticesBuffer.Position(0);
                verticesBuffer.Put(vertices);
                dirty = false;
            }
            script.DrawQuad(verticesBuffer);
        }