glut performance

Started by
4 comments, last by Simian Man 18 years, 7 months ago
Hi, I compiled two programs from two different tutorials, one using GLUT and one using win32 windowing, and I noticed that even though they render almost nothing, the GLUT one is very slow when I try to move the window around. The code for the tutorials can be found online: GLUT: http://www.lighthouse3d.com/opengl/glut/index.php?2 Win32: http://nehe.gamedev.net/data/lessons/vc/lesson01.zip Can anyone tell me what's going on? Thanks a lot.
Advertisement
it has to do with how or rather when glut draws the frames.
Non glut draws the frames continiously, after each frame it draws another one with no delay.

Glut on the other hand let's windows decide if the window is drawable or have to wait until windows calls a paint refresh call.
IT's ok for the most part, but when you move windows it's not.
Thanks a lot for that reply. Is it still advisable (since I read glut development was abandoned) to use glut to create moderate complexity apps?
Also make sure you are passing the render function into the glutIdleFunc to make sure it is called during 'Idle' cycles.

As for using it, what are you aiming to make? "Moderate complexity apps" is too broad of a statement to judge at this point. Do you need speed or ease of programming? Do you have to use GLUT, or can you use another 3rd party library that offers OpenGL support?
Quote:Original post by sbayeta
Thanks a lot for that reply. Is it still advisable (since I read glut development was abandoned) to use glut to create moderate complexity apps?


Perhaps not moderate complexity apps, but simple complexity apps, if your spending more than a month on a app you could spend a few hours writing better window management code.
I would suggest SDL. It is as easy and straight-forward as GLUT but has high enough performance for anything you want to do. Also no callbacks[smile]

This topic is closed to new replies.

Advertisement