PDA

View Full Version : glutInitDisplayString speed



Zeno
05-20-2002, 02:41 PM
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 http://www.opengl.org/discussion_boards/ubb/smile.gif

-- Zeno

V-man
05-20-2002, 09:43 PM
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

Zeno
05-20-2002, 10:24 PM
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

mcraighead
05-21-2002, 02:49 PM
Internally, these sorts of routines make lots of DescribePixelFormat calls, I believe. That can get pretty slow.

- Matt

Zeno
05-21-2002, 07:55 PM
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