Exemplo n.º 1
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            base.OnRenderFrame(e);
            GL.Clear(ClearBufferMask.ColorBufferBit);
            GL.MatrixMode(MatrixMode.Modelview);
            GL.LoadIdentity();

            //Eixo X
            GL.Color3(Color.Red);
            GL.LineWidth(3);
            GL.Begin(PrimitiveType.Lines);
            GL.Vertex2(0, 0);
            GL.Vertex2(80, 0);
            GL.End();

            //Eixo Y
            GL.Color3(Color.Green);
            GL.Begin(PrimitiveType.Lines);
            GL.Vertex2(0, 0);
            GL.Vertex2(0, 100);
            GL.End();

            //Referência
            GL.Color3(Color.Blue);
            GL.PointSize(3);
            GL.Begin(BeginMode.Points);
            GL.Vertex2(0, 0);
            GL.End();

            circuloMaior.Desenhar();
            this.circuloMenor = new Circulo(null, null, Color.Black, 3, 1, 40, centerCirculoMenor, BeginMode.LineLoop);
            circuloMenor.Desenhar();
            this.retangulo = new Retangulo(null, null, new Ponto4D(-70, 70), new Ponto4D(70, -70), colorRetangulo, 2);
            retangulo.Desenhar();

            this.SwapBuffers();
        }