Пример #1
0
        public override void Draw(GlTexture T)
        {
            if (this.vertexes == null || !ActivateDrawStart())
            {
                return;
            }

            T.BindTexture();

            ActivateDrawing();

            Gl.glBegin(Gl.GL_POLYGON);
            for (int i = 0; i < this.vertexes.Length; i++)
            {
                if (this.vertexes[i] != null)
                {
                    Gl.glVertex2f(this.vertexes[i].X, this.vertexes[i].Y);
                    Gl.glTexCoord2f(this.vertexes[i].X, this.vertexes[i].Y);
                }
            }
            Gl.glEnd();

            T.UnbindTexture();

            ActivateDrawed();
        }
Пример #2
0
        public override void Draw(GlTexture T)
        {
            if (T == null || this.CountOfPoints == 0 || !ActivateDrawStart())
            {
                return;
            }

            T.BindTexture();

            ActivateDrawing();

            Gl.glBegin(Gl.GL_POLYGON);
            for (int i = 0; i < this.CountOfPoints; i++)
            {
                if (this[i] != null)
                {
                    Gl.glVertex2f(this[i].X, this[i].Y);
                    Gl.glTexCoord2d((double)this[i].X, (double)this[i].Y);
                }
            }
            Gl.glEnd();

            T.UnbindTexture();

            ActivateDrawed();
        }
Пример #3
0
        public override void Draw(GlTexture T)
        {
            if (this.isNullPoint() || !ActivateDrawStart())
            {
                return;
            }

            T.BindTexture();

            ActivateDrawing();

            Gl.glBegin(Gl.GL_POINTS);
            Gl.glTexCoord2d(this.X, this.Y);
            Gl.glVertex2f(this.X, this.Y);
            Gl.glEnd();

            T.UnbindTexture();

            ActivateDrawed();
        }
Пример #4
0
        public override void Draw(GlTexture T)
        {
            if (!ActivateDrawStart())
            {
                return;
            }

            T.BindTexture();

            ActivateDrawing();

            Gl.glBegin(Gl.GL_LINES);
            Gl.glVertex2f(this.pointOfLine.X - this.DirectVector.deltaX, this.pointOfLine.Y - this.DirectVector.deltaY);
            Gl.glTexCoord2d(this.pointOfLine.X - this.DirectVector.deltaX, this.pointOfLine.Y - this.DirectVector.deltaY);

            Gl.glVertex2f(this.pointOfLine.X + this.DirectVector.deltaX, this.pointOfLine.Y + this.DirectVector.deltaY);
            Gl.glTexCoord2d(this.pointOfLine.X + this.DirectVector.deltaX, this.pointOfLine.Y + this.DirectVector.deltaY);
            Gl.glEnd();

            T.UnbindTexture();

            ActivateDrawed();
        }