Пример #1
0
 public MyGLControl InitMiniGLControl(int w, int h)
 {
     if (miniGLControl == null)
     {
         miniGLControl        = new MyGLControl();
         miniGLControl.Width  = w;
         miniGLControl.Height = h;
         this.Controls.Add(miniGLControl);
     }
     return(miniGLControl);
 }
Пример #2
0
        public MyGLControl InitMiniGLControl2(int w, int h)
        {
            //test more than 1 gl control in the same form

            if (miniGLControl2 == null)
            {
                miniGLControl2           = new MyGLControl();
                miniGLControl2.Width     = w;
                miniGLControl2.Height    = h;
                miniGLControl2.BackColor = System.Drawing.Color.Black;
                miniGLControl2.Top       = 0;
                miniGLControl2.Left      = miniGLControl.Right;
                this.Controls.Add(miniGLControl2);
            }
            return(miniGLControl2);
        }
Пример #3
0
		public WindowsFormsOpenGL(AbstractOsMappingWidget app, SystemWindow childSystemWindow)
		{
			switch (childSystemWindow.BitDepth)
			{
				case 32:
					glControl = new MyGLControl(32, childSystemWindow.StencilBufferDepth);
					break;

				default:
					throw new NotImplementedException();
			}

			Controls.Add(glControl);

			SetUpFormsWindow(app, childSystemWindow);

			HookWindowsInputAndSendToWidget communication = new HookWindowsInputAndSendToWidget(glControl, aggAppWidget);
		}
Пример #4
0
		public new void MakeCurrent()
		{
			currentControl = this;
			base.MakeCurrent();
		}
Пример #5
0
		public new void MakeCurrent()
		{
			currentControl = this;
			base.MakeCurrent();
            ImageGlPlugin.SetCurrentContextData(Id, releaseAllGlData);
        }