glutInitDisplayString speed

When using glut, I’ve had to switch from using glutInitDisplayMode() to using glutInitDisplayString() to be sure that I get a 24 bit depth buffer.

The problem is, glutInitDisplayString() can make the call to glutCreateWindow() take up to 15 seconds whereas it is almost immediate with glutInitDisplayMode().

Now, I assumed that it was potentially searching through available rendering contexts when I give it something like “depth>=24”, but even when I specify everything with an “=”, it is no faster.

Any ideas about speeding this up would be welcome

– Zeno

Im not familiar with glut that much, but the speed of creating a new OGL window is driver dependent.

For a while there, it took forever for a window to appear on my geforce2 mx but my g200 was snappy. Now the nvidia drivers have improved of course.
Be sure to compare to a non-glut ogl app.

my 2 cents

V-man

Yea, but I mentioned in my post that the window pops up almost instantly if I use glutInitDisplayMode(). Same thing if I avoid GLUT altogether (which I don’t always want to do).

– Zeno

Internally, these sorts of routines make lots of DescribePixelFormat calls, I believe. That can get pretty slow.

  • Matt

Thanks guys.

I guess for now I’ll just develop with 16 bit depth buffer (to have a fast turnaround time) and then use debug mode to trace down the slowness in the GLUT source when the program is done.

– Zeno