Пример #1
0
        private void Stage_Load(object sender, EventArgs e)
        {
            // Enable GL
            do
            {
                //InitGL.EnableOpenGL(this.CreateGraphics.GetHdc);
                InitGL.EnableOpenGL(this.CreateGraphics().GetHdc());
            } while (!InitGL.IsEnable());

            //Initial rotation
            defviewangleX = 0;
            //defviewangleY = 70;
            defviewangleY = 90;

            //viewangleX = 20 ' very old
            viewangleX = defviewangleX;
            viewangleY = defviewangleY;
            angleX     = 0 - viewangleX;
            angleY     = 0 - viewangleY;

            DrawInit();

            stageLoaded = true;


            Stage_Resize(null, null);
        }
Пример #2
0
 private void Stage_FormClosed(object sender, FormClosedEventArgs e)
 {
     stageLoaded = false;
     if (InitGL.IsEnable())
     {
         InitGL.DisableOpenGL();
     }
 }