private void glControl_Load(object sender, EventArgs e) { Console.WriteLine("Loading GLcontrol.."); glControl.MakeCurrent(); GL.Enable(EnableCap.Texture2D); GL.Enable(EnableCap.DepthTest); GL.ClearColor(OpenTK.Graphics.Color4.Black); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); InitializeInputTick(); ActiveCamera.setupGLRenderMatrix(); Console.WriteLine("GLcontrol is done loading!"); }
protected override void OnResize(EventArgs e) { GL.Viewport(0, 0, Width, Height); ActiveCamera = new OldCamera(Width, Height); ActiveCamera.Pos = new Vector3(dragX, dragY, dragZ); ActiveCamera.setupGLRenderMatrix(); }