GLUT for Windows
Wouldn''t it be better to use the GLUT windows version than go through the complex process described in Nehe''s first tutorial, to set up an OpenGL window in Windows? I know if it was that simple, there would be something describing how to do this on the website. What''s wrong with my line of thinking?
GLUT is designed to be simple in usage. It hides many details from you so that you can put up a window with only a dozen lines of code. The question really is do you need more than what GLUT provides you with. If you need to handle some messages yourself, or you want to have a window with specific styles, etc. then you probably have to setup the window yourself. If you''re happy with the functionality that GLUT provides, you can safely use it. I personally use MFC, so GLUT has no place in my apps.
---visit #directxdev on afternet <- not just for directx, despite the name
I totally agree, since running comparitive benchmarks between nehe''s tutorials as written, and nehe''s tutorials rewritten with glut, there is basically no performance decrease. At least one commercial game I know of was written using glut, Black and White.
I emailed nehe and his response was "I feel its better for users to learn about what is going on at a lower level."
Calling the WINAPI low level is an interesting concept, but anyhow. I suppose some people are just scared of Glut falling out of existance. Its "official" documentation hasn''t been updated since 3.2, and it is now on version 3.7. The previous 5 releases have included some quite serious functionality also, so its odd there have been no documentation improvements.
Before you used to not be able to get an actual full screen mode using glut. It would just give you a max sized window, but still have various display things such as the windows start bar, etc... With 3.7 using an undocumented feature of gamemode, you can now get true full screen mode functionality.
And last, but definately not least, alot of sites for whatever reason decide to show their examples using VC++ code. So if you''re learning from internet tutorials, chances are you will run into a fair amount of WINAPI stuff, so you get used to using it, and don''t want to change your style (though admittedly changing your "style" preference to glut usually just means removing about 200 lines of winapi crap from your code.
I emailed nehe and his response was "I feel its better for users to learn about what is going on at a lower level."
Calling the WINAPI low level is an interesting concept, but anyhow. I suppose some people are just scared of Glut falling out of existance. Its "official" documentation hasn''t been updated since 3.2, and it is now on version 3.7. The previous 5 releases have included some quite serious functionality also, so its odd there have been no documentation improvements.
Before you used to not be able to get an actual full screen mode using glut. It would just give you a max sized window, but still have various display things such as the windows start bar, etc... With 3.7 using an undocumented feature of gamemode, you can now get true full screen mode functionality.
And last, but definately not least, alot of sites for whatever reason decide to show their examples using VC++ code. So if you''re learning from internet tutorials, chances are you will run into a fair amount of WINAPI stuff, so you get used to using it, and don''t want to change your style (though admittedly changing your "style" preference to glut usually just means removing about 200 lines of winapi crap from your code.
quote:
Original post by IndirectX
GLUT is designed to be simple in usage. It hides many details from you so that you can put up a window with only a dozen lines of code. The question really is do you need more than what GLUT provides you with. If you need to handle some messages yourself, or you want to have a window with specific styles, etc.
I am really curious what you mean. Glut (particularly 3.7) provides abstractions of every message that has any practical use, and also what window style can glut not manage? As far as I know it not possible to set certain styles such as refresh on horizontal movement only, etc.. but these are relatively useless styles.
Although I''ve never used GLUT, I did look at its headers and docs and I think that, at least to be cross-platform, it must omit many details that you can make use of when talking to the underlying implementation (eg, Win32). I don''t really want to start an argument, since I''m not going to use GLUT anyway, but can you put icons in menus and modify system menus with it? Or how about responding to APM messages? Again, if you don''t need these, by all means use GLUT.
---visit #directxdev on afternet <- not just for directx, despite the name
Actually, since you seem interested in menu''s, glut does provide complete menu support, as well as attaching menu''s to actions. Ie, right_mouse, etc.
If you are sincerely concerned about APM messages in WIN32, you should still be able to assign a secondary callback function even with glut windowing. It encapsulates alot of useless information, but it is still accessable.
Also, indirectx, surely when you were looking through the docs for GLUT, you noticed that two releases of GLUT were almost primarily WIN32 improvement releases. Since most people use WIN32 GLUT is quite optimized for WIN32.
And last but not least, if there is any single that might actually turn out to be impossible using standard GLUT, it is all open source and quite well documented
If you are sincerely concerned about APM messages in WIN32, you should still be able to assign a secondary callback function even with glut windowing. It encapsulates alot of useless information, but it is still accessable.
Also, indirectx, surely when you were looking through the docs for GLUT, you noticed that two releases of GLUT were almost primarily WIN32 improvement releases. Since most people use WIN32 GLUT is quite optimized for WIN32.
And last but not least, if there is any single that might actually turn out to be impossible using standard GLUT, it is all open source and quite well documented
, so adding new features such as secondary callback''s, etc.. is trivial.. .
I wish people would try GLUT before bashing it. At absolute worst, just compare benchmark times!
OK. I''m not going to argue with you. I''m using MFC anyway.
---visit #directxdev on afternet <- not just for directx, despite the name
>>Wouldn''t it be better to use the GLUT windows version than go through the complex process described in Nehe''s first tutorial, to set up an OpenGL window in Windows? I know if it was that simple, there would be something describing how to do this on the website. What''s wrong with my line of thinking? <<
glut has a repuatation as childish? dont ask me why cause its ilogical.
though if u wanna use a 2d gui mfc/win32 would prolly be a better choice than glut
http://uk.geocities.com/sloppyturds/gotterdammerung.html
glut has a repuatation as childish? dont ask me why cause its ilogical.
though if u wanna use a 2d gui mfc/win32 would prolly be a better choice than glut
http://uk.geocities.com/sloppyturds/gotterdammerung.html
here's a great tut on glut, that is very easy and desctribes all (that i know of) functionaly of glut 3.7...
http://www.lighthouse3d.com/opengl/glut/
oh and one more thing. glut makes ur code very portable. winapi does not.
---
umm... bah?
[edited by - shurcool on April 1, 2002 9:33:53 AM]
http://www.lighthouse3d.com/opengl/glut/
oh and one more thing. glut makes ur code very portable. winapi does not.
---
umm... bah?
[edited by - shurcool on April 1, 2002 9:33:53 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement