상속: 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
 }