Posted Monday, 10 December, 2007 - 09:02 by the Fiddler.
AFAIK, there are two ways to do off-screen rendering: either use OpenGL's render-to-texture functionality and read back from that texture (with ReadPixels), or use a pbuffer. OpenTK does not currently support pbuffers (it shouldn't be difficult to change Win/X11GLContext to add support, but getting the thing to work identically on both Windows and Linux is a bit of a pain), but it's easy to bind a context to an invisible window:
Form form = newForm();
GLContext context = new GLContext(newDisplayMode(), WindowInfo.GetInfoFrom(form));
context.CreateContext(); // or context.CreateContext(true, sharedContext);
form.Visible = false;
Comments
AFAIK, there are two ways to
AFAIK, there are two ways to do off-screen rendering: either use OpenGL's render-to-texture functionality and read back from that texture (with ReadPixels), or use a pbuffer. OpenTK does not currently support pbuffers (it shouldn't be difficult to change Win/X11GLContext to add support, but getting the thing to work identically on both Windows and Linux is a bit of a pain), but it's easy to bind a context to an invisible window:
You can then use the framebuffer object extension to perform off-screen rendering.