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(); }
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; }
// 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(); }