Esempio n. 1
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            base.OnRenderFrame(e);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            curState.OnRenderFrame(e);

            //TODO render reading stuff here
            if (reading)
            {
                GL.PushMatrix();
                GL.EnableClientState(ArrayCap.VertexArray);
                paper.Draw();
                GL.DisableClientState(ArrayCap.VertexArray);
                GL.PopMatrix();
                GL.PushMatrix();
                RectangleF test = paper.GetBoundsWithBorder(16);
                ink.Print(readingText, paper.GetBoundsWithBorder(16), QFontAlignment.Left);
                GL.BindTexture(TextureTarget.Texture2D, 0);
                GL.Color4(1.0f, 1.0f, 1.0f, 1.0f);
                GL.PopMatrix();
            }

            SwapBuffers();
        }