PDA

View Full Version : Can I use OpenGL without specifying a window



pango
05-26-2003, 09:12 AM
I want to write a video transition program using OpenGL,and there is no need a window to show the image rendered by OpenGL,so is it possible to initializing a OpenGL working environment without specifying a window?If it is,how to implement it?

Korval
05-26-2003, 09:28 AM
You always need a HWND (and from that, a HDC) to use OpenGL.

However, you don't have to display the window. You can create the window, get a HDC from it, initialize OpenGL, and then minimize the window.

To make this work, you must render, not to the window's back buffer, but to a pbuffer you create with the appropriate ARB extension.

Csiki
05-26-2003, 09:57 PM
Originally posted by Korval:
You always need a HWND (and from that, a HDC) to use OpenGL.

However, you don't have to display the window. You can create the window, get a HDC from it, initialize OpenGL, and then minimize the window.

To make this work, you must render, not to the window's back buffer, but to a pbuffer you create with the appropriate ARB extension.

Minimize? Simply don't show and that's all.