示例#1
0
 public static void UpdateOpenGLContext(bool isShowing, CSWindow csWindow, Gdk.Window gdkWindow)
 {
     if (Platform.IsWindows)
     {
         if (isShowing && gdkWindow != null)
         {
             bool flag = NativeGdkWin.Gdk_window_ensure_native(gdkWindow.Handle);
             csWindow.UpdateOpenGLContext(isShowing, NativeGdkWin.GetWindowHandle(gdkWindow.Handle).ToInt32());
             System.GC.Collect();
         }
     }
     else
     {
         if (!Platform.IsMac)
         {
             throw new NotImplementedException();
         }
         csWindow.UpdateOpenGLContext(isShowing, 0);
     }
 }
示例#2
0
 public GameWindow(IntPtr windowHandle, int width, int height)
 {
     this.csWindow     = WindowHelp.CreateCSWindow(windowHandle, width, height);
     this.sceneEntity  = new SceneObject(this.csWindow.GetScene());
     this.canvasEntity = new CanvasObject(this.csWindow.GetCanvas());
 }
示例#3
0
 public GameWindow(Gdk.Window gdkWindow)
 {
     this.csWindow     = WindowHelp.CreateCSWindow(gdkWindow);
     this.sceneEntity  = new SceneObject(this.csWindow.GetScene());
     this.canvasEntity = new CanvasObject(this.csWindow.GetCanvas());
 }