Advertisement

Please Help To Reduce Code Of Nehe Tutorial lesson#1

Started by December 25, 2000 09:02 PM
30 comments, last by HdZ 23 years, 10 months ago
Hi I need Some Ideas To reduce The Code of The Nehe Tutorial lesson#1 someting like Cut out of the Error Check plz :]
If you use glut you can cut out about 90% of the code.
Advertisement
No i dont using glut i use the standat MSVC6++ libs and headers
i just want to know what functions are not realy neaded to create a window (like the ErrorCheck''S in the KillGlWindow()func.)
-==Hd[Z-
NEVER, NEVER, NEVER, Remove any error checks!!

If you remove them you'll get the same problem as with winblows


"this program has made an illegal operation in blah.dll please format your c: drive and restart"
[OK]

Edited by - richardve on December 26, 2000 9:41:50 AM
Error checks are necessary in order to write quality code...
I think the GLUT method is best. Nehe prefers windows code over GLUT, however so its his choice. What I think would be great would be to port all the tutorials over to GLUT. It''d certainly make them alot easier to learn from... anyone game to do this??
(I guess I could do the first few... no guarantee''s on quality though :Þ)
Protozone
I am thinkin too that errochecks are verry important but
i am just starting and its alittle bit confusing about
all the code i want just to understand the framework of opengl
correct me if i wrong but for the beginning you need just
the standart APIs and functions
-=Hd[Z=-
Advertisement
I think that the irix ports are using GLUT. Perhaps could more windows specific GLUT ports be something?
Yeah, you should NEVER remove error checking. If your program suddenly ends, it will be a huge frustration to figure out why. You can never have too much error checking (thanks eugene for telling me that!).

I don''t think it is possible to cut anything. 80% of that code is standard to any win32 program. It is possible to use (the evil) MFC code. Look around for a tutorial on using ogl in it.

L8r,
The Rainmaker
Thx a lot for all your pastings but i just refuse to use "MFC"
you right its evil´and its confusing with all that unneedable
code its silly and ... etc.
It is not in my mind to remove errorchecks or some of code,
i also never said that it dont would be useful, but you have to understand me i am just starting and dont need this confusing code like errorchecks or GLvoid,Glint, its also to much to write
and i dont want this !!!! you could help me if you have some ideas to port the functions that are never changed in som sort of module or header. !!!BUT I DONT KNOW WHICH FUNCTIONS THESE ARE!!!!![Remark]->(I dont think that you write all the code for the window when you start a new project
anyway thank you far all :D
Since you are new to opengl, I believe that you should keep as many error checks in as possible. How else are you going to know why it didn''t work?

Taking out error checks now will only have you put them back in when you discover that it''s not working as you intended it to work.

Good luck.

This topic is closed to new replies.

Advertisement