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); } }
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()); }
public GameWindow(Gdk.Window gdkWindow) { this.csWindow = WindowHelp.CreateCSWindow(gdkWindow); this.sceneEntity = new SceneObject(this.csWindow.GetScene()); this.canvasEntity = new CanvasObject(this.csWindow.GetCanvas()); }