Inheritance: Object
示例#1
0
        public void ViewTick(Cocoa.Object sender)
        {
            xrotate += 1.0f; if (xrotate > 350.0f)
            {
                xrotate = 0.0f;
            }
            yrotate += 1.0f; if (yrotate > 350.0f)
            {
                yrotate = 0.0f;
            }
            zrotate += 1.0f; if (zrotate > 350.0f)
            {
                zrotate = 0.0f;
            }
            zoom += zoomdelta; if (zoom > 4.9f)
            {
                zoomdelta = -0.1f;
            }
            if (zoom < 0.2f)
            {
                zoomdelta = 0.1f;
            }
#if RECTANGLE
            color1 = SetColor();
            color2 = SetColor();
            color3 = SetColor();
            color4 = SetColor();
#endif
            Draw(viewFrame);
        }
示例#2
0
        public SimpleOpenGLView(Rect aRect) : base(aRect)
        {
            viewFrame = aRect;
#if RECTANGLE
            color1 = Cocoa.Color.White;
            color2 = Cocoa.Color.Red;
            color3 = Cocoa.Color.Blue;
            color4 = Cocoa.Color.Green;
#endif
        }
示例#3
0
 public void ViewTick(Cocoa.Object sender)
 {
     xrotate += 1.0f; if (xrotate > 350.0f) { xrotate = 0.0f; }
     yrotate += 1.0f; if (yrotate > 350.0f) { yrotate = 0.0f; }
     zrotate += 1.0f; if (zrotate > 350.0f) { zrotate = 0.0f; }
     zoom += zoomdelta; if (zoom > 4.9f) { zoomdelta = -0.1f; } if (zoom < 0.2f) { zoomdelta = 0.1f; }
     #if RECTANGLE
     color1 = SetColor ();
     color2 = SetColor ();
     color3 = SetColor ();
     color4 = SetColor ();
     #endif
     Draw (viewFrame);
 }
示例#4
0
 public SimpleOpenGLView(Rect aRect)
     : base(aRect)
 {
     viewFrame = aRect;
     #if RECTANGLE
     color1 = Cocoa.Color.White;
     color2 = Cocoa.Color.Red;
     color3 = Cocoa.Color.Blue;
     color4 = Cocoa.Color.Green;
     #endif
 }