//{
        //    float width = (float)(_position.X);
        //    float height = (float)(_position.Y );
        //    return new RectangleF((float)_position.X - width / 2,
        //        (float)_position.Y - height / 2, width, height);
        //}



        //渲染检测方框
        protected virtual void Render_Debug(RectangleColor rectangleColor)
        {
            Gl.glDisable(Gl.GL_TEXTURE_2D);

            bounds = GetBoundingBox();
            Gl.glBegin(Gl.GL_LINE_LOOP);
            {
                Gl.glColor3f(rectangleColor.Red, rectangleColor.Green, rectangleColor.Blue);
                Gl.glVertex2f(bounds.Left, bounds.Top);
                Gl.glVertex2f(bounds.Right, bounds.Top);
                Gl.glVertex2f(bounds.Right, bounds.Bottom);
                Gl.glVertex2f(bounds.Left, bounds.Bottom);
            }
            Gl.glEnd();
            Gl.glEnable(Gl.GL_TEXTURE_2D);
        }
Exemple #2
0
 protected override void Render_Debug(RectangleColor rectangleColor)
 {
     base.Render_Debug(rectangleColor);
 }