
Rendering offscreen with a FBO object
Posted Wednesday, 20 July, 2011 - 15:00 by violin inHello Guys,
I am trying to do something very specific: to use OpeTK to render on an offscreen Framebuffer-Object, then use the buffer pixels in my application. If I'm not wrong, I need to create my own graphics context, but it requires a window handle, which I don't have. GameWindow and GLControl, however, do create a window. Any idea or tips how I can do that?


Comments
Re: Rendering offscreen with a FBO object
OpenTK does not support non-window contexts.
The solution is to create a regular, invisible window. If you are using Windows.Forms or WPF create a GLControl, call its CreateControl() method but don't attach it anywhere. In all other cases, create a GameWindow and don't call its Run() method.
This is a supported use case and will work correctly as long as your application can access the video hardware (i.e. in all cases other than windows services and headless/network servers).