Exemple #1
0
 protected override void OnContextSet(EventArgs e)
 {
     base.OnContextSet(e);
     Console.WriteLine("OpenGL version: {0} GLSL version: {1}", GL.GetString(StringName.Version), GL.GetString(StringName.ShadingLanguageVersion));
     keys.LoadShaders();
     keys.CreateTextTextures(CreateBitmapData);
     keys.InitModel();
     keys.Start();
 }
Exemple #2
0
        public void StartAnimating()
        {
            if (IsAnimating)
            {
                return;
            }

            CreateFrameBuffer();
            SetupProjection();

            keys.CreateTextTextures(CreateBitmapData);
            keys.InitModel();
            keys.Start();
            CADisplayLink displayLink = UIScreen.MainScreen.CreateDisplayLink(this, new Selector("drawFrame"));

            displayLink.FrameInterval = frameInterval;
            displayLink.AddToRunLoop(NSRunLoop.Current, NSRunLoop.NSDefaultRunLoopMode);
            this.displayLink = displayLink;

            IsAnimating = true;
        }
Exemple #3
0
        // This gets called when the drawing surface is ready
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            MakeCurrent();

            keys.CreateTextTextures(CreateBitmapData);
            keys.InitModel();
            keys.Start();

            // Run the render loop
            Run();
        }