示例#1
0
        void Form1_Load(object sender, EventArgs e)
        {
            this.DoubleBuffered = false;
            //this.BackColor = Color.Transparent;
            engine = REngine.Instance;                                                              // This will actually instantiate the singleton instance and all dependencies!

            engine.InitForm(Handle);                                                                // Init the engine to our form's surface.

            engine.SetViewport(new RViewport(0, 0, this.ClientSize.Width, this.ClientSize.Height)); //Set the initial viewport to the size of our pictureBox.

            this.Show();
            while (isRunning)
            {
                engine.Clear();

                //Draw everything here...

                engine.Present();
                Application.DoEvents();
            }
        }