PDA

View Full Version : Windowless



mccloed3
08-03-2004, 07:55 AM
I want to run OpenGL without a window. How do I do that?

SeskaPeel
08-03-2004, 01:31 PM
did you try glEnable(GL_NO_WINDOW) ?

mccloed3
08-03-2004, 03:06 PM
There is no such thing as GL_NO_WINDOW.

mccloed3
08-03-2004, 06:56 PM
I'm on Windows2K/XP. I've got GLUT, GLU, and GLAUX.

rgpc
08-03-2004, 07:20 PM
Create a window and hide it. Then create a pbuffer and use that as your rendering context.

mccloed3
08-03-2004, 08:40 PM
I don't want to have to make any windows calls. I want this to be as platform independant as possible.

rgpc
08-03-2004, 10:18 PM
#ifdef your code then

mccloed3
08-04-2004, 06:02 AM
There's got to be a better way.

Bob
08-04-2004, 06:21 AM
Mesa (http://www.mesa3d.org) has an offscreen renderer called OSMesa. No windowing code needed, just allocate a frame buffer, create a rendering context and you're ready to go. Completely platform independent (the OpenGL part at least :) ).

Dude
08-04-2004, 06:35 AM
There is no better way. You will always have to create a window to create an OpenGL context, if you want acceleration.

Under windows, wglCreateContext(HDC) is the ONLY way to create a GL context. Try as many different device contexts as you want. Only DCs for windows with supported pixel formats will work.

There are a few non-accelerated options, such as Mesa, however.

Regards,

Dude

mccloed3
08-04-2004, 10:09 AM
I used glutFullScreen and got what I wanted - no window border. Windowless probably wasn't the right way to describe what I was looking for.

Coconut
08-04-2004, 10:31 AM
The only difference is in glutFullScreen, it is #ifdef in glut's code.

VikingCoder
08-05-2004, 08:08 AM
Ah, you meant without a "window border", or as you described "fullscreen."

"Windowless" actually means no visual interface at all, which some people would want to use for such things as offline rendering, or rendering as a service.

The quality of the answers is directly proportional to the quality of the questions.