Advertisement

To Much Code!!!!!!! - Some Ideas to make it smaller?

Started by December 25, 2000 07:26 PM
7 comments, last by HdZ 23 years, 11 months ago
HI I am new here its also my first post I am just starting with openGL nehe lesson1 and saw that there is so much code for only the window I decided to write som headers where the standard functions that are not shangeble stored in, but i dont know which shuld i chose to store in my header. I am also using the standard variables types like int,void,double,float,short instead of GLint,GLsizei,GLvoid etc. adn i puted the Errorcheck from the KillGlWindow() function out but its just to much code Please help me if you have som ideas to reduce the code
what I did was created a class that housed Nehe''s base code. Now whenever I want to write an opengl app I just write two lines of code and I have a compilable app.

JoeMont001@programmer.net www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Advertisement
Thats a cool idea but can you explain it a bit more
Are Tere All functions from nehe in this class
i can''t realiy imagin how do you did this But it souds very good
I''ll tell ya what. I''ll e-mail you my class and you can see for yourself.

JoeMont001@programmer.net www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Thanks A lot
I hate those tutorials for only one reason... they''re not glut based... everything else(well most things) that are meant to teach are based in it or glaux(though those are older tuts)... I feel that there should be an established form to teach(though this is somewhat in effect).. oh well, thats enough
Advertisement
You right thats a problem but...
Hdz: Here''s the way I do it: I use the OpenGL AppWizard (available somewhere in the archives) to create the framework. Then I create a new .h and .cpp file (both of the same name so that I don''t get confused ). In the .h file I put the prototype of the function and in the .cpp file I put the function definition. Just link to the .h file and you''re looking at the same amount of code, just spread out so it looks neater

Lucid: I''m sorry to sound harsh, but what would you rather have: pay for tuts and get them the way you want them, or get tuts in any way shape or form for free? NeHe has done a wonderful job. However, please feel free to port them to GLUT

------------------------------------------------
SkyFire360
"The beaver killed the beaver! I am so stupid!"
Current Project: MD3 Loader
Project Status: Can Load the mesh and animate it
I do real things with imaginary numbers
In my opinion is it something good that the tutorial is available in OS specific code. It shows you exactly how things works. GLUT has limitations that makes it bad for bigger projects.

You can of course download the GLUT ports of the tutorials but I
recommend that you at least take a look at the originals.

This topic is closed to new replies.

Advertisement