Exemplo n.º 1
0
        protected override void InternalRender(FrameEventArgs e)
        {
            GL.Color4(1.0f, 1.0f, 1.0f, 1.0f);
            GL.BlendColor(1.0f, 1.0f, 1.0f, 1.0f);
            GL.PushAttrib(AttribMask.EnableBit);
            GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
            GL.BindTexture(TextureTarget.Texture2D, texture);

            GL.Begin(BeginMode.Quads);

            GL.TexCoord2(0.0f, to);                  GL.Vertex2(0.0f, 0.0f);
            GL.TexCoord2(0.5f, to);                  GL.Vertex2(this.Height, 0.0f);
            GL.TexCoord2(0.5f, to + 0.25f);    GL.Vertex2(this.Height, this.Height);
            GL.TexCoord2(0.0f, to + 0.25f);    GL.Vertex2(0.0f, this.Height);

            GL.TexCoord2(0.5f, to);                  GL.Vertex2(this.Height, 0.0f);
            GL.TexCoord2(1.0f, to);                  GL.Vertex2(this.Width - this.Height + 1.0f, 0.0f);
            GL.TexCoord2(1.0f, to + 0.25f);    GL.Vertex2(this.Width - this.Height + 1.0f, this.Height);
            GL.TexCoord2(0.5f, to + 0.25f);    GL.Vertex2(this.Height, this.Height);

            GL.TexCoord2(0.5f, to);                  GL.Vertex2(this.Width - this.Height, 0.0f);
            GL.TexCoord2(0.0f, to);                  GL.Vertex2(this.Width, 0.0f);
            GL.TexCoord2(0.0f, to + 0.25f);    GL.Vertex2(this.Width, this.Height);
            GL.TexCoord2(0.5f, to + 0.25f);    GL.Vertex2(this.Width - this.Height, this.Height);

            GL.End();

            GL.Disable(EnableCap.Texture2D);
            GL.RasterPos2((this.Width >> 0x01) - 0x0a * this.Text.Length - 0x05, (this.Height >> 0x01) - 0x10);
            OpenGLFont.PrintString(this.Text);

            GL.PopAttrib();
        }
Exemplo n.º 2
0
        public void Render(FrameEventArgs e)
        {
            if (this.enabled)
            {
                /*
                 * GL.Color3(0.0f,0.0f,0.0f);
                 * GL.Vertex2(0.0f,0.0f);
                 * GL.Vertex2(this.wwidth,0.0f);
                 * GL.Vertex2(0.0f,height);
                 * GL.Vertex2(this.wwidth,height);
                 *
                 * GL.Vertex2(0.0f,this.wheight-height);
                 * GL.Vertex2(this.wwidth,this.wheight-height);
                 * GL.Vertex2(0.0f,this.wheight);
                 * GL.Vertex2(this.wwidth,this.wheight);//*/

                GL.Color3(0.0f, 0.5f, 1.0f);
                for (int i = 0x00; i < this.text.Length; i++)
                {
                    GL.RasterPos2(10.0f, this.wheight - height + OpenGLFont.FontHeight * i);
                    OpenGLFont.PrintString(this.text[i]);
                }
                GL.Color3(1.0f, 1.0f, 1.0f);
            }
        }
Exemplo n.º 3
0
 public void Render(OpenTK.FrameEventArgs e)
 {
     OpenGLFont.PrintString(this.totalMessage);
 }