public void BeginRender() { // hook move! noForm.LocationChanged += noForm_LocationChanged; // Start the watcher dobs.Dirty(noForm.DisplayRectangle); dobs.running = true; dobs.StartObserving(() => { // get the glinfo winfo = Utilities.CreateWindowsWindowInfo(w32.handle); // get context running... glContext = new GraphicsContext(GraphicsMode.Default, winfo); (glContext as IGraphicsContextInternal).LoadAll(); // makes current i think. or constructor does. glContext.SwapInterval = 0; // vsync off, manage self. // generate buffers int FBO_Draw = GL.Ext.GenFramebuffer(); int FBO_Window = GL.Ext.GenFramebuffer(); int T2D_Draw = GL.GenTexture(); int T2D_Window = GL.GenTexture(); // saveem _backRenderer = new OpenTK_RenderElements(glContext, FBO_Draw, T2D_Draw, FBO_Window, T2D_Window); _uDraw = new OTKDraw(_backRenderer); }); noForm_LocationChanged(noForm.Location); }
public void BeginRender() { // hook move! noForm.LocationChanged += noForm_LocationChanged; // Start the watcher dobs.Dirty(noForm.DisplayRectangle); dobs.running = true; dobs.StartObserving(HandleCreatedStuff); noForm_LocationChanged(noForm.Location); }
public void BeginRender() { // Make sure it gets layered! hWnd = w32.handle; var wl = Win32Util.GetWindowLong(hWnd, Win32Util.GWL_EXSTYLE); var ret = Win32Util.SetWindowLong(hWnd, Win32Util.GWL_EXSTYLE, wl | Win32Util.WS_EX_LAYERED); // hook move! noForm.LocationChanged += noForm_LocationChanged; // Start the watcher dobs.Dirty(noForm.DisplayRectangle); dobs.running = true; dobs.StartObserving(); noForm_LocationChanged(noForm.Location); }