Esempio n. 1
0
            public override void Draw(GLControl2D control)
            {
                GL.PushMatrix();
                GL.Translate(Position.X, Position.Y, 0);

                GL.Color4(System.Drawing.Color.Red);
                GL.Begin(PrimitiveType.LineLoop);
                for (int i = 0; i <= 300; i++)
                {
                    double angle = 2 * Math.PI * i / 300;
                    double x     = Math.Cos(angle);
                    double y     = Math.Sin(angle);
                    GL.Vertex2(x, y);
                }
                GL.End();

                GL.PopMatrix();
            }
Esempio n. 2
0
            public override void Draw(GLControl2D control)
            {
                GL.PushMatrix();
                GL.Translate(Position.X, Position.Y, 0);

                GL.Color4(System.Drawing.Color.White);
                GL.Begin(PrimitiveType.Quads);
                GL.TexCoord2(-1, -1);
                GL.Vertex3(-Width, -Height, 0);
                GL.TexCoord2(0, -1);
                GL.Vertex3(Width, -Height, 0);
                GL.TexCoord2(0, 0);
                GL.Vertex3(Width, Height, 0);
                GL.TexCoord2(-1, 0);
                GL.Vertex3(-Width, Height, 0);
                GL.End();

                GL.PopMatrix();
            }
Esempio n. 3
0
 public virtual void Draw(GLControl2D control)
 {
 }
Esempio n. 4
0
 public virtual void Prepare(GLControl2D control)
 {
 }