コード例 #1
0
        /// <summary>
        /// All application initialization is performed here, before the main loop thread is executed and the render panel is displayed for the first time.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RenderForm_Load(object sender, EventArgs e)
        {
            if (!Horde3DUtils.initOpenGL(PInvoke.GetDC(renderPanel.Handle).ToInt32()))
            {
                throw new Exception("Failed to initialize OpenGL");
            }

            if (!app.init())
            {
                MessageBox.Show("Failed to init application.\nMake sure you have an OpenGL 2.0 compatible graphics card with the latest drivers installed!\nAlso verify if the pipeline config file exists.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Horde3D.release();
                Horde3DUtils.releaseOpenGL();
                Environment.Exit(0);
            }

            app.resize(renderPanel.Size.Width, renderPanel.Size.Height);
        }
コード例 #2
0
 public void release()
 {
     // Release engine
     Horde3D.release();
 }