View Full Version : Glut vs Winapi
What do u think? I've heard that glut has a frame rate hit to the app. Is it better to use winapi or glut for making a simple or a more complex game?
06-11-2001, 03:03 AM
GLUT has a lot of overhead. thats what hurts its performance.
The good thing of GLUT is that its platform independant.
If you plan on porting to other OSs, use GLUT. if not, and u have a good knowledge of win32, use that.
06-11-2001, 07:38 AM
The performance hit you get with GLUT is not very big. Thats what I can tell you by my experience. If you're doing demos, is the way to go, if you're looking for a 'serious' project, you should choose wisely...
06-11-2001, 09:19 PM
I'd recommend only using GLUT for quick demos or to test algorithms mainly because once you enter the GLUT main loop, say bye bye to your main thread. http://www.opengl.org/discussion_boards/ubb/wink.gif
06-11-2001, 11:37 PM
In my opinion GLUT is better, it is far cleaner in terms of readability, it is platform independant and is easy to learn. What do you mean when you said that thing about saying bye bye to the main thread when you enter glutMainLoop? Also I dont think the overhead would matter much. In most apps you will only call around 5-10 glut functions, thats not many, and I doubt 5-10 functions would cause alot of overhead.
06-12-2001, 06:51 AM
One reason not to use glut would be if you want to do any Windows specific stuff with your window. For instance, adding custom controls, toolbars, etc.
glutMainLoop basically takes over control of your message pump, so if you want to do anything specialized in that, you would be better off using the Win32 API as well.
For quick, portable demos Glut is great, though.
06-12-2001, 08:49 AM
win32 gives you far better control over the interfacing. As for portability, you could make an alternate version that uses glut or whatever you want for 'nix/mac. The api should only interface to your code so there shouldn't be too much to reprogram. I find glut just a little to simple and fairly slow.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.