PDA

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



pango
05-26-2003, 09:18 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?

05-26-2003, 10:11 AM
No. OpenGL requires a rendering context. Under Win32, a rendering context must be bound to a device context, which requires a window. I don't really know, but I think it's the same under Linux.

Rog
05-26-2003, 10:22 AM
Actually, under Win32 you don't need a window. You can create a memory device context and choose a pixel format that supports rendering to bitmap (PFD_DRAW_TO_BITMAP) and create an OpenGL rendering context from it. You can render fine directly to bitmap that way.

Mazy
05-26-2003, 11:24 AM
But only with software, and only MS reference implementation ( opengl 1.1 )

Rog
05-26-2003, 12:30 PM
Originally posted by Mazy:
But only with software
Absolutely right http://192.48.159.181/discussion_boards/ubb/smile.gif That means for anything non-trivial, it's likely to be sloooooww http://192.48.159.181/discussion_boards/ubb/frown.gif