Sign in to follow this  

Too much time spent on initialize GLUT

This topic is 3932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

As I record, the follows code :
glutWindowHandle = glutCreateWindow("SAXPY");
takes about 9 seconds to run, which is an unusual thing. What can be the reason behind this? My graphic card is Nvidia GeForce 6200 [Edited by - rosicky2005 on March 7, 2007 6:20:34 PM]

Share this post


Link to post
Share on other sites
yes that sounds way to much, dont know what the problem is, try running someone else glut code,
eg the glut version of the nehe code (lesson one). does it run much quicker?
if not perhaps reinstall your graphics cards drivers

Share this post


Link to post
Share on other sites
Quote:
Original post by zedz
yes that sounds way to much, dont know what the problem is, try running someone else glut code,
eg the glut version of the nehe code (lesson one). does it run much quicker?
if not perhaps reinstall your graphics cards drivers


I have tried to reinstall my graphic card driver. But the problem still exists.

Is that the problem of my graphic card setting? After installing the driver, should I set up anything else?

Share this post


Link to post
Share on other sites
There's too little information available to say what the problem is.

Do opengl games that don't use glut take a long time to start? (going to http://nehe.gamedev.net/ and downloading one of the prebuilt tutorials would be an excellent way to test this)

Do other glut programs take a long time? (ditto).

What version of glut are you using? Is it freeglut or regular glut?

If only other glut programs are starting slow, then the problem lies with glut. If all opengl programs are starting slow, then my money says it's a problem with your driver or video card.

Personally I'd discourage you from using glut anyways, as it has had little to no support for some time now. I strongly encourage you to use SDL instead.

Share this post


Link to post
Share on other sites
Quote:
Original post by gharen2
There's too little information available to say what the problem is.

Do opengl games that don't use glut take a long time to start? (going to http://nehe.gamedev.net/ and downloading one of the prebuilt tutorials would be an excellent way to test this)

Do other glut programs take a long time? (ditto).

What version of glut are you using? Is it freeglut or regular glut?

If only other glut programs are starting slow, then the problem lies with glut. If all opengl programs are starting slow, then my money says it's a problem with your driver or video card.

Personally I'd discourage you from using glut anyways, as it has had little to no support for some time now. I strongly encourage you to use SDL instead.


I am using glut-3.7.6 now. But what's the difference between freeglut and regular glut?

I download my glut package here:
http://www.xmission.com/~nate/glut.html

Share this post


Link to post
Share on other sites
The main difference with freeglut is that it's open source and more recent. That's not to say it's actually "better" per se, but maybe try it and see if it has the same problem.

http://freeglut.sourceforge.net/

Share this post


Link to post
Share on other sites
Quote:
Original post by gharen2
The main difference with freeglut is that it's open source and more recent. That's not to say it's actually "better" per se, but maybe try it and see if it has the same problem.

http://freeglut.sourceforge.net/


I have tried to use Nvidia GeForce 6800 graphic card and the problem still exists.

Also, the freeglut is very difficult to install. There is no clear instruction
and no .lib files.

Share this post


Link to post
Share on other sites
Quote:
Original post by rosicky2005
I have tried to use Nvidia GeForce 6800 graphic card and the problem still exists.

Also, the freeglut is very difficult to install. There is no clear instruction
and no .lib files.

Come on, if you can compile your program you can certainly compile a library.
Are you able to debug your application and suspend it in the middle of the nine seconds of initialization, or to profile your application and get a report of where it spends time? What about the comparisons gharen2 suggests?

Share this post


Link to post
Share on other sites
Quote:
Original post by rosicky2005

glutWindowHandle = glutCreateWindow("SAXPY");


takes about 9 seconds to run, which is an unusual thing.


Is the sample you are running your own of the demo made by Dom from GPGPU.org?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I'd be very annoyed at a 9 second startup every time I wanted to test my application. Then again I code a few lines and test, finding bugs is easier that way, yes even with 20,000 lines of code or more now.

But what the OP has to ask himself is why he is using glut when it's not really maintained anymore. Look into other libraries like FreeGLUT (still not my thing) or SDL.

Share this post


Link to post
Share on other sites

This topic is 3932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this