
Offscreen rendering & output on multiple monitors.
Posted Friday, 24 December, 2010 - 09:46 by Pygmy inI want to render (realtime) to a big offscreen texture, and display parts of that texture in different windows / on different monitors, while controlling parameters from a UI.
My idea :
- Main thread runs the Windows UI,
- spawns a Render-thread that renders stuff to the offscreen texture in the background,
- and creates a couple of output windows, windowed or optionally full-screen, on different monitors.
but how do I handle the "output parts of the rendered texture to multiple monitors" part ?
Each of the output-windows would get it's own render-thread I assume,
and in that I'd bind the offscreen rendered texture to render a quad in the window.
Can anyone help me a bit more on how to make this all work ?
I need to share contexts I think ?
How do I sync the output-window display with the background-render thread ?
General advice ? :)
Cheers !


Comments
Re: Offscreen rendering & output on multiple monitors.
OpenTK always tries to share contexts, unless you set
GraphicsContext.ShareContexts = false. Check the GraphicsContext documentation.You can use GL_ARB_sync to sync the offscreen render thread with the output windows.
General advice:
context.MakeCurrent(null)).Re: Offscreen rendering & output on multiple monitors.
and now how can do it, as all gfx cards accept context sharing ??
I need to a background rendering thread to do big jobs and to keep the main thread (UI in GL) at max fps, and smooth for the user.