I think the reason NeHe said it would be simple is because he assumes ppl reading his site knows how to program, more specifically WINDOWS programming. So keeping it the same works good. Here is a replacement for WinMain:
int main(int argc, char** argv){ glutInit(&argc, argc); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(250,250); glutInitWindowPosition(100,100); glutCreateWindow("title"); Init(); //InitGL(GLvoid) glutDisplayFunc(display); //display = function that draws //DrawGLScene glutMainLoop(); return 0;}
You can also cut all that other trash out that has to do with windows programming. Usally thats just WndProc.
If you can handle the messages yourself (keypresses, resizing, ect.) then Glut works much better. On the contrary if you are a new windows programmer then stay with the windows "shell".
One thing to remember.
DirectX is for WINDOWS ONLY!
OpenGL is for ALL OPERATING SYSTEMS, so learning one way to make a window that works on all systems is much MUCH more time effecient.
BTW i brought up DirectX to show why openGL is better ;D
It really had nothing to do with my point
[edited by - DarkHunter on April 2, 2002 12:31:31 AM]