Beispiel #1
0
        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);
        }
Beispiel #2
0
 public void Dirty(Common.Rectangle dr)
 {
     dobs.Dirty(dr);
 }