예제 #1
0
        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!");
        }
예제 #2
0
 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();
 }
예제 #3
0
 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();
 }