Jump to content

  • Log In with Google      Sign In   
  • Create Account


Glut issues and a timer question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 EDog   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 December 2001 - 01:06 PM

Hi everybody! 1. I am making a openGL game and it has to be available on win,linux and hopefully mac. I am going with the glut library right now, but is it going to be any slower then setting it up the way Nehe did in his 1st tutorial(with a windows messenger)? To draw my animations right now, I pass glutIdleFunc a function which gets called repeatedly. However, I''m a little worried about how much overhead is going on under there, and Nehe just uses a while loop. If the overheads small, I will continue with GLUT, does anyone know? 2. The red book online says GLUT might not be good for full featured apps. What kinds of problems will I run into with glut when my program gets more features? 3. The nvidia site says some timer''s can take hundreds of times longer then others. Which ones are the fastest/best?

Sponsor:

#2 Gorg   Members   -  Reputation: 248

Like
Likes
Like

Posted 14 December 2001 - 08:13 PM

glut wasn''t design for full applications, even though the last version includes a game mode.


For portability, you are better off with SDL. SDL provides other services aside from managing windows : input, sound, etc. It works under Linux, Mac and Windows. Just search SDL on google.

Though it does not include gui widgets(some custom library build with opengl exists for it though). So if you are running a fullscreen app, go with SDL.

#3 LilBudyWizer   Members   -  Reputation: 495

Like
Likes
Like

Posted 15 December 2001 - 03:44 AM

An idle function can waste CPU. Specifically you might be running at a higher frame rate than is strictly needed. Whether that is a problem or not depends on whether you had some other use for the CPU, i.e. unused CPU time is wasted CPU time also. If you are billed for CPU it is a little differant in that unused CPU time is time you are not billed for. The only other real issue is that the idle function is part of your message loop. That isn''t really an issue for a game as long as you maintain an acceptable frame rate. If the processing in the idle function took five minutes it would be a differant story. The application would then seem to be locked up. That is really no differant of an issue than in any message processed by any event driven program.

#4 EDog   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 December 2001 - 09:28 PM

Thanks for the answers, I already found out glut''s a piece. Sometimes when it would go into full-screen it would leave the start bar at the bottom, sometimes the start bar would work, other times no, other times it would dissappear. Anyway I''m converting to windows for the windows release, no going through extra libraries. Porting shouldn''t be hard since I''m using c (except for the class and bool keywords) and openGL and am seperating the windows code Thanks for the tip on SDL though, looks dgood, I might use it when I port.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS