Archived

This topic is now archived and is closed to further replies.

mmss

What is the difference between Glut OpenGL window and Win32 OpenGL window?

Recommended Posts

I found most tutorials on Nehe''s website using Win32 to create a opengl window. I do not understand what the advantage is to use this way since it seems easier to use glutCreateWindow(title)to create a dispaly window (this way has few code). I got a small sample program writen in Win32 way and I need to convert it to GLUT way. I compared some code which in both ways from Nehe''s website. But my program in GLUT way still can not look as good as the way in Win32 way. How can I do? If you could help me and need my original code, please email me. Thanks for your kind help.

Share this post


Link to post
Share on other sites
There is no difference if all you want is a window for OpenGL.But in Win32 code, u can specify the different styles of window u want to use and many other little things.

If you are doing fullscreen, it doesnt matter.

Share this post


Link to post
Share on other sites
Hello GamerSg,
Thanks for your reply. The problem is I tried to convert the program writen in Win32 into the program in glut window format. My program works. However, the final image does not look as smooth as orignal one. What cause the problem? If you can see the images, you will understand? Do you mind if I send them to you by email? There might be only one line code needed, but I do not know what it will be.

Thank you.

Share this post


Link to post
Share on other sites
Thank you James.
Finally, I have solved my problem. Even it was not because of the resolution, you gave me a good hint. Some code in win32 main application file have to be removed if we want to convert the file to glut application main. I just remove the code
"glEnable(GL_DEPTH_TEST);" in the orignal win32 main, then the final image from glut is same as the orignal from win32. My case was that I blend several colors together so if I enable the depth test, the image does not look like very smooth.I can see the thousands of pixel formed together.

Anyway, I solved the problem. Thank you guys.

Share this post


Link to post
Share on other sites